From 9132510ce090f1a6e7279f19c230fdea8aae0b4c Mon Sep 17 00:00:00 2001 From: Julien Isorce Date: Wed, 19 Oct 2016 15:55:27 +0100 Subject: [PATCH] vaapivideobufferpool: add GstVaapiVideoBufferPoolAcquireParams Useful to let the pool know the current surface proxy when calling gst_buffer_pool_alloc_buffer() / gst_buffer_pool_acquire_buffer() https://bugzilla.gnome.org/show_bug.cgi?id=755072 --- gst/vaapi/gstvaapivideobufferpool.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/gst/vaapi/gstvaapivideobufferpool.h b/gst/vaapi/gstvaapivideobufferpool.h index 418c687728..6a2169f1e7 100644 --- a/gst/vaapi/gstvaapivideobufferpool.h +++ b/gst/vaapi/gstvaapivideobufferpool.h @@ -25,6 +25,7 @@ #include #include +#include G_BEGIN_DECLS @@ -41,6 +42,7 @@ G_BEGIN_DECLS #define GST_VAAPI_IS_VIDEO_BUFFER_POOL_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_VAAPI_TYPE_VIDEO_BUFFER_POOL)) +typedef struct _GstVaapiVideoBufferPoolAcquireParams GstVaapiVideoBufferPoolAcquireParams; typedef struct _GstVaapiVideoBufferPool GstVaapiVideoBufferPool; typedef struct _GstVaapiVideoBufferPoolClass GstVaapiVideoBufferPoolClass; typedef struct _GstVaapiVideoBufferPoolPrivate GstVaapiVideoBufferPoolPrivate; @@ -83,6 +85,24 @@ typedef enum GST_VAAPI_VIDEO_BUFFER_POOL_OPTION_GL_TEXTURE_UPLOAD = (1u << 2), } GstVaapiVideoBufferPoolOption; +/** + * GstVaapiVideoBufferPoolAcquireParams: + * @proxy: the #GstVaapiSurfaceProxy associated to the dmabuf-base + * memory + * + * Parameters passed to the gst_buffer_pool_acquire_buffer() function + * on a #GstVaapiVideoBufferPool, to control the allocation of the + * buffer. + * + * This is an extension of #GstBufferPoolAcquireParams + */ +struct _GstVaapiVideoBufferPoolAcquireParams +{ + GstBufferPoolAcquireParams parent_instance; + + GstVaapiSurfaceProxy *proxy; +}; + /** * GstVaapiVideoBufferPool: *