summaryrefslogtreecommitdiff
path: root/gst-libs/gst/vaapi/gstvaapiprofilecaps.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst-libs/gst/vaapi/gstvaapiprofilecaps.c')
-rw-r--r--gst-libs/gst/vaapi/gstvaapiprofilecaps.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapiprofilecaps.c b/gst-libs/gst/vaapi/gstvaapiprofilecaps.c
index a98d0e0d..0e443935 100644
--- a/gst-libs/gst/vaapi/gstvaapiprofilecaps.c
+++ b/gst-libs/gst/vaapi/gstvaapiprofilecaps.c
@@ -117,3 +117,19 @@ gst_vaapi_profile_caps_append_decoder (GstVaapiDisplay * display,
return append_caps_with_context_info (display, &cip, structure);
}
+
+/**
+ * gst_vaapi_mem_type_supports:
+ * @va_mem_types: memory types from VA surface attributes
+ * @mem_type: the #GstVaapiBufferMemoryType to test
+ *
+ * Test if @va_mem_types handles @mem_type
+ *
+ * Returns: %TRUE if @mem_type is supported in @va_mem_types;
+ * otherwise %FALSE
+ **/
+gboolean
+gst_vaapi_mem_type_supports (guint va_mem_types, guint mem_type)
+{
+ return ((va_mem_types & from_GstVaapiBufferMemoryType (mem_type)) != 0);
+}