mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-06 10:42:22 +00:00
plugin: bufferpool: Delete ACQUIRE_FLAG_NO_ALLOC flag.
Delete the GST_VAAPI_VIDEO_BUFFER_POOL_ACQUIRE_FLAG_NO_ALLOC flag. In fact, no one is using that flag, and all vaapi buffers should have GstVaapiVideoMeta.
This commit is contained in:
parent
4913d2b595
commit
7701844813
2 changed files with 7 additions and 28 deletions
|
@ -321,22 +321,15 @@ gst_vaapi_video_buffer_pool_alloc_buffer (GstBufferPool * pool,
|
||||||
GstMemory *mem;
|
GstMemory *mem;
|
||||||
GstBuffer *buffer;
|
GstBuffer *buffer;
|
||||||
|
|
||||||
const gboolean alloc_vaapi_video_meta = !params ||
|
|
||||||
!(params->flags & GST_VAAPI_VIDEO_BUFFER_POOL_ACQUIRE_FLAG_NO_ALLOC);
|
|
||||||
|
|
||||||
if (!priv->allocator)
|
if (!priv->allocator)
|
||||||
goto error_no_allocator;
|
goto error_no_allocator;
|
||||||
|
|
||||||
if (alloc_vaapi_video_meta) {
|
|
||||||
meta = gst_vaapi_video_meta_new (priv->display);
|
meta = gst_vaapi_video_meta_new (priv->display);
|
||||||
if (!meta)
|
if (!meta)
|
||||||
goto error_create_meta;
|
goto error_create_meta;
|
||||||
|
|
||||||
buffer = gst_vaapi_video_buffer_new (meta);
|
buffer = gst_vaapi_video_buffer_new (meta);
|
||||||
} else {
|
|
||||||
meta = NULL;
|
|
||||||
buffer = gst_vaapi_video_buffer_new_empty ();
|
|
||||||
}
|
|
||||||
if (!buffer)
|
if (!buffer)
|
||||||
goto error_create_buffer;
|
goto error_create_buffer;
|
||||||
|
|
||||||
|
@ -487,7 +480,7 @@ gst_vaapi_video_buffer_pool_reset_buffer (GstBufferPool * pool,
|
||||||
* While surface is passed, we should clear it to avoid wrong
|
* While surface is passed, we should clear it to avoid wrong
|
||||||
* reference. */
|
* reference. */
|
||||||
meta = gst_buffer_get_vaapi_video_meta (buffer);
|
meta = gst_buffer_get_vaapi_video_meta (buffer);
|
||||||
if (meta)
|
g_assert (meta);
|
||||||
gst_vaapi_video_meta_set_surface_proxy (meta, NULL);
|
gst_vaapi_video_meta_set_surface_proxy (meta, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,20 +56,6 @@ typedef struct _GstVaapiVideoBufferPoolPrivate GstVaapiVideoBufferPoolPrivate;
|
||||||
#define GST_BUFFER_POOL_OPTION_VAAPI_VIDEO_META \
|
#define GST_BUFFER_POOL_OPTION_VAAPI_VIDEO_META \
|
||||||
"GstBufferPoolOptionVaapiVideoMeta"
|
"GstBufferPoolOptionVaapiVideoMeta"
|
||||||
|
|
||||||
/**
|
|
||||||
* GstVaapiVideoBufferPoolAcquireFlags:
|
|
||||||
* @GST_VAAPI_VIDEO_BUFFER_POOL_ACQUIRE_FLAG_NO_ALLOC: option to
|
|
||||||
* request that vaapi video metadata are not initially allocated,
|
|
||||||
* but are subsequently provided by the user.
|
|
||||||
*
|
|
||||||
* The set of #GstVaapiVideoBufferPool specific flags for
|
|
||||||
* gst_buffer_pool_acquire_buffer().
|
|
||||||
*/
|
|
||||||
typedef enum {
|
|
||||||
GST_VAAPI_VIDEO_BUFFER_POOL_ACQUIRE_FLAG_NO_ALLOC =
|
|
||||||
GST_BUFFER_POOL_ACQUIRE_FLAG_LAST << 0,
|
|
||||||
} GstVaapiVideoBufferPoolAcquireFlags;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GstVaapiVideoBufferPoolOption:
|
* GstVaapiVideoBufferPoolOption:
|
||||||
* @GST_VAAPI_VIDEO_BUFFER_POOL_OPTION_VIDEO_META:
|
* @GST_VAAPI_VIDEO_BUFFER_POOL_OPTION_VIDEO_META:
|
||||||
|
|
Loading…
Reference in a new issue