Commit 9a1cd171 authored by Wim Taymans's avatar Wim Taymans
Browse files

GstBufferPoolParams -> GstBufferPoolAcquireParams

Because those flags are not from the bufferpool but for the acquire function.
parent 85c95438
......@@ -720,7 +720,7 @@ init_post (GOptionContext * context, GOptionGroup * group, gpointer data,
g_type_class_ref (gst_parse_flags_get_type ());
g_type_class_ref (gst_search_mode_get_type ());
g_type_class_ref (gst_progress_type_get_type ());
g_type_class_ref (gst_buffer_pool_flags_get_type ());
g_type_class_ref (gst_buffer_pool_acquire_flags_get_type ());
g_type_class_ref (gst_memory_flags_get_type ());
g_type_class_ref (gst_map_flags_get_type ());
g_type_class_ref (gst_caps_intersect_mode_get_type ());
......@@ -1083,7 +1083,8 @@ gst_deinit (void)
g_type_class_unref (g_type_class_peek (gst_parse_error_get_type ()));
g_type_class_unref (g_type_class_peek (gst_param_spec_fraction_get_type ()));
g_type_class_unref (g_type_class_peek (gst_progress_type_get_type ()));
g_type_class_unref (g_type_class_peek (gst_buffer_pool_flags_get_type ()));
g_type_class_unref (g_type_class_peek (gst_buffer_pool_acquire_flags_get_type
()));
g_type_class_unref (g_type_class_peek (gst_memory_flags_get_type ()));
g_type_class_unref (g_type_class_peek (gst_map_flags_get_type ()));
g_type_class_unref (g_type_class_peek (gst_caps_intersect_mode_get_type ()));
......
......@@ -87,11 +87,11 @@ static gboolean default_stop (GstBufferPool * pool);
static gboolean default_set_config (GstBufferPool * pool,
GstStructure * config);
static GstFlowReturn default_alloc_buffer (GstBufferPool * pool,
GstBuffer ** buffer, GstBufferPoolParams * params);
GstBuffer ** buffer, GstBufferPoolAcquireParams * params);
static GstFlowReturn default_acquire_buffer (GstBufferPool * pool,
GstBuffer ** buffer, GstBufferPoolParams * params);
GstBuffer ** buffer, GstBufferPoolAcquireParams * params);
static void default_reset_buffer (GstBufferPool * pool, GstBuffer * buffer,
GstBufferPoolParams * params);
GstBufferPoolAcquireParams * params);
static void default_free_buffer (GstBufferPool * pool, GstBuffer * buffer);
static void default_release_buffer (GstBufferPool * pool, GstBuffer * buffer);
......@@ -176,7 +176,7 @@ gst_buffer_pool_new (void)
static GstFlowReturn
default_alloc_buffer (GstBufferPool * pool, GstBuffer ** buffer,
GstBufferPoolParams * params)
GstBufferPoolAcquireParams * params)
{
GstBufferPoolPrivate *priv = pool->priv;
......@@ -799,7 +799,7 @@ gst_buffer_pool_config_get (GstStructure * config, const GstCaps ** caps,
static GstFlowReturn
default_acquire_buffer (GstBufferPool * pool, GstBuffer ** buffer,
GstBufferPoolParams * params)
GstBufferPoolAcquireParams * params)
{
GstFlowReturn result;
GstBufferPoolClass *pclass;
......@@ -836,7 +836,7 @@ default_acquire_buffer (GstBufferPool * pool, GstBuffer ** buffer,
}
/* check if we need to wait */
if (params && (params->flags & GST_BUFFER_POOL_FLAG_DONTWAIT)) {
if (params && (params->flags & GST_BUFFER_POOL_ACQUIRE_FLAG_DONTWAIT)) {
GST_LOG_OBJECT (pool, "no more buffers");
result = GST_FLOW_EOS;
break;
......@@ -885,7 +885,7 @@ remove_meta_unpooled (GstBuffer * buffer, GstMeta ** meta, gpointer user_data)
static void
default_reset_buffer (GstBufferPool * pool, GstBuffer * buffer,
GstBufferPoolParams * params)
GstBufferPoolAcquireParams * params)
{
GST_BUFFER_FLAGS (buffer) = 0;
......@@ -915,7 +915,7 @@ default_reset_buffer (GstBufferPool * pool, GstBuffer * buffer,
*/
GstFlowReturn
gst_buffer_pool_acquire_buffer (GstBufferPool * pool, GstBuffer ** buffer,
GstBufferPoolParams * params)
GstBufferPoolAcquireParams * params)
{
GstBufferPoolClass *pclass;
GstFlowReturn result;
......
......@@ -41,27 +41,27 @@ typedef struct _GstBufferPoolClass GstBufferPoolClass;
#define GST_BUFFER_POOL_CAST(obj) ((GstBufferPool *)(obj))
/**
* GstBufferPoolFlags:
* @GST_BUFFER_POOL_FLAG_NONE: no flags
* @GST_BUFFER_POOL_FLAG_KEY_UNIT: buffer is keyframe
* @GST_BUFFER_POOL_FLAG_DONTWAIT: don't wait for buffer. This makes the
* GstBufferPoolAcquireFlags:
* @GST_BUFFER_POOL_ACQUIRE_FLAG_NONE: no flags
* @GST_BUFFER_POOL_ACQUIRE_FLAG_KEY_UNIT: buffer is keyframe
* @GST_BUFFER_POOL_ACQUIRE_FLAG_DONTWAIT: don't wait for buffer. This makes the
* acquire_buffer method return GST_FLOW_UNEXPECTED.
* @GST_BUFFER_POOL_FLAG_DISCONT: buffer is discont
* @GST_BUFFER_POOL_FLAG_LAST: last flag, subclasses can use private flags
* @GST_BUFFER_POOL_ACQUIRE_FLAG_DISCONT: buffer is discont
* @GST_BUFFER_POOL_ACQUIRE_FLAG_LAST: last flag, subclasses can use private flags
* starting from this value.
*
* Additional flags to control the allocation of a buffer
*/
typedef enum {
GST_BUFFER_POOL_FLAG_NONE = 0,
GST_BUFFER_POOL_FLAG_KEY_UNIT = (1 << 0),
GST_BUFFER_POOL_FLAG_DONTWAIT = (1 << 1),
GST_BUFFER_POOL_FLAG_DISCONT = (1 << 2),
GST_BUFFER_POOL_FLAG_LAST = (1 << 16),
} GstBufferPoolFlags;
GST_BUFFER_POOL_ACQUIRE_FLAG_NONE = 0,
GST_BUFFER_POOL_ACQUIRE_FLAG_KEY_UNIT = (1 << 0),
GST_BUFFER_POOL_ACQUIRE_FLAG_DONTWAIT = (1 << 1),
GST_BUFFER_POOL_ACQUIRE_FLAG_DISCONT = (1 << 2),
GST_BUFFER_POOL_ACQUIRE_FLAG_LAST = (1 << 16),
} GstBufferPoolAcquireFlags;
/**
* GstBufferPoolParams:
* GstBufferPoolAcquireParams:
* @format: the format of @start and @stop
* @start: the start position
* @stop: the stop position
......@@ -74,15 +74,15 @@ typedef enum {
* implementations can use this extra information to decide what buffer to
* return.
*/
typedef struct _GstBufferPoolParams {
GstFormat format;
gint64 start;
gint64 stop;
GstBufferPoolFlags flags;
typedef struct _GstBufferPoolAcquireParams {
GstFormat format;
gint64 start;
gint64 stop;
GstBufferPoolAcquireFlags flags;
/*< private >*/
gpointer _gst_reserved[GST_PADDING];
} GstBufferPoolParams;
} GstBufferPoolAcquireParams;
/**
* GST_BUFFER_POOL_IS_FLUSHING:
......@@ -152,11 +152,11 @@ struct _GstBufferPoolClass {
gboolean (*stop) (GstBufferPool *pool);
GstFlowReturn (*acquire_buffer) (GstBufferPool *pool, GstBuffer **buffer,
GstBufferPoolParams *params);
GstBufferPoolAcquireParams *params);
GstFlowReturn (*alloc_buffer) (GstBufferPool *pool, GstBuffer **buffer,
GstBufferPoolParams *params);
GstBufferPoolAcquireParams *params);
void (*reset_buffer) (GstBufferPool *pool, GstBuffer *buffer,
GstBufferPoolParams *params);
GstBufferPoolAcquireParams *params);
void (*release_buffer) (GstBufferPool *pool, GstBuffer *buffer);
void (*free_buffer) (GstBufferPool *pool, GstBuffer *buffer);
......@@ -195,7 +195,7 @@ gboolean gst_buffer_pool_config_has_option (GstStructure *config, const
/* buffer management */
GstFlowReturn gst_buffer_pool_acquire_buffer (GstBufferPool *pool, GstBuffer **buffer,
GstBufferPoolParams *params);
GstBufferPoolAcquireParams *params);
void gst_buffer_pool_release_buffer (GstBufferPool *pool, GstBuffer *buffer);
G_END_DECLS
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment