Added gst-plugins-base-subtitles0.10-0.10.34 for Meego Harmattan 1.2
[mafwsubrenderer] / gst-plugins-base-subtitles0.10 / sys / v4l / gstv4lsrc.h
1 /* GStreamer
2  *
3  * gstv4lsrc.h: BT8x8/V4L video source element
4  *
5  * Copyright (C) 2001-2002 Ronald Bultje <rbultje@ronald.bitfreak.net>
6  *
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.
11  *
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.
16  *
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.
21  */
22
23 #ifndef __GST_V4LSRC_H__
24 #define __GST_V4LSRC_H__
25
26
27 #include <gstv4lelement.h>
28
29
30 G_BEGIN_DECLS
31
32
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))
43
44
45 typedef struct _GstV4lSrc GstV4lSrc;
46 typedef struct _GstV4lSrcClass GstV4lSrcClass;
47
48
49 enum
50 {
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 */
55 };
56
57
58 struct _GstV4lSrc
59 {
60   GstV4lElement v4lelement;
61
62   /* pads */
63   GstPad *srcpad;
64
65   /* capture/buffer info */
66   struct video_mmap mmap;
67   struct video_mbuf mbuf;
68   guint buffer_size;
69   GstClockTime timestamp_sync;
70
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;
76   gint num_queued;
77   gint sync_frame, queue_frame;
78   gboolean is_capturing;
79   GstClockTimeDiff timestamp_offset;
80
81   /* True if we want to stop */
82   gboolean quit;
83
84   gint offset;
85
86   /* list of supported colorspaces (as integers) */
87   GList *colorspaces;
88
89   gboolean autoprobe;           /* probe features on startup ? */
90   gboolean autoprobe_fps;       /* probe fps on startup ? */
91   gboolean copy_mode;
92
93   GValue *fps_list;             /* list of fps probed */
94 };
95
96 struct _GstV4lSrcClass
97 {
98   GstV4lElementClass parent_class;
99 };
100
101
102 GType gst_v4lsrc_get_type (void);
103
104
105 G_END_DECLS
106
107
108 #endif /* __GST_V4LSRC_H__ */