Name
GstBufferPool -- Create buffers from a pool
Description
A bufferpool is used to create buffers in an efficient way. En element
can maintain a bufferpool with a fixed number of buffers. This will reduce
the g_malloc and g_free overhead.
A bufferpool can also be used to implement direct access. A bufferpool can be
sent from one element to another so that the latter can directly write into
the memory of the element that maintains the bufferpool. This can greatly reduce
the number of memcpy operations.
Details
struct GstBufferPool
struct GstBufferPool {
/* will be called when a new buffer is to be created */
GstBufferPoolCreateFunction new_buffer;
/* user data to pass with the new_buffer function */
gpointer new_user_data;
gpointer destroy_user_data;
GstBufferPoolDestroyFunction destroy_buffer;
}; |
GstBufferPoolCreateFunction ()
The function called when a buffer has to be created for this pool.
GstBufferPoolDestroyFunction ()
This function will be called when the given buffer has to be returned to
the pool.
gst_buffer_pool_new ()
Create a new buffer pool.
gst_buffer_pool_new_buffer ()
Uses the given pool to create a new buffer.
gst_buffer_pool_destroy_buffer ()
Gives a buffer back to the given pool.
gst_buffer_pool_set_create_function ()
Sets the function that will be called when a buffer is created
from this pool.
gst_buffer_pool_set_destroy_function ()
Sets the function that will be called when a buffer is destroyed
from this pool.
gst_buffer_pool_destroy ()
Frees the memory for this bufferpool.