summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2020-05-26 16:18:32 +0200
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2020-08-14 12:31:37 +0200
commit992d9e3a20662b11654ac37e46419c363d49bce9 (patch)
treecf63433fb71acc4c87f6c38b2952266fdcc5f4bc /gst-libs
parent089ef59c374c1940273a4fa309c08bd7e02ffcd5 (diff)
libs: filter: gst_vaapi_filter_get_memory_types()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/122>
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/vaapi/gstvaapifilter.c18
-rw-r--r--gst-libs/gst/vaapi/gstvaapifilter.h3
2 files changed, 21 insertions, 0 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapifilter.c b/gst-libs/gst/vaapi/gstvaapifilter.c
index a6e69da7..9af76831 100644
--- a/gst-libs/gst/vaapi/gstvaapifilter.c
+++ b/gst-libs/gst/vaapi/gstvaapifilter.c
@@ -1948,6 +1948,24 @@ gst_vaapi_filter_append_caps (GstVaapiFilter * filter, GstStructure * structure)
}
/**
+ * gst_vaapi_filter_get_memory_types:
+ * @filter: a #GstVaapiFilter
+ *
+ * Gets the surface's memory types available in @filter's context.
+ *
+ * Returns: surface's memory types available in @filter context.
+ **/
+guint
+gst_vaapi_filter_get_memory_types (GstVaapiFilter * filter)
+{
+ g_return_val_if_fail (filter != NULL, FALSE);
+
+ if (!ensure_attributes (filter))
+ return 0;
+ return filter->attribs->mem_types;
+}
+
+/**
* gst_vaapi_filter_set_cropping_rectangle:
* @filter: a #GstVaapiFilter
* @rect: the cropping region
diff --git a/gst-libs/gst/vaapi/gstvaapifilter.h b/gst-libs/gst/vaapi/gstvaapifilter.h
index 27533cbe..fcc968f0 100644
--- a/gst-libs/gst/vaapi/gstvaapifilter.h
+++ b/gst-libs/gst/vaapi/gstvaapifilter.h
@@ -219,6 +219,9 @@ gst_vaapi_filter_set_format (GstVaapiFilter * filter, GstVideoFormat format);
gboolean
gst_vaapi_filter_append_caps (GstVaapiFilter * filter, GstStructure * structure);
+guint
+gst_vaapi_filter_get_memory_types (GstVaapiFilter * filter);
+
gboolean
gst_vaapi_filter_set_cropping_rectangle (GstVaapiFilter * filter,
const GstVaapiRectangle * rect);