Added gst-plugins-base-subtitles0.10-0.10.34 for Meego Harmattan 1.2
[mafwsubrenderer] / gst-plugins-base-subtitles0.10 / gst-libs / gst / interfaces / tuner.h
1 /* GStreamer Tuner
2  * Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
3  *
4  * tuner.h: tuner interface design
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_TUNER_H__
23 #define __GST_TUNER_H__
24
25 #include <gst/gst.h>
26 #include <gst/interfaces/tunernorm.h>
27 #include <gst/interfaces/tunerchannel.h>
28 #include <gst/interfaces/interfaces-enumtypes.h>
29
30 G_BEGIN_DECLS
31
32 #define GST_TYPE_TUNER \
33   (gst_tuner_get_type ())
34 #define GST_TUNER(obj) \
35   (GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_TUNER, GstTuner))
36 #define GST_TUNER_CLASS(klass) \
37   (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_TUNER, GstTunerClass))
38 #define GST_IS_TUNER(obj) \
39   (GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TUNER))
40 #define GST_IS_TUNER_CLASS(klass) \
41   (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_TUNER))
42 #define GST_TUNER_GET_CLASS(inst) \
43   (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_TUNER, GstTunerClass))
44
45 typedef struct _GstTuner GstTuner;
46 typedef struct _GstTunerClass GstTunerClass;
47
48 struct _GstTunerClass {
49   GTypeInterface klass;
50
51   /* virtual functions */
52   const GList * (* list_channels)   (GstTuner        *tuner);
53   void          (* set_channel)     (GstTuner        *tuner,
54                                      GstTunerChannel *channel);
55   GstTunerChannel *
56                 (* get_channel)     (GstTuner        *tuner);
57
58   const GList * (* list_norms)      (GstTuner        *tuner);
59   void          (* set_norm)        (GstTuner        *tuner,
60                                      GstTunerNorm    *norm);
61   GstTunerNorm *(* get_norm)        (GstTuner        *tuner);
62
63   void          (* set_frequency)   (GstTuner        *tuner,
64                                      GstTunerChannel *channel,
65                                      gulong           frequency);
66   gulong        (* get_frequency)   (GstTuner        *tuner,
67                                      GstTunerChannel *channel);
68   gint          (* signal_strength) (GstTuner        *tuner,
69                                      GstTunerChannel *channel);
70
71   /* signals */
72   void (*channel_changed)   (GstTuner        *tuner,
73                              GstTunerChannel *channel);
74   void (*norm_changed)      (GstTuner        *tuner,
75                              GstTunerNorm    *norm);
76   void (*frequency_changed) (GstTuner        *tuner,
77                              GstTunerChannel *channel,
78                              gulong           frequency);
79   void (*signal_changed)    (GstTuner        *tuner,
80                              GstTunerChannel *channel,
81                              gint             signal);
82
83   gpointer _gst_reserved[GST_PADDING];
84 };
85
86 GType           gst_tuner_get_type              (void);
87
88 /* virtual class function wrappers */
89 const GList *   gst_tuner_list_channels         (GstTuner        *tuner);
90 void            gst_tuner_set_channel           (GstTuner        *tuner,
91                                                  GstTunerChannel *channel);
92 GstTunerChannel *
93                 gst_tuner_get_channel           (GstTuner        *tuner);
94
95 const GList *   gst_tuner_list_norms            (GstTuner        *tuner);
96 void            gst_tuner_set_norm              (GstTuner        *tuner,
97                                                  GstTunerNorm    *norm);
98 GstTunerNorm *  gst_tuner_get_norm              (GstTuner        *tuner);
99
100 void            gst_tuner_set_frequency         (GstTuner        *tuner,
101                                                  GstTunerChannel *channel,
102                                                  gulong           frequency);
103 gulong          gst_tuner_get_frequency         (GstTuner        *tuner,
104                                                  GstTunerChannel *channel);
105 gint            gst_tuner_signal_strength       (GstTuner        *tuner,
106                                                  GstTunerChannel *channel);
107
108 /* helper functions */
109 GstTunerNorm *  gst_tuner_find_norm_by_name     (GstTuner        *tuner,
110                                                  gchar           *norm);
111 GstTunerChannel *gst_tuner_find_channel_by_name (GstTuner        *tuner,
112                                                  gchar           *channel);
113
114 /* trigger signals */
115 void            gst_tuner_channel_changed       (GstTuner        *tuner,
116                                                  GstTunerChannel *channel);
117 void            gst_tuner_norm_changed          (GstTuner        *tuner,
118                                                  GstTunerNorm    *norm);
119 void            gst_tuner_frequency_changed     (GstTuner        *tuner,
120                                                  GstTunerChannel *channel,
121                                                  gulong           frequency);
122 void            gst_tuner_signal_changed        (GstTuner        *tuner,
123                                                  GstTunerChannel *channel,
124                                                  gint             signal);
125
126 G_END_DECLS
127
128 #endif /* __GST_TUNER_H__ */