From 9a1cd171361de9ff0efad5a0965e6c7044372b9a Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 15 Mar 2012 14:01:44 +0100 Subject: [PATCH] GstBufferPoolParams -> GstBufferPoolAcquireParams Because those flags are not from the bufferpool but for the acquire function. --- gst/gst.c | 5 +++-- gst/gstbufferpool.c | 16 ++++++++-------- gst/gstbufferpool.h | 46 +++++++++++++++++++++++----------------------- 3 files changed, 34 insertions(+), 33 deletions(-) diff --git a/gst/gst.c b/gst/gst.c index 48b788e..3165c9f 100644 --- a/gst/gst.c +++ b/gst/gst.c @@ -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 ())); diff --git a/gst/gstbufferpool.c b/gst/gstbufferpool.c index 24942d7..de484f3 100644 --- a/gst/gstbufferpool.c +++ b/gst/gstbufferpool.c @@ -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; diff --git a/gst/gstbufferpool.h b/gst/gstbufferpool.h index b0e5a9d..f30ccd2 100644 --- a/gst/gstbufferpool.h +++ b/gst/gstbufferpool.h @@ -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 -- 2.7.4