Merge branch 'master' into 0.11
[platform/upstream/gst-plugins-good.git] / sys / v4l2 / gstv4l2bufferpool.h
index 9173087..17e04e3 100644 (file)
@@ -39,24 +39,30 @@ GST_DEBUG_CATEGORY_EXTERN (v4l2buffer_debug);
 G_BEGIN_DECLS
 
 
-#define GST_TYPE_V4L2_BUFFER_POOL (gst_v4l2_buffer_pool_get_type())
-#define GST_IS_V4L2_BUFFER_POOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_V4L2_BUFFER_POOL))
-#define GST_V4L2_BUFFER_POOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_V4L2_BUFFER_POOL, GstV4l2BufferPool))
+#define GST_TYPE_V4L2_BUFFER_POOL      (gst_v4l2_buffer_pool_get_type())
+#define GST_IS_V4L2_BUFFER_POOL(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_V4L2_BUFFER_POOL))
+#define GST_V4L2_BUFFER_POOL(obj)      (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_V4L2_BUFFER_POOL, GstV4l2BufferPool))
+#define GST_V4L2_BUFFER_POOL_CAST(obj) ((GstV4l2BufferPool*)(obj))
 
 struct _GstV4l2BufferPool
 {
   GstBufferPool parent;
 
-  GstV4l2Object *obj;       /* the v4l2 object */
+  GstV4l2Object *obj;        /* the v4l2 object */
   gint video_fd;             /* a dup(2) of the v4l2object's video_fd */
-  gboolean requeuebuf;       /* if true, unusued buffers are automatically re-QBUF'd */
 
+  GstAllocator *allocator;
+  guint size;
   guint min_buffers;
   guint max_buffers;
+  guint prefix;
+  guint align;
+  gboolean add_videometa;
 
-  guint buffer_count;
-  gint index;
-  gint num_live_buffers;     /* number of buffers not with driver */
+  guint num_allocated;       /* number of buffers allocated by the driver */
+  guint num_queued;          /* number of buffers queued in the driver */
+
+  gboolean streaming;
 
   GstBuffer **buffers;
 };
@@ -79,11 +85,9 @@ const GstMetaInfo * gst_meta_v4l2_get_info (void);
 
 GType gst_v4l2_buffer_pool_get_type (void);
 
-GstBufferPool *     gst_v4l2_buffer_pool_new     (GstV4l2Object *obj);
-
-gboolean            gst_v4l2_buffer_pool_qbuf    (GstBufferPool * bpool, GstBuffer * buf);
+GstBufferPool *     gst_v4l2_buffer_pool_new     (GstV4l2Object *obj, GstCaps *caps);
 
-gint                gst_v4l2_buffer_pool_available_buffers (GstBufferPool *pool);
+GstFlowReturn       gst_v4l2_buffer_pool_process (GstV4l2BufferPool * bpool, GstBuffer * buf);
 
 G_END_DECLS