Commit b1c40175 authored by Haihao Xiang's avatar Haihao Xiang

msdkh265dec: Add support for error report too

parent a94e6508
Pipeline #109381 failed with stages
in 22 minutes and 54 seconds
......@@ -82,6 +82,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;
}
......@@ -90,6 +101,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);
......@@ -104,6 +118,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;
......@@ -117,12 +136,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;
......@@ -154,6 +181,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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment