• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* GStreamer
2  *
3  * Copyright (C) 2001-2002 Ronald Bultje <rbultje@ronald.bitfreak.net>
4  *               2006 Edgard Lima <edgard.lima@gmail.com>
5  *
6  * gstv4l2src.h: BT8x8/V4L2 source element
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Library General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Library General Public License for more details.
17  *
18  * You should have received a copy of the GNU Library General Public
19  * License along with this library; if not, write to the
20  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
21  * Boston, MA 02110-1301, USA.
22  */
23 
24 #ifndef __GST_V4L2SRC_H__
25 #define __GST_V4L2SRC_H__
26 
27 #include <gstv4l2object.h>
28 #include <gstv4l2bufferpool.h>
29 
30 G_BEGIN_DECLS
31 
32 #define GST_TYPE_V4L2SRC \
33   (gst_v4l2src_get_type())
34 #define GST_V4L2SRC(obj) \
35   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_V4L2SRC,GstV4l2Src))
36 #define GST_V4L2SRC_CLASS(klass) \
37   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_V4L2SRC,GstV4l2SrcClass))
38 #define GST_IS_V4L2SRC(obj) \
39   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_V4L2SRC))
40 #define GST_IS_V4L2SRC_CLASS(klass) \
41   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_V4L2SRC))
42 
43 typedef struct _GstV4l2Src GstV4l2Src;
44 typedef struct _GstV4l2SrcClass GstV4l2SrcClass;
45 
46 /**
47  * GstV4l2Src:
48  *
49  * Opaque object.
50  */
51 struct _GstV4l2Src
52 {
53   GstPushSrc pushsrc;
54 
55   /*< private >*/
56   GstV4l2Object * v4l2object;
57 
58   guint64 offset;
59   gboolean next_offset_same;
60 
61   /* offset adjust after renegotiation */
62   guint64 renegotiation_adjust;
63 
64   GstClockTime ctrl_time;
65 
66   gboolean pending_set_fmt;
67 
68   /* Timestamp sanity check */
69   GstClockTime last_timestamp;
70   gboolean has_bad_timestamp;
71 
72   /* maintain signal status, updated during negotiation */
73   gboolean no_signal;
74 };
75 
76 struct _GstV4l2SrcClass
77 {
78   GstPushSrcClass parent_class;
79 
80   GList *v4l2_class_devices;
81 };
82 
83 GType gst_v4l2src_get_type (void);
84 
85 G_END_DECLS
86 
87 #endif /* __GST_V4L2SRC_H__ */
88