a768ea2f76d65130635449e0b4b24240087645c1
[platform/upstream/gst-plugins-good.git] / sys / v4l2 / gstv4l2tuner.h
1 /* G-Streamer generic V4L2 element - Tuner interface implementation
2  * Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
3  *
4  * gstv4l2tuner.h: tuner interface implementation for V4L2
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21
22 #ifndef __GST_V4L2_TUNER_H__
23 #define __GST_V4L2_TUNER_H__
24
25 #include <gst/gst.h>
26 #include <gst/tuner/tuner.h>
27
28 #include "gstv4l2element.h"
29
30 G_BEGIN_DECLS
31
32 #define GST_TYPE_V4L2_TUNER_CHANNEL \
33   (gst_v4l2_tuner_channel_get_type ())
34 #define GST_V4L2_TUNER_CHANNEL(obj) \
35   (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_V4L2_TUNER_CHANNEL, \
36                                GstV4l2TunerChannel))
37 #define GST_V4L2_TUNER_CHANNEL_CLASS(klass) \
38   (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_V4L2_TUNER_CHANNEL, \
39                             GstV4l2TunerChannelClass))
40 #define GST_IS_V4L2_TUNER_CHANNEL(obj) \
41   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_V4L2_TUNER_CHANNEL))
42 #define GST_IS_V4L2_TUNER_CHANNEL_CLASS(klass) \
43   (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_V4L2_TUNER_CHANNEL))
44
45 typedef struct _GstV4l2TunerChannel {
46   GstTunerChannel parent;
47
48   guint32         index;
49   guint32         tuner;
50   guint32         audio;
51 } GstV4l2TunerChannel;
52
53 typedef struct _GstV4l2TunerChannelClass {
54   GstTunerChannelClass parent;
55 } GstV4l2TunerChannelClass;
56
57 #define GST_TYPE_V4L2_TUNER_NORM \
58   (gst_v4l2_tuner_norm_get_type ())
59 #define GST_V4L2_TUNER_NORM(obj) \
60   (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_V4L2_TUNER_NORM, \
61                                GstV4l2TunerNorm))
62 #define GST_V4L2_TUNER_NORM_CLASS(klass) \
63   (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_V4L2_TUNER_NORM, \
64                             GstV4l2TunerNormClass))
65 #define GST_IS_V4L2_TUNER_NORM(obj) \
66   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_V4L2_TUNER_NORM))
67 #define GST_IS_V4L2_TUNER_NORM_CLASS(klass) \
68   (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_V4L2_TUNER_NORM))
69
70 typedef struct _GstV4l2TunerNorm {
71   GstTunerNorm parent;
72
73   v4l2_std_id  index;
74 } GstV4l2TunerNorm;
75
76 typedef struct _GstV4l2TunerNormClass {
77   GstTunerNormClass parent;
78 } GstV4l2TunerNormClass;
79
80 GType   gst_v4l2_tuner_channel_get_type (void);
81 GType   gst_v4l2_tuner_norm_get_type    (void);
82
83 void    gst_v4l2_tuner_interface_init   (GstTunerClass *klass);
84
85 #endif /* __GST_V4L2_TUNER_H__ */