summaryrefslogtreecommitdiff
path: root/sys/msdk
diff options
context:
space:
mode:
authorHaihao Xiang <haihao.xiang@intel.com>2020-02-17 14:11:15 +0800
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2021-04-28 08:30:38 +0000
commit449f0ee52a41b816487d6754d32729300a218395 (patch)
treecad50e959d0f1b8c99baca8a3dbc94c1cc0cd538 /sys/msdk
parent5d891eb40c960552810f3220e93c637b8f6a3e4a (diff)
downloadgstreamer-plugins-bad-449f0ee52a41b816487d6754d32729300a218395.tar.gz
msdkh265dec: Add support for error report too
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/909>
Diffstat (limited to 'sys/msdk')
-rw-r--r--sys/msdk/gstmsdkh265dec.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/sys/msdk/gstmsdkh265dec.c b/sys/msdk/gstmsdkh265dec.c
index 841bfe6eb..50b61b975 100644
--- a/sys/msdk/gstmsdkh265dec.c
+++ b/sys/msdk/gstmsdkh265dec.c
@@ -83,6 +83,17 @@ gst_msdkh265dec_configure (GstMsdkDec * decoder)
* customers still using this for low-latency streaming of non-b-frame
* encoded streams */
decoder->param.mfx.DecodedOrder = h265dec->output_order;
+
+#if (MFX_VERSION >= 1025)
+ if (decoder->report_error) {
+ decoder->error_report.Header.BufferId = MFX_EXTBUFF_DECODE_ERROR_REPORT;
+ decoder->error_report.Header.BufferSz = sizeof (decoder->error_report);
+ decoder->error_report.ErrorTypes = 0;
+ gst_msdkdec_add_bs_extra_param (decoder,
+ (mfxExtBuffer *) & decoder->error_report);
+ }
+#endif
+
return TRUE;
}
@@ -91,6 +102,9 @@ gst_msdkdec_h265_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
{
GstMsdkH265Dec *thiz = GST_MSDKH265DEC (object);
+#if (MFX_VERSION >= 1025)
+ GstMsdkDec *dec = GST_MSDKDEC (object);
+#endif
GstState state;
GST_OBJECT_LOCK (thiz);
@@ -105,6 +119,11 @@ gst_msdkdec_h265_set_property (GObject * object, guint prop_id,
case GST_MSDKDEC_PROP_OUTPUT_ORDER:
thiz->output_order = g_value_get_enum (value);
break;
+#if (MFX_VERSION >= 1025)
+ case GST_MSDKDEC_PROP_ERROR_REPORT:
+ dec->report_error = g_value_get_boolean (value);
+ break;
+#endif
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -118,12 +137,20 @@ gst_msdkdec_h265_get_property (GObject * object, guint prop_id, GValue * value,
GParamSpec * pspec)
{
GstMsdkH265Dec *thiz = GST_MSDKH265DEC (object);
+#if (MFX_VERSION >= 1025)
+ GstMsdkDec *dec = GST_MSDKDEC (object);
+#endif
GST_OBJECT_LOCK (thiz);
switch (prop_id) {
case GST_MSDKDEC_PROP_OUTPUT_ORDER:
g_value_set_enum (value, thiz->output_order);
break;
+#if (MFX_VERSION >= 1025)
+ case GST_MSDKDEC_PROP_ERROR_REPORT:
+ g_value_set_boolean (value, dec->report_error);
+ break;
+#endif
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -155,6 +182,10 @@ gst_msdkh265dec_class_init (GstMsdkH265DecClass * klass)
gst_msdkdec_prop_install_output_oder_property (gobject_class);
+#if (MFX_VERSION >= 1025)
+ gst_msdkdec_prop_install_error_report_property (gobject_class);
+#endif
+
gst_element_class_add_static_pad_template (element_class, &sink_factory);
gst_element_class_add_static_pad_template (element_class, &src_factory);
}