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
{
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 num_buffers; /* number of buffers allocated by the driver */
- guint num_queued; /* number of buffers queued in the driver */
- gint index;
+ guint num_allocated; /* number of buffers allocated by the driver */
+ guint num_queued; /* number of buffers queued in the driver */
+
+ gboolean streaming;
GstBuffer **buffers;
};
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