summaryrefslogtreecommitdiffstats
path: root/sys/v4l2/gstv4l2src.h
diff options
context:
space:
mode:
authorRob Clark <rob@ti.com>2009-08-04 09:14:20 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2009-08-04 09:16:56 +0200
commitf19cfbda96d098362cc2a2565197cef347878549 (patch)
tree598fdc98292aa14467da24fd6d711590588c1f68 /sys/v4l2/gstv4l2src.h
parent56850099a6a47b8c3f8606f8107d42cb86dfe601 (diff)
v4l2: Add v4l2sink element
This also does the following changes: (1) pull the bufferpool code out into gstv4l2bufferpool.c, and make a bit more generic so it can be used both for v4l2src and v4l2sink (2) move some of the device probing/configuration/caps stuff into gstv4l2object.c so it does not have to be duplicated between v4l2src and v4l2sink Fixes bug #590280.
Diffstat (limited to 'sys/v4l2/gstv4l2src.h')
-rw-r--r--sys/v4l2/gstv4l2src.h35
1 files changed, 1 insertions, 34 deletions
diff --git a/sys/v4l2/gstv4l2src.h b/sys/v4l2/gstv4l2src.h
index bedae8a7..fef3f108 100644
--- a/sys/v4l2/gstv4l2src.h
+++ b/sys/v4l2/gstv4l2src.h
@@ -25,16 +25,10 @@
#define __GST_V4L2SRC_H__
#include <gstv4l2object.h>
+#include <gstv4l2bufferpool.h>
GST_DEBUG_CATEGORY_EXTERN (v4l2src_debug);
-/* size of v4l2 buffer pool in streaming case */
-#define GST_V4L2_MAX_BUFFERS 16
-#define GST_V4L2_MIN_BUFFERS 1
-
-/* max frame width/height */
-#define GST_V4L2_MAX_SIZE (1<<15) /* 2^15 == 32768 */
-
G_BEGIN_DECLS
#define GST_TYPE_V4L2SRC \
@@ -48,34 +42,10 @@ G_BEGIN_DECLS
#define GST_IS_V4L2SRC_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_V4L2SRC))
-typedef struct _GstV4l2BufferPool GstV4l2BufferPool;
-typedef struct _GstV4l2Buffer GstV4l2Buffer;
typedef struct _GstV4l2Src GstV4l2Src;
typedef struct _GstV4l2SrcClass GstV4l2SrcClass;
-/* global info */
-struct _GstV4l2BufferPool
-{
- GstMiniObject parent;
-
- GMutex *lock;
- gboolean running; /* with lock */
- gint num_live_buffers; /* with lock */
- gint video_fd; /* a dup(2) of the v4l2object's video_fd */
- guint buffer_count;
- GstV4l2Buffer **buffers; /* with lock; buffers[n] is NULL that buffer has been
- * dequeued and pushed out */
-};
-
-struct _GstV4l2Buffer {
- GstBuffer buffer;
-
- struct v4l2_buffer vbuffer;
-
- /* FIXME: have GstV4l2Src* instead, as this has GstV4l2BufferPool* */
- GstV4l2BufferPool *pool;
-};
/**
* GstV4l2Src:
@@ -93,9 +63,6 @@ struct _GstV4l2Src
/* pads */
GstCaps *probed_caps;
- /* internal lists */
- GSList *formats; /* list of available capture formats */
-
/* buffer handling */
GstV4l2BufferPool *pool;