caps: improve _do_simplify
[platform/upstream/gstreamer.git] / gst / gstbufferpool.h
index 639fd26..f9ee133 100644 (file)
@@ -24,9 +24,6 @@
 #define __GST_BUFFER_POOL_H__
 
 #include <gst/gstminiobject.h>
-#include <gst/gstatomicqueue.h>
-#include <gst/gstpoll.h>
-#include <gst/gstclock.h>
 #include <gst/gstpad.h>
 #include <gst/gstbuffer.h>
 
@@ -35,13 +32,6 @@ G_BEGIN_DECLS
 typedef struct _GstBufferPoolPrivate GstBufferPoolPrivate;
 typedef struct _GstBufferPoolClass GstBufferPoolClass;
 
-/**
- * GST_BUFFER_POOL_TRACE_NAME:
- *
- * The name used for tracing memory allocations.
- */
-#define GST_BUFFER_POOL_TRACE_NAME           "GstBufferPool"
-
 #define GST_TYPE_BUFFER_POOL                 (gst_buffer_pool_get_type())
 #define GST_IS_BUFFER_POOL(obj)              (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_BUFFER_POOL))
 #define GST_IS_BUFFER_POOL_CLASS(klass)      (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_BUFFER_POOL))
@@ -89,6 +79,9 @@ typedef struct _GstBufferPoolParams {
   gint64             start;
   gint64             stop;
   GstBufferPoolFlags flags;
+
+  /*< private >*/
+  gpointer _gst_reserved[GST_PADDING];
 } GstBufferPoolParams;
 
 /**
@@ -110,17 +103,10 @@ typedef struct _GstBufferPoolParams {
 struct _GstBufferPool {
   GstObject            object;
 
-  /*< private >*/
-  gboolean             active;
-  gboolean             flushing;
-  gboolean             started;
-  gint                 outstanding;
-  GstAtomicQueue      *queue;
-  GstPoll             *poll;
-
-  gboolean             configured;
-  GstStructure        *config;
+  /*< protected >*/
+  gint                 flushing;
 
+  /*< private >*/
   GstBufferPoolPrivate *priv;
 
   gpointer _gst_reserved[GST_PADDING];
@@ -142,9 +128,12 @@ struct _GstBufferPool {
  *        be released when there are no buffers available.
  * @alloc_buffer: allocate a buffer. the default implementation allocates
  *        buffers from the default memory allocator and with the configured
- *        size, prefix and alignment.
+ *        size, prefix and alignment. All metadata that is present on the
+ *        allocated buffer will be marked as #GST_META_FLAG_POOLED and will not
+ *        be removed from the buffer in @reset_buffer.
  * @reset_buffer: reset the buffer to its state when it was freshly allocated.
- *        The default implementation will clear the flags and timestamps.
+ *        The default implementation will clear the flags, timestamps and
+ *        will remove the metadata added after alloc_buffer.
  * @release_buffer: release a buffer back in the pool. The default
  *        implementation will put the buffer back in the queue and notify any
  *        blocking acquire_buffer calls.