Commit c4809aa1 authored by Sreerenj Balachandran's avatar Sreerenj Balachandran
Browse files

msdk: vpp: set passthrough from set_caps method for code clarity

Call passthrough setting method from set_caps so that
msdk initialize subroutine looks more clear.
parent 665f4a14
...@@ -901,9 +901,7 @@ gst_msdkvpp_set_passthrough (GstMsdkVPP * thiz) ...@@ -901,9 +901,7 @@ gst_msdkvpp_set_passthrough (GstMsdkVPP * thiz)
GST_VIDEO_INFO_FORMAT (&thiz->srcpad_info)) GST_VIDEO_INFO_FORMAT (&thiz->srcpad_info))
passthrough = FALSE; passthrough = FALSE;
GST_OBJECT_UNLOCK (thiz);
gst_base_transform_set_passthrough (GST_BASE_TRANSFORM (thiz), passthrough); gst_base_transform_set_passthrough (GST_BASE_TRANSFORM (thiz), passthrough);
GST_OBJECT_LOCK (thiz);
} }
static gboolean static gboolean
...@@ -979,9 +977,6 @@ gst_msdkvpp_initialize (GstMsdkVPP * thiz) ...@@ -979,9 +977,6 @@ gst_msdkvpp_initialize (GstMsdkVPP * thiz)
msdk_status_to_string (status)); msdk_status_to_string (status));
} }
/* set passthrough according to filter operation change */
gst_msdkvpp_set_passthrough (thiz);
status = MFXVideoVPP_QueryIOSurf (session, &thiz->param, request); status = MFXVideoVPP_QueryIOSurf (session, &thiz->param, request);
if (status < MFX_ERR_NONE) { if (status < MFX_ERR_NONE) {
GST_ERROR_OBJECT (thiz, "VPP Query IO surfaces failed (%s)", GST_ERROR_OBJECT (thiz, "VPP Query IO surfaces failed (%s)",
...@@ -1074,6 +1069,9 @@ gst_msdkvpp_set_caps (GstBaseTransform * trans, GstCaps * caps, ...@@ -1074,6 +1069,9 @@ gst_msdkvpp_set_caps (GstBaseTransform * trans, GstCaps * caps,
if (!gst_msdkvpp_initialize (thiz)) if (!gst_msdkvpp_initialize (thiz))
return FALSE; return FALSE;
/* set passthrough according to filter operation change */
gst_msdkvpp_set_passthrough (thiz);
/* Ensure sinkpad buffer pool */ /* Ensure sinkpad buffer pool */
thiz->sinkpad_buffer_pool = thiz->sinkpad_buffer_pool =
gst_msdkvpp_create_buffer_pool (thiz, GST_PAD_SINK, caps, gst_msdkvpp_create_buffer_pool (thiz, GST_PAD_SINK, caps,
......
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