diff --git a/sys/msdk/gstmsdkvpp.c b/sys/msdk/gstmsdkvpp.c index 61405bfdc2..d4f04e7a48 100644 --- a/sys/msdk/gstmsdkvpp.c +++ b/sys/msdk/gstmsdkvpp.c @@ -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); diff --git a/sys/msdk/gstmsdkvpp.h b/sys/msdk/gstmsdkvpp.h index 3e0e8d7b59..030e7d2168 100644 --- a/sys/msdk/gstmsdkvpp.h +++ b/sys/msdk/gstmsdkvpp.h @@ -100,6 +100,7 @@ struct _GstMsdkVPP gboolean use_srcpad_dmabuf; gboolean shared_context; gboolean add_video_meta; + gboolean need_vpp; guint flags; /* element properties */