mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 01:45:33 +00:00
bufferpool changes (next commit will update plugins)
Original commit message from CVS: bufferpool changes (next commit will update plugins)
This commit is contained in:
parent
351d186581
commit
5a22a8c8e6
4 changed files with 115 additions and 109 deletions
|
@ -90,9 +90,17 @@ gst_buffer_new(void)
|
||||||
* Returns: new buffer
|
* Returns: new buffer
|
||||||
*/
|
*/
|
||||||
GstBuffer*
|
GstBuffer*
|
||||||
gst_buffer_new_from_pool (GstBufferPool *pool)
|
gst_buffer_new_from_pool (GstBufferPool *pool, guint64 location, gint size)
|
||||||
{
|
{
|
||||||
return gst_buffer_pool_new_buffer (pool);
|
GstBuffer *buffer;
|
||||||
|
|
||||||
|
g_return_val_if_fail (pool != NULL, NULL);
|
||||||
|
g_return_val_if_fail (pool->new_buffer != NULL, NULL);
|
||||||
|
|
||||||
|
buffer = pool->new_buffer (pool, location, size, pool->new_buffer_user_data);
|
||||||
|
buffer->pool = pool;
|
||||||
|
|
||||||
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -220,6 +228,13 @@ void gst_buffer_destroy (GstBuffer *buffer)
|
||||||
|
|
||||||
g_return_if_fail (buffer != NULL);
|
g_return_if_fail (buffer != NULL);
|
||||||
|
|
||||||
|
if (buffer->pool) {
|
||||||
|
GST_INFO (GST_CAT_BUFFER,"calling %sbuffer %p\'s pool destroy function", (buffer->parent?"sub":""),buffer);
|
||||||
|
buffer->pool->destroy_buffer(buffer->pool, buffer,
|
||||||
|
buffer->pool->destroy_buffer_user_data);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
GST_INFO (GST_CAT_BUFFER,"freeing %sbuffer %p", (buffer->parent?"sub":""),buffer);
|
GST_INFO (GST_CAT_BUFFER,"freeing %sbuffer %p", (buffer->parent?"sub":""),buffer);
|
||||||
|
|
||||||
// free the data only if there is some, DONTFREE isn't set, and not sub
|
// free the data only if there is some, DONTFREE isn't set, and not sub
|
||||||
|
@ -324,15 +339,8 @@ gst_buffer_unref (GstBuffer *buffer)
|
||||||
|
|
||||||
/* if we ended up with the refcount at zero, destroy the buffer */
|
/* if we ended up with the refcount at zero, destroy the buffer */
|
||||||
if (zero) {
|
if (zero) {
|
||||||
// if it came from a pool, give it back
|
|
||||||
if (buffer->pool != NULL) {
|
|
||||||
gst_buffer_pool_destroy_buffer (buffer->pool, buffer);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
gst_buffer_destroy (buffer);
|
gst_buffer_destroy (buffer);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -135,7 +135,7 @@ struct _GstBuffer {
|
||||||
void _gst_buffer_initialize (void);
|
void _gst_buffer_initialize (void);
|
||||||
/* creating a new buffer from scratch */
|
/* creating a new buffer from scratch */
|
||||||
GstBuffer* gst_buffer_new (void);
|
GstBuffer* gst_buffer_new (void);
|
||||||
GstBuffer* gst_buffer_new_from_pool (GstBufferPool *pool);
|
GstBuffer* gst_buffer_new_from_pool (GstBufferPool *pool, guint64 location, gint size);
|
||||||
|
|
||||||
/* creating a subbuffer */
|
/* creating a subbuffer */
|
||||||
GstBuffer* gst_buffer_create_sub (GstBuffer *parent, guint32 offset, guint32 size);
|
GstBuffer* gst_buffer_create_sub (GstBuffer *parent, guint32 offset, guint32 size);
|
||||||
|
|
|
@ -28,8 +28,15 @@
|
||||||
static GMutex *_default_pool_lock;
|
static GMutex *_default_pool_lock;
|
||||||
static GHashTable *_default_pools;
|
static GHashTable *_default_pools;
|
||||||
|
|
||||||
static GstBuffer* gst_buffer_pool_default_create (GstBufferPool *pool, gpointer user_data);
|
static GstBuffer* gst_buffer_pool_default_buffer_create (GstBufferPool *pool, guint64 location, gint size, gpointer user_data);
|
||||||
static void gst_buffer_pool_default_destroy (GstBufferPool *pool, GstBuffer *buffer, gpointer user_data);
|
static void gst_buffer_pool_default_buffer_destroy (GstBufferPool *pool, GstBuffer *buffer, gpointer user_data);
|
||||||
|
static void gst_buffer_pool_default_pool_destroy_hook (GstBufferPool *pool, gpointer user_data);
|
||||||
|
|
||||||
|
typedef struct _GstBufferPoolDefault GstBufferPoolDefault;
|
||||||
|
|
||||||
|
struct _GstBufferPoolDefault {
|
||||||
|
guint size;
|
||||||
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
_gst_buffer_pool_initialize (void)
|
_gst_buffer_pool_initialize (void)
|
||||||
|
@ -50,11 +57,11 @@ gst_buffer_pool_new (void)
|
||||||
{
|
{
|
||||||
GstBufferPool *pool;
|
GstBufferPool *pool;
|
||||||
|
|
||||||
pool = g_malloc (sizeof(GstBufferPool));
|
pool = g_new0 (GstBufferPool, 1);
|
||||||
GST_DEBUG (0,"BUF: allocating new buffer pool %p\n", pool);
|
GST_DEBUG (GST_CAT_BUFFER,"allocating new buffer pool %p\n", pool);
|
||||||
|
|
||||||
|
/* all hooks and user data set to NULL or 0 by g_new0 */
|
||||||
|
|
||||||
pool->new_buffer = NULL;
|
|
||||||
pool->destroy_buffer = NULL;
|
|
||||||
pool->lock = g_mutex_new ();
|
pool->lock = g_mutex_new ();
|
||||||
#ifdef HAVE_ATOMIC_H
|
#ifdef HAVE_ATOMIC_H
|
||||||
atomic_set (&pool->refcount, 1);
|
atomic_set (&pool->refcount, 1);
|
||||||
|
@ -76,7 +83,7 @@ gst_buffer_pool_ref (GstBufferPool *pool)
|
||||||
{
|
{
|
||||||
g_return_if_fail (pool != NULL);
|
g_return_if_fail (pool != NULL);
|
||||||
|
|
||||||
GST_DEBUG(0,"referencing buffer pool %p from %d\n", pool, GST_BUFFER_POOL_REFCOUNT(pool));
|
GST_DEBUG(GST_CAT_BUFFER,"referencing buffer pool %p from %d\n", pool, GST_BUFFER_POOL_REFCOUNT(pool));
|
||||||
|
|
||||||
#ifdef HAVE_ATOMIC_H
|
#ifdef HAVE_ATOMIC_H
|
||||||
atomic_inc (&(pool->refcount));
|
atomic_inc (&(pool->refcount));
|
||||||
|
@ -127,7 +134,7 @@ gst_buffer_pool_unref (GstBufferPool *pool)
|
||||||
|
|
||||||
g_return_if_fail (pool != NULL);
|
g_return_if_fail (pool != NULL);
|
||||||
|
|
||||||
GST_DEBUG(0,"unreferencing buffer pool %p from %d\n", pool, GST_BUFFER_POOL_REFCOUNT(pool));
|
GST_DEBUG(GST_CAT_BUFFER, "unreferencing buffer pool %p from %d\n", pool, GST_BUFFER_POOL_REFCOUNT(pool));
|
||||||
|
|
||||||
#ifdef HAVE_ATOMIC_H
|
#ifdef HAVE_ATOMIC_H
|
||||||
g_return_if_fail (atomic_read (&(pool->refcount)) > 0);
|
g_return_if_fail (atomic_read (&(pool->refcount)) > 0);
|
||||||
|
@ -147,8 +154,8 @@ gst_buffer_pool_unref (GstBufferPool *pool)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_buffer_pool_set_create_function:
|
* gst_buffer_pool_set_buffer_create_function:
|
||||||
* @pool: the pool to set the create function for
|
* @pool: the pool to set the buffer create function for
|
||||||
* @create: the create function
|
* @create: the create function
|
||||||
* @user_data: any user data to be passed in the create function
|
* @user_data: any user data to be passed in the create function
|
||||||
*
|
*
|
||||||
|
@ -156,98 +163,73 @@ gst_buffer_pool_unref (GstBufferPool *pool)
|
||||||
* from this pool.
|
* from this pool.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gst_buffer_pool_set_create_function (GstBufferPool *pool,
|
gst_buffer_pool_set_buffer_create_function (GstBufferPool *pool,
|
||||||
GstBufferPoolCreateFunction create,
|
GstBufferPoolBufferCreateFunction create,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
g_return_if_fail (pool != NULL);
|
g_return_if_fail (pool != NULL);
|
||||||
|
|
||||||
pool->new_buffer = create;
|
pool->new_buffer = create;
|
||||||
pool->new_user_data = user_data;
|
pool->new_buffer_user_data = user_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_buffer_pool_set_destroy_function:
|
* gst_buffer_pool_set_buffer_destroy_function:
|
||||||
* @pool: the pool to set the destroy function for
|
* @pool: the pool to set the buffer destroy function for
|
||||||
* @destroy: the destroy function
|
* @destroy: the destroy function
|
||||||
* @user_data: any user data to be passed in the create function
|
* @user_data: any user data to be passed to the destroy function
|
||||||
*
|
*
|
||||||
* Sets the function that will be called when a buffer is destroyed
|
* Sets the function that will be called when a buffer is destroyed
|
||||||
* from this pool.
|
* from this pool.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gst_buffer_pool_set_destroy_function (GstBufferPool *pool,
|
gst_buffer_pool_set_buffer_destroy_function (GstBufferPool *pool,
|
||||||
GstBufferPoolDestroyFunction destroy,
|
GstBufferPoolBufferDestroyFunction destroy,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
g_return_if_fail (pool != NULL);
|
g_return_if_fail (pool != NULL);
|
||||||
|
|
||||||
pool->destroy_buffer = destroy;
|
pool->destroy_buffer = destroy;
|
||||||
pool->destroy_user_data = user_data;
|
pool->destroy_buffer_user_data = user_data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gst_buffer_pool_set_pool_destroy_hook:
|
||||||
|
* @pool: the pool to set the destroy hook for
|
||||||
|
* @destroy: the destroy function
|
||||||
|
* @user_data: any user data to be passed to the destroy hook
|
||||||
|
*
|
||||||
|
* Sets the function that will be called before a bufferpool is destroyed.
|
||||||
|
* You can take care of you private_data here.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
gst_buffer_pool_set_pool_destroy_hook (GstBufferPool *pool,
|
||||||
|
GstBufferPoolPoolDestroyHook destroy,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
g_return_if_fail (pool != NULL);
|
||||||
|
|
||||||
|
pool->destroy_pool_hook = destroy;
|
||||||
|
pool->destroy_pool_user_data = user_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_buffer_pool_destroy:
|
* gst_buffer_pool_destroy:
|
||||||
* @pool: the pool to destroy
|
* @pool: the pool to destroy
|
||||||
*
|
*
|
||||||
* Frees the memory for this bufferpool.
|
* Frees the memory for this bufferpool, calls the destroy hook.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gst_buffer_pool_destroy (GstBufferPool *pool)
|
gst_buffer_pool_destroy (GstBufferPool *pool)
|
||||||
{
|
{
|
||||||
GMemChunk *data_chunk;
|
|
||||||
g_return_if_fail (pool != NULL);
|
g_return_if_fail (pool != NULL);
|
||||||
|
|
||||||
// if its a default buffer pool, we know how to free the user data
|
if (pool->destroy_pool_hook)
|
||||||
if (pool->new_buffer == gst_buffer_pool_default_create &&
|
pool->destroy_pool_hook (pool, pool->destroy_pool_user_data);
|
||||||
pool->destroy_buffer == gst_buffer_pool_default_destroy){
|
|
||||||
GST_DEBUG(0,"destroying default buffer pool %p\n", pool);
|
|
||||||
data_chunk = (GMemChunk*)pool->new_user_data;
|
|
||||||
g_mem_chunk_reset(data_chunk);
|
|
||||||
g_free(data_chunk);
|
|
||||||
}
|
|
||||||
|
|
||||||
g_free(pool);
|
g_free(pool);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_buffer_pool_new_buffer:
|
|
||||||
* @pool: the pool to create the buffer from
|
|
||||||
*
|
|
||||||
* Uses the given pool to create a new buffer.
|
|
||||||
*
|
|
||||||
* Returns: The new buffer
|
|
||||||
*/
|
|
||||||
GstBuffer*
|
|
||||||
gst_buffer_pool_new_buffer (GstBufferPool *pool)
|
|
||||||
{
|
|
||||||
GstBuffer *buffer;
|
|
||||||
|
|
||||||
g_return_val_if_fail (pool != NULL, NULL);
|
|
||||||
|
|
||||||
buffer = pool->new_buffer (pool, pool->new_user_data);
|
|
||||||
buffer->pool = pool;
|
|
||||||
|
|
||||||
return buffer;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_buffer_pool_destroy_buffer:
|
|
||||||
* @pool: the pool to return the buffer to
|
|
||||||
* @buffer: the buffer to return to the pool
|
|
||||||
*
|
|
||||||
* Gives a buffer back to the given pool.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
gst_buffer_pool_destroy_buffer (GstBufferPool *pool,
|
|
||||||
GstBuffer *buffer)
|
|
||||||
{
|
|
||||||
g_return_if_fail (pool != NULL);
|
|
||||||
g_return_if_fail (buffer != NULL);
|
|
||||||
|
|
||||||
pool->destroy_buffer (pool, buffer, pool->new_user_data);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_buffer_pool_get_default:
|
* gst_buffer_pool_get_default:
|
||||||
* @oldpool: instance of GstBufferPool which is no longer required (or NULL if it doesn't exist)
|
* @oldpool: instance of GstBufferPool which is no longer required (or NULL if it doesn't exist)
|
||||||
|
@ -293,14 +275,15 @@ gst_buffer_pool_get_default (GstBufferPool *oldpool, guint buffer_size, guint po
|
||||||
real_buffer_size * pool_size, G_ALLOC_AND_FREE);
|
real_buffer_size * pool_size, G_ALLOC_AND_FREE);
|
||||||
|
|
||||||
pool = gst_buffer_pool_new();
|
pool = gst_buffer_pool_new();
|
||||||
gst_buffer_pool_set_create_function (pool, gst_buffer_pool_default_create, data_chunk);
|
gst_buffer_pool_set_buffer_create_function (pool, gst_buffer_pool_default_buffer_create, data_chunk);
|
||||||
gst_buffer_pool_set_destroy_function (pool, gst_buffer_pool_default_destroy, data_chunk);
|
gst_buffer_pool_set_buffer_destroy_function (pool, gst_buffer_pool_default_buffer_destroy, data_chunk);
|
||||||
|
gst_buffer_pool_set_pool_destroy_hook (pool, gst_buffer_pool_default_pool_destroy_hook, data_chunk);
|
||||||
|
|
||||||
g_mutex_lock (_default_pool_lock);
|
g_mutex_lock (_default_pool_lock);
|
||||||
g_hash_table_insert(_default_pools,GINT_TO_POINTER(real_buffer_size),pool);
|
g_hash_table_insert(_default_pools,GINT_TO_POINTER(real_buffer_size),pool);
|
||||||
g_mutex_unlock (_default_pool_lock);
|
g_mutex_unlock (_default_pool_lock);
|
||||||
|
|
||||||
GST_DEBUG(0,"new buffer pool %p bytes:%d size:%d\n", pool, real_buffer_size, pool_size);
|
GST_DEBUG(GST_CAT_BUFFER,"new buffer pool %p bytes:%d size:%d\n", pool, real_buffer_size, pool_size);
|
||||||
|
|
||||||
if (oldpool != NULL){
|
if (oldpool != NULL){
|
||||||
gst_buffer_pool_unref(oldpool);
|
gst_buffer_pool_unref(oldpool);
|
||||||
|
@ -309,15 +292,16 @@ gst_buffer_pool_get_default (GstBufferPool *oldpool, guint buffer_size, guint po
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstBuffer*
|
static GstBuffer*
|
||||||
gst_buffer_pool_default_create (GstBufferPool *pool, gpointer user_data)
|
gst_buffer_pool_default_buffer_create (GstBufferPool *pool, guint64 location /*unused*/,
|
||||||
|
gint size /*unused*/, gpointer user_data)
|
||||||
{
|
{
|
||||||
GMemChunk *data_chunk = (GMemChunk*)user_data;
|
GMemChunk *data_chunk = (GMemChunk*)user_data;
|
||||||
GstBuffer *buffer;
|
GstBuffer *buffer;
|
||||||
|
|
||||||
gst_buffer_pool_ref(pool);
|
gst_buffer_pool_ref(pool);
|
||||||
buffer = gst_buffer_new();
|
buffer = gst_buffer_new();
|
||||||
|
GST_INFO (GST_CAT_BUFFER,"creating new buffer %p from pool %p",buffer,pool);
|
||||||
GST_BUFFER_FLAG_SET(buffer,GST_BUFFER_DONTFREE);
|
GST_BUFFER_FLAG_SET(buffer,GST_BUFFER_DONTFREE);
|
||||||
buffer->pool = pool;
|
|
||||||
|
|
||||||
g_mutex_lock (pool->lock);
|
g_mutex_lock (pool->lock);
|
||||||
GST_BUFFER_DATA(buffer) = g_mem_chunk_alloc(data_chunk);
|
GST_BUFFER_DATA(buffer) = g_mem_chunk_alloc(data_chunk);
|
||||||
|
@ -327,7 +311,7 @@ gst_buffer_pool_default_create (GstBufferPool *pool, gpointer user_data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_buffer_pool_default_destroy (GstBufferPool *pool, GstBuffer *buffer, gpointer user_data)
|
gst_buffer_pool_default_buffer_destroy (GstBufferPool *pool, GstBuffer *buffer, gpointer user_data)
|
||||||
{
|
{
|
||||||
GMemChunk *data_chunk = (GMemChunk*)user_data;
|
GMemChunk *data_chunk = (GMemChunk*)user_data;
|
||||||
gpointer data = GST_BUFFER_DATA(buffer);
|
gpointer data = GST_BUFFER_DATA(buffer);
|
||||||
|
@ -339,5 +323,15 @@ gst_buffer_pool_default_destroy (GstBufferPool *pool, GstBuffer *buffer, gpointe
|
||||||
buffer->pool = NULL;
|
buffer->pool = NULL;
|
||||||
gst_buffer_pool_unref(pool);
|
gst_buffer_pool_unref(pool);
|
||||||
gst_buffer_destroy (buffer);
|
gst_buffer_destroy (buffer);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gst_buffer_pool_default_pool_destroy_hook (GstBufferPool *pool, gpointer user_data)
|
||||||
|
{
|
||||||
|
GMemChunk *data_chunk = (GMemChunk*)user_data;
|
||||||
|
|
||||||
|
GST_DEBUG(GST_CAT_BUFFER,"destroying default buffer pool %p\n", pool);
|
||||||
|
g_mem_chunk_reset(data_chunk);
|
||||||
|
g_free(data_chunk);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,8 +38,9 @@ extern "C" {
|
||||||
|
|
||||||
typedef struct _GstBufferPool GstBufferPool;
|
typedef struct _GstBufferPool GstBufferPool;
|
||||||
|
|
||||||
typedef GstBuffer* (*GstBufferPoolCreateFunction) (GstBufferPool *pool, gpointer user_data);
|
typedef GstBuffer* (*GstBufferPoolBufferCreateFunction) (GstBufferPool *pool, guint64 location, gint size, gpointer user_data);
|
||||||
typedef void (*GstBufferPoolDestroyFunction) (GstBufferPool *pool, GstBuffer *buffer, gpointer user_data);
|
typedef void (*GstBufferPoolBufferDestroyFunction) (GstBufferPool *pool, GstBuffer *buffer, gpointer user_data);
|
||||||
|
typedef void (*GstBufferPoolPoolDestroyHook) (GstBufferPool *pool, gpointer user_data);
|
||||||
|
|
||||||
struct _GstBufferPool {
|
struct _GstBufferPool {
|
||||||
/* locking */
|
/* locking */
|
||||||
|
@ -55,13 +56,17 @@ struct _GstBufferPool {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* will be called when a new buffer is to be created */
|
/* will be called when a new buffer is to be created */
|
||||||
GstBufferPoolCreateFunction new_buffer;
|
GstBufferPoolBufferCreateFunction new_buffer;
|
||||||
/* user data to pass with the new_buffer function */
|
/* user data to pass with the new_buffer function */
|
||||||
gpointer new_user_data;
|
gpointer new_buffer_user_data;
|
||||||
|
|
||||||
gpointer destroy_user_data;
|
GstBufferPoolBufferDestroyFunction destroy_buffer;
|
||||||
GstBufferPoolDestroyFunction destroy_buffer;
|
gpointer destroy_buffer_user_data;
|
||||||
|
|
||||||
|
GstBufferPoolPoolDestroyHook destroy_pool_hook;
|
||||||
|
gpointer destroy_pool_user_data;
|
||||||
|
|
||||||
|
gpointer private_data;
|
||||||
};
|
};
|
||||||
|
|
||||||
void _gst_buffer_pool_initialize (void);
|
void _gst_buffer_pool_initialize (void);
|
||||||
|
@ -69,21 +74,20 @@ void _gst_buffer_pool_initialize (void);
|
||||||
/* creating a new buffer pool from scratch */
|
/* creating a new buffer pool from scratch */
|
||||||
GstBufferPool* gst_buffer_pool_new (void);
|
GstBufferPool* gst_buffer_pool_new (void);
|
||||||
|
|
||||||
/* creating a buffer from the pool */
|
|
||||||
GstBuffer* gst_buffer_pool_new_buffer (GstBufferPool *pool);
|
|
||||||
void gst_buffer_pool_destroy_buffer (GstBufferPool *pool, GstBuffer *buffer);
|
|
||||||
|
|
||||||
/* refcounting */
|
/* refcounting */
|
||||||
void gst_buffer_pool_ref (GstBufferPool *pool);
|
void gst_buffer_pool_ref (GstBufferPool *pool);
|
||||||
void gst_buffer_pool_ref_by_count (GstBufferPool *pool, int count);
|
void gst_buffer_pool_ref_by_count (GstBufferPool *pool, int count);
|
||||||
void gst_buffer_pool_unref (GstBufferPool *buffer);
|
void gst_buffer_pool_unref (GstBufferPool *buffer);
|
||||||
|
|
||||||
/* setting create and destroy functions */
|
/* setting create and destroy functions */
|
||||||
void gst_buffer_pool_set_create_function (GstBufferPool *pool,
|
void gst_buffer_pool_set_buffer_create_function (GstBufferPool *pool,
|
||||||
GstBufferPoolCreateFunction create,
|
GstBufferPoolBufferCreateFunction create,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
void gst_buffer_pool_set_destroy_function (GstBufferPool *pool,
|
void gst_buffer_pool_set_buffer_destroy_function (GstBufferPool *pool,
|
||||||
GstBufferPoolDestroyFunction destroy,
|
GstBufferPoolBufferDestroyFunction destroy,
|
||||||
|
gpointer user_data);
|
||||||
|
void gst_buffer_pool_set_pool_destroy_hook (GstBufferPool *pool,
|
||||||
|
GstBufferPoolPoolDestroyHook destroy,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|
||||||
/* destroying the buffer pool */
|
/* destroying the buffer pool */
|
||||||
|
|
Loading…
Reference in a new issue