diff --git a/gst/vaapi/gstvaapipluginutil.c b/gst/vaapi/gstvaapipluginutil.c index 88223ba39a..2dcfbdbe50 100644 --- a/gst/vaapi/gstvaapipluginutil.c +++ b/gst/vaapi/gstvaapipluginutil.c @@ -661,6 +661,21 @@ gst_caps_has_vaapi_surface (GstCaps * caps) return _gst_caps_has_feature (caps, GST_CAPS_FEATURE_MEMORY_VAAPI_SURFACE); } +gboolean +gst_caps_is_video_raw (GstCaps * caps) +{ + GstStructure *structure; + + g_return_val_if_fail (caps != NULL, FALSE); + + if (!gst_caps_is_fixed (caps)) + return FALSE; + if (!_gst_caps_has_feature (caps, GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY)) + return FALSE; + structure = gst_caps_get_structure (caps, 0); + return gst_structure_has_name (structure, "video/x-raw"); +} + void gst_video_info_change_format (GstVideoInfo * vip, GstVideoFormat format, guint width, guint height) diff --git a/gst/vaapi/gstvaapipluginutil.h b/gst/vaapi/gstvaapipluginutil.h index 34aea9cd1e..eb5633bf93 100644 --- a/gst/vaapi/gstvaapipluginutil.h +++ b/gst/vaapi/gstvaapipluginutil.h @@ -118,6 +118,10 @@ G_GNUC_INTERNAL gboolean gst_caps_has_vaapi_surface (GstCaps * caps); +G_GNUC_INTERNAL +gboolean +gst_caps_is_video_raw (GstCaps * caps); + G_GNUC_INTERNAL void gst_video_info_change_format (GstVideoInfo * vip, GstVideoFormat format,