diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2011-02-21 17:33:38 +0100 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2011-03-02 11:23:21 +0100 |
commit | e566910a18aebace3b95791612225d37394e605d (patch) | |
tree | 1246c9529055024d0fac4a6b01540dbc1e58f1f2 /gst/gstbufferpool.h | |
parent | 419a01af0fe59ff8ceed5dcd16544ae6cd16699a (diff) |
bufferpool: Rework buffer management a little
Add start/stop methods to allow for bulk allocation of buffers.
Free buffers only when all outstanding buffers returned.
Make things more threadsafe wrt flushing and starting/stopping by
keeping track of start and stop method calls.
Diffstat (limited to 'gst/gstbufferpool.h')
-rw-r--r-- | gst/gstbufferpool.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gst/gstbufferpool.h b/gst/gstbufferpool.h index e75b82fef..48df0b80b 100644 --- a/gst/gstbufferpool.h +++ b/gst/gstbufferpool.h @@ -98,6 +98,7 @@ struct _GstBufferPool { /*< private >*/ gboolean active; gboolean flushing; + gboolean started; gint outstanding; GstAtomicQueue *queue; GstPoll *poll; @@ -114,9 +115,11 @@ struct _GstBufferPoolClass { GstObjectClass object_class; /* vmethods */ - gboolean (*set_active) (GstBufferPool *pool, gboolean active); gboolean (*set_config) (GstBufferPool *pool, GstStructure *config); + gboolean (*start) (GstBufferPool *pool); + gboolean (*stop) (GstBufferPool *pool); + GstFlowReturn (*acquire_buffer) (GstBufferPool *pool, GstBuffer **buffer, GstBufferPoolParams *params); GstFlowReturn (*alloc_buffer) (GstBufferPool *pool, GstBuffer **buffer, |