|
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 |
|
47 typedef struct _GstTunerClass { |
|
48 GTypeInterface klass; |
|
49 |
|
50 /* virtual functions */ |
|
51 const GList * (* list_channels) (GstTuner *tuner); |
|
52 void (* set_channel) (GstTuner *tuner, |
|
53 GstTunerChannel *channel); |
|
54 GstTunerChannel * |
|
55 (* get_channel) (GstTuner *tuner); |
|
56 |
|
57 const GList * (* list_norms) (GstTuner *tuner); |
|
58 void (* set_norm) (GstTuner *tuner, |
|
59 GstTunerNorm *norm); |
|
60 GstTunerNorm *(* get_norm) (GstTuner *tuner); |
|
61 |
|
62 void (* set_frequency) (GstTuner *tuner, |
|
63 GstTunerChannel *channel, |
|
64 gulong frequency); |
|
65 gulong (* get_frequency) (GstTuner *tuner, |
|
66 GstTunerChannel *channel); |
|
67 gint (* signal_strength) (GstTuner *tuner, |
|
68 GstTunerChannel *channel); |
|
69 |
|
70 /* signals */ |
|
71 void (*channel_changed) (GstTuner *tuner, |
|
72 GstTunerChannel *channel); |
|
73 void (*norm_changed) (GstTuner *tuner, |
|
74 GstTunerNorm *norm); |
|
75 void (*frequency_changed) (GstTuner *tuner, |
|
76 GstTunerChannel *channel, |
|
77 gulong frequency); |
|
78 void (*signal_changed) (GstTuner *tuner, |
|
79 GstTunerChannel *channel, |
|
80 gint signal); |
|
81 |
|
82 gpointer _gst_reserved[GST_PADDING]; |
|
83 } GstTunerClass; |
|
84 #ifdef __SYMBIAN32__ |
|
85 IMPORT_C |
|
86 #endif |
|
87 |
|
88 |
|
89 GType gst_tuner_get_type (void); |
|
90 |
|
91 /* virtual class function wrappers */ |
|
92 #ifdef __SYMBIAN32__ |
|
93 IMPORT_C |
|
94 #endif |
|
95 |
|
96 const GList * gst_tuner_list_channels (GstTuner *tuner); |
|
97 #ifdef __SYMBIAN32__ |
|
98 IMPORT_C |
|
99 #endif |
|
100 |
|
101 void gst_tuner_set_channel (GstTuner *tuner, |
|
102 GstTunerChannel *channel); |
|
103 #ifdef __SYMBIAN32__ |
|
104 IMPORT_C |
|
105 #endif |
|
106 |
|
107 GstTunerChannel * |
|
108 gst_tuner_get_channel (GstTuner *tuner); |
|
109 #ifdef __SYMBIAN32__ |
|
110 IMPORT_C |
|
111 #endif |
|
112 |
|
113 |
|
114 const GList * gst_tuner_list_norms (GstTuner *tuner); |
|
115 #ifdef __SYMBIAN32__ |
|
116 IMPORT_C |
|
117 #endif |
|
118 |
|
119 void gst_tuner_set_norm (GstTuner *tuner, |
|
120 GstTunerNorm *norm); |
|
121 #ifdef __SYMBIAN32__ |
|
122 IMPORT_C |
|
123 #endif |
|
124 |
|
125 GstTunerNorm * gst_tuner_get_norm (GstTuner *tuner); |
|
126 #ifdef __SYMBIAN32__ |
|
127 IMPORT_C |
|
128 #endif |
|
129 |
|
130 |
|
131 void gst_tuner_set_frequency (GstTuner *tuner, |
|
132 GstTunerChannel *channel, |
|
133 gulong frequency); |
|
134 #ifdef __SYMBIAN32__ |
|
135 IMPORT_C |
|
136 #endif |
|
137 |
|
138 gulong gst_tuner_get_frequency (GstTuner *tuner, |
|
139 GstTunerChannel *channel); |
|
140 #ifdef __SYMBIAN32__ |
|
141 IMPORT_C |
|
142 #endif |
|
143 |
|
144 gint gst_tuner_signal_strength (GstTuner *tuner, |
|
145 GstTunerChannel *channel); |
|
146 |
|
147 /* helper functions */ |
|
148 #ifdef __SYMBIAN32__ |
|
149 IMPORT_C |
|
150 #endif |
|
151 |
|
152 GstTunerNorm * gst_tuner_find_norm_by_name (GstTuner *tuner, |
|
153 gchar *norm); |
|
154 #ifdef __SYMBIAN32__ |
|
155 IMPORT_C |
|
156 #endif |
|
157 |
|
158 GstTunerChannel *gst_tuner_find_channel_by_name (GstTuner *tuner, |
|
159 gchar *channel); |
|
160 |
|
161 /* trigger signals */ |
|
162 #ifdef __SYMBIAN32__ |
|
163 IMPORT_C |
|
164 #endif |
|
165 |
|
166 void gst_tuner_channel_changed (GstTuner *tuner, |
|
167 GstTunerChannel *channel); |
|
168 #ifdef __SYMBIAN32__ |
|
169 IMPORT_C |
|
170 #endif |
|
171 |
|
172 void gst_tuner_norm_changed (GstTuner *tuner, |
|
173 GstTunerNorm *norm); |
|
174 #ifdef __SYMBIAN32__ |
|
175 IMPORT_C |
|
176 #endif |
|
177 |
|
178 void gst_tuner_frequency_changed (GstTuner *tuner, |
|
179 GstTunerChannel *channel, |
|
180 gulong frequency); |
|
181 #ifdef __SYMBIAN32__ |
|
182 IMPORT_C |
|
183 #endif |
|
184 |
|
185 void gst_tuner_signal_changed (GstTuner *tuner, |
|
186 GstTunerChannel *channel, |
|
187 gint signal); |
|
188 |
|
189 G_END_DECLS |
|
190 |
|
191 #endif /* __GST_TUNER_H__ */ |