mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +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;
|
||||
GstBuffer *buffer;
|
||||
|
||||
const gboolean alloc_vaapi_video_meta = !params ||
|
||||
!(params->flags & GST_VAAPI_VIDEO_BUFFER_POOL_ACQUIRE_FLAG_NO_ALLOC);
|
||||
|
||||
if (!priv->allocator)
|
||||
goto error_no_allocator;
|
||||
|
||||
if (alloc_vaapi_video_meta) {
|
||||
meta = gst_vaapi_video_meta_new (priv->display);
|
||||
if (!meta)
|
||||
goto error_create_meta;
|
||||
meta = gst_vaapi_video_meta_new (priv->display);
|
||||
if (!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)
|
||||
goto error_create_buffer;
|
||||
|
||||
|
@ -487,8 +480,8 @@ gst_vaapi_video_buffer_pool_reset_buffer (GstBufferPool * pool,
|
|||
* While surface is passed, we should clear it to avoid wrong
|
||||
* reference. */
|
||||
meta = gst_buffer_get_vaapi_video_meta (buffer);
|
||||
if (meta)
|
||||
gst_vaapi_video_meta_set_surface_proxy (meta, NULL);
|
||||
g_assert (meta);
|
||||
gst_vaapi_video_meta_set_surface_proxy (meta, NULL);
|
||||
}
|
||||
|
||||
GST_BUFFER_POOL_CLASS (gst_vaapi_video_buffer_pool_parent_class)->reset_buffer
|
||||
|
|
|
@ -56,20 +56,6 @@ typedef struct _GstVaapiVideoBufferPoolPrivate GstVaapiVideoBufferPoolPrivate;
|
|||
#define GST_BUFFER_POOL_OPTION_VAAPI_VIDEO_META \
|
||||
"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:
|
||||
* @GST_VAAPI_VIDEO_BUFFER_POOL_OPTION_VIDEO_META:
|
||||
|
|
Loading…
Reference in a new issue