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

msdkvpp: Disable passthrough if memory capsfeature changes

So far msdk produced dmabuf fds are non-mappable.
If user wants to download the content of underlined surfaces,
dmabufcapsfeature negotiated pipeline will fail. So if the input surface
is dmabuf and downstream doesn't have support for dmabuf capsfeatures,
we do the vpp (no passthrough) and produce the mappable videomemory
parent ef6e1868
......@@ -800,6 +800,14 @@ gst_msdkvpp_set_passthrough (GstMsdkVPP * thiz)
if (thiz->flags)
passthrough = FALSE;
/* vpp could be needed in some specific circumstances, for eg:
* input surface is dmabuf and output must be videomemory. So far
* the underline iHD driver doesn't seems to support dmabuf mapping,
* so we could explicitly ask msdkvpp to provide non-dambuf videomemory
* surfaces as output thourgh capsfileters */
if (thiz->need_vpp)
passthrough = FALSE;
/* no passthrough if there is change in out width,height or format */
if (GST_VIDEO_INFO_WIDTH (&thiz->sinkpad_info) !=
GST_VIDEO_INFO_WIDTH (&thiz->srcpad_info)
......@@ -947,6 +955,9 @@ gst_msdkvpp_set_caps (GstBaseTransform * trans, GstCaps * caps,
gboolean srcpad_info_changed = FALSE;
gboolean deinterlace;
if (gst_caps_get_features (caps, 0) != gst_caps_get_features (out_caps, 0))
thiz->need_vpp = 1;
gst_video_info_from_caps (&in_info, caps);
gst_video_info_from_caps (&out_info, out_caps);
......@@ -100,6 +100,7 @@ struct _GstMsdkVPP
gboolean use_srcpad_dmabuf;
gboolean shared_context;
gboolean add_video_meta;
gboolean need_vpp;
guint flags;
/* element properties */
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