3 * gstv4lsrc.h: BT8x8/V4L video source element
5 * Copyright (C) 2001-2002 Ronald Bultje <rbultje@ronald.bitfreak.net>
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
23 #ifndef __GST_V4LSRC_H__
24 #define __GST_V4LSRC_H__
27 #include <gstv4lelement.h>
33 #define GST_TYPE_V4LSRC \
34 (gst_v4lsrc_get_type())
35 #define GST_V4LSRC(obj) \
36 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_V4LSRC,GstV4lSrc))
37 #define GST_V4LSRC_CLASS(klass) \
38 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_V4LSRC,GstV4lSrcClass))
39 #define GST_IS_V4LSRC(obj) \
40 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_V4LSRC))
41 #define GST_IS_V4LSRC_CLASS(klass) \
42 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_V4LSRC))
45 typedef struct _GstV4lSrc GstV4lSrc;
46 typedef struct _GstV4lSrcClass GstV4lSrcClass;
51 QUEUE_STATE_ERROR = -1,
52 QUEUE_STATE_READY_FOR_QUEUE, /* the frame is ready to be queued for capture */
53 QUEUE_STATE_QUEUED, /* the frame is queued for capture */
54 QUEUE_STATE_SYNCED /* the frame is captured */
60 GstV4lElement v4lelement;
65 /* capture/buffer info */
66 struct video_mmap mmap;
67 struct video_mbuf mbuf;
69 GstClockTime timestamp_sync;
71 /* num of queued frames and some GThread stuff
72 * to wait if there's not enough */
73 gint8 *frame_queue_state;
74 GMutex *mutex_queue_state;
75 GCond *cond_queue_state;
77 gint sync_frame, queue_frame;
78 gboolean is_capturing;
79 GstClockTimeDiff timestamp_offset;
81 /* True if we want to stop */
86 /* list of supported colorspaces (as integers) */
89 gboolean autoprobe; /* probe features on startup ? */
90 gboolean autoprobe_fps; /* probe fps on startup ? */
93 GValue *fps_list; /* list of fps probed */
96 struct _GstV4lSrcClass
98 GstV4lElementClass parent_class;
102 GType gst_v4lsrc_get_type (void);
108 #endif /* __GST_V4LSRC_H__ */