A post_configure virtual method is added to allow
codec subclasses to adjust the initialized parameters
after MFXVideoDECODE_DecodeHeader is called from the
gstmsdkdec::gst_msdkdec_handle_frame function.
This is useful if codecs want to adjust the output
parameters based on the codec-specific decoding
options that are present in the mfxInfoMFX structure
after MFXVideoDECODE_DecodeHeader initializes them.
goto done;
}
+ if (!klass->post_configure (thiz)) {
+ flow = GST_FLOW_ERROR;
+ goto error;
+ }
+
if (!thiz->initialized)
hard_reset = TRUE;
else if (thiz->allocation_caps) {
g_object_unref (thiz->adapter);
}
+static gboolean
+gst_msdkdec_post_configure (GstMsdkDec * decoder)
+{
+ /* Do nothing */
+ return TRUE;
+}
+
static gboolean
gst_msdkdec_preinit_decoder (GstMsdkDec * decoder)
{
decoder_class->flush = GST_DEBUG_FUNCPTR (gst_msdkdec_flush);
decoder_class->drain = GST_DEBUG_FUNCPTR (gst_msdkdec_drain);
+ klass->post_configure = GST_DEBUG_FUNCPTR (gst_msdkdec_post_configure);
klass->preinit_decoder = GST_DEBUG_FUNCPTR (gst_msdkdec_preinit_decoder);
klass->postinit_decoder = GST_DEBUG_FUNCPTR (gst_msdkdec_postinit_decoder);
gboolean (*configure) (GstMsdkDec * decoder);
+ /* adjust mfx parameters per codec after decode header */
+ gboolean (*post_configure) (GstMsdkDec * decoder);
+
/* reset mfx parameters per codec */
gboolean (*preinit_decoder) (GstMsdkDec * decoder);
/* adjust mfx parameters per codec */