diff options
author | Benjamin Otte <otte@gnome.org> | 2004-01-12 02:19:57 +0000 |
---|---|---|
committer | Benjamin Otte <otte@gnome.org> | 2004-01-12 02:19:57 +0000 |
commit | 1adb86a5d6b2f1bb96568f6135e1fdb4d451e4cd (patch) | |
tree | c6a5591aa3d71d3cb1f58fba000e966970d6853d /sys/v4l2/gstv4l2src.h | |
parent | 09984b518a5f6bbb91cec7568a8d2d28132439a6 (diff) | |
download | gst-plugins-bad-1adb86a5d6b2f1bb96568f6135e1fdb4d451e4cd.tar.gz gst-plugins-bad-1adb86a5d6b2f1bb96568f6135e1fdb4d451e4cd.tar.bz2 gst-plugins-bad-1adb86a5d6b2f1bb96568f6135e1fdb4d451e4cd.zip |
sys/v4l2/: add norm, channel and frequency properties.
Original commit message from CVS:
2004-01-12 Benjamin Otte <in7y118@public.uni-hamburg.de>
* sys/v4l2/gstv4l2element.c: (gst_v4l2element_class_init),
(gst_v4l2element_dispose), (gst_v4l2element_set_property),
(gst_v4l2element_get_property):
* sys/v4l2/v4l2_calls.c: (gst_v4l2_set_defaults), (gst_v4l2_open):
add norm, channel and frequency properties.
* sys/v4l2/gstv4l2tuner.c:
fixes for tuner interface changes
* sys/v4l2/gstv4l2element.h:
* sys/v4l2/gstv4l2src.c:
* sys/v4l2/gstv4l2src.h:
* sys/v4l2/v4l2src_calls.c:
* sys/v4l2/v4l2src_calls.h:
rework v4l2src to work with saa1734 cards and allow mmaped buffers.
Diffstat (limited to 'sys/v4l2/gstv4l2src.h')
-rw-r--r-- | sys/v4l2/gstv4l2src.h | 45 |
1 files changed, 28 insertions, 17 deletions
diff --git a/sys/v4l2/gstv4l2src.h b/sys/v4l2/gstv4l2src.h index bae60900..ca528d1e 100644 --- a/sys/v4l2/gstv4l2src.h +++ b/sys/v4l2/gstv4l2src.h @@ -22,6 +22,10 @@ #include <gstv4l2element.h> +GST_DEBUG_CATEGORY_EXTERN (v4l2src_debug); + +#define GST_V4L2_MAX_BUFFERS 16 +#define GST_V4L2_MIN_BUFFERS 2 #define GST_TYPE_V4L2SRC \ (gst_v4l2src_get_type()) @@ -34,9 +38,26 @@ #define GST_IS_V4L2SRC_CLASS(obj) \ (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 { + GstAtomicInt refcount; /* number of users: 1 for every buffer, 1 for element */ + gint video_fd; + guint buffer_count; + GstV4l2Buffer * buffers; +}; -typedef struct _GstV4l2Src GstV4l2Src; -typedef struct _GstV4l2SrcClass GstV4l2SrcClass; +struct _GstV4l2Buffer { + struct v4l2_buffer buffer; + guint8 * start; + guint length; + GstAtomicInt refcount; /* add 1 if in use by element, add 1 if in use by GstBuffer */ + GstV4l2BufferPool * pool; +}; struct _GstV4l2Src { GstV4l2Element v4l2element; @@ -45,28 +66,21 @@ struct _GstV4l2Src { GstPad *srcpad; /* internal lists */ - GList /*v4l2_fmtdesc*/ *formats, *format_list; /* list of available capture formats */ + GSList *formats; /* list of available capture formats */ + + /* buffers */ + GstV4l2BufferPool *pool; - /* buffer properties */ - struct v4l2_buffer bufsettings; struct v4l2_requestbuffers breq; struct v4l2_format format; - /* num of queued frames and some GThread stuff - * to wait if there's not enough */ - gint8 *frame_queue_state; - GMutex *mutex_queue_state; - GCond *cond_queue_state; - gint num_queued; - gint queue_frame; - /* True if we want to stop */ gboolean quit; /* A/V sync... frame counter and internal cache */ gulong handled; - gint last_frame; gint need_writes; + GstBuffer *cached_buffer; gulong last_seq; /* clock */ @@ -75,9 +89,6 @@ struct _GstV4l2Src { /* time to substract from clock time to get back to timestamp */ GstClockTime substract_time; - /* how often are we going to use each frame? */ - gint *use_num_times; - /* how are we going to push buffers? */ gboolean use_fixed_fps; }; |