From 2f429009a32f3fd6b0b273ceccea5e52b9551957 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 15 Jul 2011 11:52:22 +0200 Subject: [PATCH] bufferpool: add macro to check for flushing --- gst/gstbufferpool.c | 2 +- gst/gstbufferpool.h | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gst/gstbufferpool.c b/gst/gstbufferpool.c index 410c8c360a..e487a3146e 100644 --- a/gst/gstbufferpool.c +++ b/gst/gstbufferpool.c @@ -397,7 +397,7 @@ wrong_config: * allocated form this pool must be returned or else this function will do * nothing and return FALSE. * - * @condfig is a #GstStructure that contains the configuration parameters for + * @config is a #GstStructure that contains the configuration parameters for * the pool. A default and mandatory set of parameters can be configured with * gst_buffer_pool_config_set(). This function takes ownership of @config. * diff --git a/gst/gstbufferpool.h b/gst/gstbufferpool.h index b71b1ed812..fed431af19 100644 --- a/gst/gstbufferpool.h +++ b/gst/gstbufferpool.h @@ -84,6 +84,15 @@ typedef struct _GstBufferPoolParams { GstBufferPoolFlags flags; } GstBufferPoolParams; +/** + * GST_BUFFER_POOL_IS_FLUSHING: + * @pool: a GstBufferPool + * + * Check if the bufferpool is flushing. Subclasses might want to check the + * state of the pool in the acquire function. + */ +#define GST_BUFFER_POOL_IS_FLUSHING(pool) (g_atomic_int_get (&pool->flushing)) + /** * GstBufferPool: * @object: the parent structure