mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
gl/bufferpool: add api for retrieving the configure gl allocation params
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1071>
This commit is contained in:
parent
2f35aeca8c
commit
94f0d9c69b
2 changed files with 28 additions and 0 deletions
|
@ -379,6 +379,31 @@ gst_gl_buffer_pool_finalize (GObject * object)
|
||||||
priv->gl_params = NULL;
|
priv->gl_params = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gst_gl_buffer_pool_get_gl_allocation_params:
|
||||||
|
* @pool: the #GstGLBufferPool
|
||||||
|
*
|
||||||
|
* The returned #GstGLAllocationParams will by %NULL before the first successful
|
||||||
|
* call to gst_buffer_pool_set_config(). Subsequent successful calls to
|
||||||
|
* gst_buffer_pool_set_config() will cause this function to return a new
|
||||||
|
* #GstGLAllocationParams which may or may not contain the same information.
|
||||||
|
*
|
||||||
|
* Returns: (transfer full): a copy of the #GstGLAllocationParams being used by the @pool
|
||||||
|
*
|
||||||
|
* Since: 1.20
|
||||||
|
*/
|
||||||
|
GstGLAllocationParams *
|
||||||
|
gst_gl_buffer_pool_get_gl_allocation_params (GstGLBufferPool * pool)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GST_IS_GL_BUFFER_POOL (pool), NULL);
|
||||||
|
|
||||||
|
if (pool->priv->gl_params)
|
||||||
|
return gst_gl_allocation_params_copy ((GstGLAllocationParams *) pool->
|
||||||
|
priv->gl_params);
|
||||||
|
else
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_buffer_pool_config_get_gl_allocation_params:
|
* gst_buffer_pool_config_get_gl_allocation_params:
|
||||||
* @config: a buffer pool config
|
* @config: a buffer pool config
|
||||||
|
|
|
@ -69,6 +69,9 @@ struct _GstGLBufferPoolClass
|
||||||
GST_GL_API
|
GST_GL_API
|
||||||
GstBufferPool *gst_gl_buffer_pool_new (GstGLContext * context);
|
GstBufferPool *gst_gl_buffer_pool_new (GstGLContext * context);
|
||||||
|
|
||||||
|
GST_GL_API
|
||||||
|
GstGLAllocationParams * gst_gl_buffer_pool_get_gl_allocation_params (GstGLBufferPool * pool);
|
||||||
|
|
||||||
GST_GL_API
|
GST_GL_API
|
||||||
GstGLAllocationParams * gst_buffer_pool_config_get_gl_allocation_params (GstStructure * config);
|
GstGLAllocationParams * gst_buffer_pool_config_get_gl_allocation_params (GstStructure * config);
|
||||||
GST_GL_API
|
GST_GL_API
|
||||||
|
|
Loading…
Reference in a new issue