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
buffers.

https://bugzilla.gnome.org/show_bug.cgi?id=794946
This commit is contained in:
Sreerenj Balachandran 2018-04-30 12:40:32 -08:00
parent ef6e186801
commit e1a90f1ec9
2 changed files with 12 additions and 0 deletions

View file

@ -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);

View file

@ -100,6 +100,7 @@ struct _GstMsdkVPP
gboolean use_srcpad_dmabuf;
gboolean shared_context;
gboolean add_video_meta;
gboolean need_vpp;
guint flags;
/* element properties */