mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-24 17:44:14 +00:00
GstBufferPoolParams -> GstBufferPoolAcquireParams
Because those flags are not from the bufferpool but for the acquire function.
This commit is contained in:
parent
85c9543841
commit
9a1cd17136
3 changed files with 34 additions and 33 deletions
|
@ -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_parse_flags_get_type ());
|
||||||
g_type_class_ref (gst_search_mode_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_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_memory_flags_get_type ());
|
||||||
g_type_class_ref (gst_map_flags_get_type ());
|
g_type_class_ref (gst_map_flags_get_type ());
|
||||||
g_type_class_ref (gst_caps_intersect_mode_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_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_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_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_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_map_flags_get_type ()));
|
||||||
g_type_class_unref (g_type_class_peek (gst_caps_intersect_mode_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,
|
static gboolean default_set_config (GstBufferPool * pool,
|
||||||
GstStructure * config);
|
GstStructure * config);
|
||||||
static GstFlowReturn default_alloc_buffer (GstBufferPool * pool,
|
static GstFlowReturn default_alloc_buffer (GstBufferPool * pool,
|
||||||
GstBuffer ** buffer, GstBufferPoolParams * params);
|
GstBuffer ** buffer, GstBufferPoolAcquireParams * params);
|
||||||
static GstFlowReturn default_acquire_buffer (GstBufferPool * pool,
|
static GstFlowReturn default_acquire_buffer (GstBufferPool * pool,
|
||||||
GstBuffer ** buffer, GstBufferPoolParams * params);
|
GstBuffer ** buffer, GstBufferPoolAcquireParams * params);
|
||||||
static void default_reset_buffer (GstBufferPool * pool, GstBuffer * buffer,
|
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_free_buffer (GstBufferPool * pool, GstBuffer * buffer);
|
||||||
static void default_release_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
|
static GstFlowReturn
|
||||||
default_alloc_buffer (GstBufferPool * pool, GstBuffer ** buffer,
|
default_alloc_buffer (GstBufferPool * pool, GstBuffer ** buffer,
|
||||||
GstBufferPoolParams * params)
|
GstBufferPoolAcquireParams * params)
|
||||||
{
|
{
|
||||||
GstBufferPoolPrivate *priv = pool->priv;
|
GstBufferPoolPrivate *priv = pool->priv;
|
||||||
|
|
||||||
|
@ -799,7 +799,7 @@ gst_buffer_pool_config_get (GstStructure * config, const GstCaps ** caps,
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
default_acquire_buffer (GstBufferPool * pool, GstBuffer ** buffer,
|
default_acquire_buffer (GstBufferPool * pool, GstBuffer ** buffer,
|
||||||
GstBufferPoolParams * params)
|
GstBufferPoolAcquireParams * params)
|
||||||
{
|
{
|
||||||
GstFlowReturn result;
|
GstFlowReturn result;
|
||||||
GstBufferPoolClass *pclass;
|
GstBufferPoolClass *pclass;
|
||||||
|
@ -836,7 +836,7 @@ default_acquire_buffer (GstBufferPool * pool, GstBuffer ** buffer,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check if we need to wait */
|
/* 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");
|
GST_LOG_OBJECT (pool, "no more buffers");
|
||||||
result = GST_FLOW_EOS;
|
result = GST_FLOW_EOS;
|
||||||
break;
|
break;
|
||||||
|
@ -885,7 +885,7 @@ remove_meta_unpooled (GstBuffer * buffer, GstMeta ** meta, gpointer user_data)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
default_reset_buffer (GstBufferPool * pool, GstBuffer * buffer,
|
default_reset_buffer (GstBufferPool * pool, GstBuffer * buffer,
|
||||||
GstBufferPoolParams * params)
|
GstBufferPoolAcquireParams * params)
|
||||||
{
|
{
|
||||||
GST_BUFFER_FLAGS (buffer) = 0;
|
GST_BUFFER_FLAGS (buffer) = 0;
|
||||||
|
|
||||||
|
@ -915,7 +915,7 @@ default_reset_buffer (GstBufferPool * pool, GstBuffer * buffer,
|
||||||
*/
|
*/
|
||||||
GstFlowReturn
|
GstFlowReturn
|
||||||
gst_buffer_pool_acquire_buffer (GstBufferPool * pool, GstBuffer ** buffer,
|
gst_buffer_pool_acquire_buffer (GstBufferPool * pool, GstBuffer ** buffer,
|
||||||
GstBufferPoolParams * params)
|
GstBufferPoolAcquireParams * params)
|
||||||
{
|
{
|
||||||
GstBufferPoolClass *pclass;
|
GstBufferPoolClass *pclass;
|
||||||
GstFlowReturn result;
|
GstFlowReturn result;
|
||||||
|
|
|
@ -41,27 +41,27 @@ typedef struct _GstBufferPoolClass GstBufferPoolClass;
|
||||||
#define GST_BUFFER_POOL_CAST(obj) ((GstBufferPool *)(obj))
|
#define GST_BUFFER_POOL_CAST(obj) ((GstBufferPool *)(obj))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GstBufferPoolFlags:
|
* GstBufferPoolAcquireFlags:
|
||||||
* @GST_BUFFER_POOL_FLAG_NONE: no flags
|
* @GST_BUFFER_POOL_ACQUIRE_FLAG_NONE: no flags
|
||||||
* @GST_BUFFER_POOL_FLAG_KEY_UNIT: buffer is keyframe
|
* @GST_BUFFER_POOL_ACQUIRE_FLAG_KEY_UNIT: buffer is keyframe
|
||||||
* @GST_BUFFER_POOL_FLAG_DONTWAIT: don't wait for buffer. This makes the
|
* @GST_BUFFER_POOL_ACQUIRE_FLAG_DONTWAIT: don't wait for buffer. This makes the
|
||||||
* acquire_buffer method return GST_FLOW_UNEXPECTED.
|
* acquire_buffer method return GST_FLOW_UNEXPECTED.
|
||||||
* @GST_BUFFER_POOL_FLAG_DISCONT: buffer is discont
|
* @GST_BUFFER_POOL_ACQUIRE_FLAG_DISCONT: buffer is discont
|
||||||
* @GST_BUFFER_POOL_FLAG_LAST: last flag, subclasses can use private flags
|
* @GST_BUFFER_POOL_ACQUIRE_FLAG_LAST: last flag, subclasses can use private flags
|
||||||
* starting from this value.
|
* starting from this value.
|
||||||
*
|
*
|
||||||
* Additional flags to control the allocation of a buffer
|
* Additional flags to control the allocation of a buffer
|
||||||
*/
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GST_BUFFER_POOL_FLAG_NONE = 0,
|
GST_BUFFER_POOL_ACQUIRE_FLAG_NONE = 0,
|
||||||
GST_BUFFER_POOL_FLAG_KEY_UNIT = (1 << 0),
|
GST_BUFFER_POOL_ACQUIRE_FLAG_KEY_UNIT = (1 << 0),
|
||||||
GST_BUFFER_POOL_FLAG_DONTWAIT = (1 << 1),
|
GST_BUFFER_POOL_ACQUIRE_FLAG_DONTWAIT = (1 << 1),
|
||||||
GST_BUFFER_POOL_FLAG_DISCONT = (1 << 2),
|
GST_BUFFER_POOL_ACQUIRE_FLAG_DISCONT = (1 << 2),
|
||||||
GST_BUFFER_POOL_FLAG_LAST = (1 << 16),
|
GST_BUFFER_POOL_ACQUIRE_FLAG_LAST = (1 << 16),
|
||||||
} GstBufferPoolFlags;
|
} GstBufferPoolAcquireFlags;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GstBufferPoolParams:
|
* GstBufferPoolAcquireParams:
|
||||||
* @format: the format of @start and @stop
|
* @format: the format of @start and @stop
|
||||||
* @start: the start position
|
* @start: the start position
|
||||||
* @stop: the stop position
|
* @stop: the stop position
|
||||||
|
@ -74,15 +74,15 @@ typedef enum {
|
||||||
* implementations can use this extra information to decide what buffer to
|
* implementations can use this extra information to decide what buffer to
|
||||||
* return.
|
* return.
|
||||||
*/
|
*/
|
||||||
typedef struct _GstBufferPoolParams {
|
typedef struct _GstBufferPoolAcquireParams {
|
||||||
GstFormat format;
|
GstFormat format;
|
||||||
gint64 start;
|
gint64 start;
|
||||||
gint64 stop;
|
gint64 stop;
|
||||||
GstBufferPoolFlags flags;
|
GstBufferPoolAcquireFlags flags;
|
||||||
|
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
} GstBufferPoolParams;
|
} GstBufferPoolAcquireParams;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GST_BUFFER_POOL_IS_FLUSHING:
|
* GST_BUFFER_POOL_IS_FLUSHING:
|
||||||
|
@ -152,11 +152,11 @@ struct _GstBufferPoolClass {
|
||||||
gboolean (*stop) (GstBufferPool *pool);
|
gboolean (*stop) (GstBufferPool *pool);
|
||||||
|
|
||||||
GstFlowReturn (*acquire_buffer) (GstBufferPool *pool, GstBuffer **buffer,
|
GstFlowReturn (*acquire_buffer) (GstBufferPool *pool, GstBuffer **buffer,
|
||||||
GstBufferPoolParams *params);
|
GstBufferPoolAcquireParams *params);
|
||||||
GstFlowReturn (*alloc_buffer) (GstBufferPool *pool, GstBuffer **buffer,
|
GstFlowReturn (*alloc_buffer) (GstBufferPool *pool, GstBuffer **buffer,
|
||||||
GstBufferPoolParams *params);
|
GstBufferPoolAcquireParams *params);
|
||||||
void (*reset_buffer) (GstBufferPool *pool, GstBuffer *buffer,
|
void (*reset_buffer) (GstBufferPool *pool, GstBuffer *buffer,
|
||||||
GstBufferPoolParams *params);
|
GstBufferPoolAcquireParams *params);
|
||||||
void (*release_buffer) (GstBufferPool *pool, GstBuffer *buffer);
|
void (*release_buffer) (GstBufferPool *pool, GstBuffer *buffer);
|
||||||
void (*free_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 */
|
/* buffer management */
|
||||||
GstFlowReturn gst_buffer_pool_acquire_buffer (GstBufferPool *pool, GstBuffer **buffer,
|
GstFlowReturn gst_buffer_pool_acquire_buffer (GstBufferPool *pool, GstBuffer **buffer,
|
||||||
GstBufferPoolParams *params);
|
GstBufferPoolAcquireParams *params);
|
||||||
void gst_buffer_pool_release_buffer (GstBufferPool *pool, GstBuffer *buffer);
|
void gst_buffer_pool_release_buffer (GstBufferPool *pool, GstBuffer *buffer);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
Loading…
Reference in a new issue