• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * gstmpegtsdescriptor.h -
3  * Copyright (C) 2013 Edward Hervey
4  *
5  * Authors:
6  *   Edward Hervey <edward@collabora.com>
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  * Some parts of this code come from the Fluendo MPEG Demuxer plugin.
24  *
25  * The Initial Developer of the Original Code is Fluendo, S.L.
26  * Portions created by Fluendo, S.L. are Copyright (C) 2005
27  * Fluendo, S.L. All Rights Reserved.
28  *
29  * Contributor(s): Wim Taymans <wim@fluendo.com>
30  */
31 
32 #ifndef GST_DVB_DESCRIPTOR_H
33 #define GST_DVB_DESCRIPTOR_H
34 
35 #include <gst/gst.h>
36 #include <gst/mpegts/mpegts-prelude.h>
37 
38 G_BEGIN_DECLS
39 
40 /**
41  * GstMpegtsDVBDescriptorType:
42  *
43  * The type of #GstMpegtsDescriptor
44  *
45  * These values correspond to the registered descriptor type from
46  * the various DVB specifications.
47  *
48  * Consult the relevant specifications for more details.
49  */
50 typedef enum {
51   /* 64-127 DVB tags ETSI EN 300 468
52    * (Specification for Service Information (SI) in DVB systems)
53    */
54   GST_MTS_DESC_DVB_NETWORK_NAME                 = 0x40,
55   GST_MTS_DESC_DVB_SERVICE_LIST                 = 0x41,
56   GST_MTS_DESC_DVB_STUFFING                     = 0x42,
57   GST_MTS_DESC_DVB_SATELLITE_DELIVERY_SYSTEM    = 0x43,
58   GST_MTS_DESC_DVB_CABLE_DELIVERY_SYSTEM        = 0x44,
59   GST_MTS_DESC_DVB_VBI_DATA                     = 0x45,
60   GST_MTS_DESC_DVB_VBI_TELETEXT                 = 0x46,
61   GST_MTS_DESC_DVB_BOUQUET_NAME                 = 0x47,
62   GST_MTS_DESC_DVB_SERVICE                      = 0x48,
63   GST_MTS_DESC_DVB_COUNTRY_AVAILABILITY         = 0x49,
64   GST_MTS_DESC_DVB_LINKAGE                      = 0x4A,
65   GST_MTS_DESC_DVB_NVOD_REFERENCE               = 0x4B,
66   GST_MTS_DESC_DVB_TIME_SHIFTED_SERVICE         = 0x4C,
67   GST_MTS_DESC_DVB_SHORT_EVENT                  = 0x4D,
68   GST_MTS_DESC_DVB_EXTENDED_EVENT               = 0x4E,
69   GST_MTS_DESC_DVB_TIME_SHIFTED_EVENT           = 0x4F,
70   GST_MTS_DESC_DVB_COMPONENT                    = 0x50,
71   GST_MTS_DESC_DVB_MOSAIC                       = 0x51,
72   GST_MTS_DESC_DVB_STREAM_IDENTIFIER            = 0x52,
73   GST_MTS_DESC_DVB_CA_IDENTIFIER                = 0x53,
74   GST_MTS_DESC_DVB_CONTENT                      = 0x54,
75   GST_MTS_DESC_DVB_PARENTAL_RATING              = 0x55,
76   GST_MTS_DESC_DVB_TELETEXT                     = 0x56,
77   GST_MTS_DESC_DVB_TELEPHONE                    = 0x57,
78   GST_MTS_DESC_DVB_LOCAL_TIME_OFFSET            = 0x58,
79   GST_MTS_DESC_DVB_SUBTITLING                   = 0x59,
80   GST_MTS_DESC_DVB_TERRESTRIAL_DELIVERY_SYSTEM  = 0x5A,
81   GST_MTS_DESC_DVB_MULTILINGUAL_NETWORK_NAME    = 0x5B,
82   GST_MTS_DESC_DVB_MULTILINGUAL_BOUQUET_NAME    = 0x5C,
83   GST_MTS_DESC_DVB_MULTILINGUAL_SERVICE_NAME    = 0x5D,
84   GST_MTS_DESC_DVB_MULTILINGUAL_COMPONENT       = 0x5E,
85   GST_MTS_DESC_DVB_PRIVATE_DATA_SPECIFIER       = 0x5F,
86   GST_MTS_DESC_DVB_SERVICE_MOVE                 = 0x60,
87   GST_MTS_DESC_DVB_SHORT_SMOOTHING_BUFFER       = 0x61,
88   GST_MTS_DESC_DVB_FREQUENCY_LIST               = 0x62,
89   /**
90    * GST_MTS_DESC_DVB_PARTIAL_TRANSPORT_STREAM:
91    *
92    * Partial Transport Stream descriptor. Only present in SIT Sections.
93    *
94    * See also: %GST_MPEGTS_SECTION_SIT, %GstMpegtsSIT
95    */
96   GST_MTS_DESC_DVB_PARTIAL_TRANSPORT_STREAM     = 0x63,
97   GST_MTS_DESC_DVB_DATA_BROADCAST               = 0x64,
98   GST_MTS_DESC_DVB_SCRAMBLING                   = 0x65,
99   GST_MTS_DESC_DVB_DATA_BROADCAST_ID            = 0x66,
100   GST_MTS_DESC_DVB_TRANSPORT_STREAM             = 0x67,
101   GST_MTS_DESC_DVB_DSNG                         = 0x68,
102   GST_MTS_DESC_DVB_PDC                          = 0x69,
103   GST_MTS_DESC_DVB_AC3                          = 0x6A,
104   GST_MTS_DESC_DVB_ANCILLARY_DATA               = 0x6B,
105   GST_MTS_DESC_DVB_CELL_LIST                    = 0x6C,
106   GST_MTS_DESC_DVB_CELL_FREQUENCY_LINK          = 0x6D,
107   GST_MTS_DESC_DVB_ANNOUNCEMENT_SUPPORT         = 0x6E,
108   GST_MTS_DESC_DVB_APPLICATION_SIGNALLING       = 0x6F,
109   GST_MTS_DESC_DVB_ADAPTATION_FIELD_DATA        = 0x70,
110   GST_MTS_DESC_DVB_SERVICE_IDENTIFIER           = 0x71,
111   GST_MTS_DESC_DVB_SERVICE_AVAILABILITY         = 0x72,
112   GST_MTS_DESC_DVB_DEFAULT_AUTHORITY            = 0x73,
113   GST_MTS_DESC_DVB_RELATED_CONTENT              = 0x74,
114   GST_MTS_DESC_DVB_TVA_ID                       = 0x75,
115   GST_MTS_DESC_DVB_CONTENT_IDENTIFIER           = 0x76,
116   GST_MTS_DESC_DVB_TIMESLICE_FEC_IDENTIFIER     = 0x77,
117   GST_MTS_DESC_DVB_ECM_REPETITION_RATE          = 0x78,
118   GST_MTS_DESC_DVB_S2_SATELLITE_DELIVERY_SYSTEM = 0x79,
119   GST_MTS_DESC_DVB_ENHANCED_AC3                 = 0x7A,
120   GST_MTS_DESC_DVB_DTS                          = 0x7B,
121   GST_MTS_DESC_DVB_AAC                          = 0x7C,
122   GST_MTS_DESC_DVB_XAIT_LOCATION                = 0x7D,
123   GST_MTS_DESC_DVB_FTA_CONTENT_MANAGEMENT       = 0x7E,
124   GST_MTS_DESC_DVB_EXTENSION                    = 0x7F,
125 } GstMpegtsDVBDescriptorType;
126 
127 /**
128  * GstMpegtsDVBExtendedDescriptorType:
129  *
130  * The type of #GstMpegtsDescriptor
131  *
132  * These values correspond to the registered extended descriptor
133  * type from the various DVB specifications.
134  *
135  * Consult the relevant specifications for more details.
136  */
137 typedef enum {
138   /* 00 - 0x7F DVB extended tags ETSI EN 300 468
139    * (Specification for Service Information (SI) in DVB systems)
140    */
141   GST_MTS_DESC_EXT_DVB_IMAGE_ICON               = 0x00,
142   /* TS/TR 102 825 */
143   GST_MTS_DESC_EXT_DVB_CPCM_DELIVERY_SIGNALLING = 0x01,
144   GST_MTS_DESC_EXT_DVB_CP                       = 0x02,
145   GST_MTS_DESC_EXT_DVB_CP_IDENTIFIER            = 0x03,
146   GST_MTS_DESC_EXT_DVB_T2_DELIVERY_SYSTEM       = 0x04,
147   GST_MTS_DESC_EXT_DVB_SH_DELIVERY_SYSTEM       = 0x05,
148   GST_MTS_DESC_EXT_DVB_SUPPLEMENTARY_AUDIO      = 0x06,
149   GST_MTS_DESC_EXT_DVB_NETWORK_CHANGE_NOTIFY    = 0x07,
150   GST_MTS_DESC_EXT_DVB_MESSAGE                  = 0x08,
151   GST_MTS_DESC_EXT_DVB_TARGET_REGION            = 0x09,
152   GST_MTS_DESC_EXT_DVB_TARGET_REGION_NAME       = 0x0A,
153   GST_MTS_DESC_EXT_DVB_SERVICE_RELOCATED        = 0x0B,
154   GST_MTS_DESC_EXT_DVB_XAIT_PID                 = 0x0C,
155   GST_MTS_DESC_EXT_DVB_C2_DELIVERY_SYSTEM       = 0x0D,
156   GST_MTS_DESC_EXT_DVB_DTS_HD_AUDIO_STREAM      = 0x0E,
157   GST_MTS_DESC_EXT_DVB_DTS_NEUTRAL              = 0x0F,
158   GST_MTS_DESC_EXT_DVB_VIDEO_DEPTH_RANGE        = 0x10,
159   GST_MTS_DESC_EXT_DVB_T2MI                     = 0x11,
160   GST_MTS_DESC_EXT_DVB_URI_LINKAGE              = 0x13,
161   GST_MTS_DESC_EXT_DVB_AC4                      = 0x15,
162   /**
163    * GST_MTS_DESC_EXT_DVB_AUDIO_PRESELECTION:
164    *
165    * Provide all avaliable audio programme for user selection
166    *
167    * Since: 1.20
168    */
169   GST_MTS_DESC_EXT_DVB_AUDIO_PRESELECTION       = 0x19
170 } GstMpegtsDVBExtendedDescriptorType;
171 
172 /* GST_MTS_DESC_DVB_CAROUSEL_IDENTIFIER (0x13) */
173 /* FIXME : Implement */
174 
175 /* GST_MTS_DESC_DVB_NETWORK_NAME (0x40) */
176 
177 GST_MPEGTS_API
178 gboolean gst_mpegts_descriptor_parse_dvb_network_name (const GstMpegtsDescriptor *descriptor,
179 						       gchar **name);
180 
181 GST_MPEGTS_API
182 GstMpegtsDescriptor *gst_mpegts_descriptor_from_dvb_network_name (const gchar * name);
183 
184 /* GST_MTS_DESC_DVB_STUFFING (0x42) */
185 
186 GST_MPEGTS_API
187 gboolean gst_mpegts_descriptor_parse_dvb_stuffing (const GstMpegtsDescriptor * descriptor,
188                                                    guint8 ** stuffing_bytes);
189 
190 
191 /* GST_MTS_DESC_DVB_SATELLITE_DELIVERY_SYSTEM (0x43) */
192 typedef struct _GstMpegtsSatelliteDeliverySystemDescriptor GstMpegtsSatelliteDeliverySystemDescriptor;
193 
194 typedef enum {
195   GST_MPEGTS_MODULATION_QPSK    = 0,
196   GST_MPEGTS_MODULATION_QAM_16,
197   GST_MPEGTS_MODULATION_QAM_32,
198   GST_MPEGTS_MODULATION_QAM_64,
199   GST_MPEGTS_MODULATION_QAM_128,
200   GST_MPEGTS_MODULATION_QAM_256,
201   GST_MPEGTS_MODULATION_QAM_AUTO,
202   GST_MPEGTS_MODULATION_VSB_8,
203   GST_MPEGTS_MODULATION_VSB_16,
204   GST_MPEGTS_MODULATION_PSK_8,
205   GST_MPEGTS_MODULATION_APSK_16,
206   GST_MPEGTS_MODULATION_APSK_32,
207   GST_MPEGTS_MODULATION_DQPSK,
208   GST_MPEGTS_MODULATION_QAM_4_NR_,
209   GST_MPEGTS_MODULATION_NONE
210 } GstMpegtsModulationType;
211 
212 typedef enum {
213   GST_MPEGTS_FEC_NONE = 0,
214   GST_MPEGTS_FEC_1_2,
215   GST_MPEGTS_FEC_2_3,
216   GST_MPEGTS_FEC_3_4,
217   GST_MPEGTS_FEC_4_5,
218   GST_MPEGTS_FEC_5_6,
219   GST_MPEGTS_FEC_6_7,
220   GST_MPEGTS_FEC_7_8,
221   GST_MPEGTS_FEC_8_9,
222   GST_MPEGTS_FEC_AUTO,
223   GST_MPEGTS_FEC_3_5,
224   GST_MPEGTS_FEC_9_10,
225   GST_MPEGTS_FEC_2_5
226 } GstMpegtsDVBCodeRate;
227 
228 typedef enum {
229   GST_MPEGTS_ROLLOFF_35 = 0,
230   GST_MPEGTS_ROLLOFF_20,
231   GST_MPEGTS_ROLLOFF_25,
232   GST_MPEGTS_ROLLOFF_RESERVED,
233   GST_MPEGTS_ROLLOFF_AUTO
234 } GstMpegtsSatelliteRolloff;
235 
236 typedef enum {
237   GST_MPEGTS_POLARIZATION_LINEAR_HORIZONTAL = 0,
238   GST_MPEGTS_POLARIZATION_LINEAR_VERTICAL,
239   GST_MPEGTS_POLARIZATION_CIRCULAR_LEFT,
240   GST_MPEGTS_POLARIZATION_CIRCULAR_RIGHT
241 } GstMpegtsSatellitePolarizationType;
242 
243 /**
244  * GstMpegtsSatelliteDeliverySystemDescriptor:
245  * @frequency: the frequency in kHz (kiloHertz)
246  * @orbital_position: the orbital position in degrees
247  * @west_east: If %TRUE, the satellite is in the eastern part of the orbit,
248  * else in the western part.
249  * @polarization: The polarization of the transmitted signal
250  * @roll_off: Roll-off factor used in DVB-S2
251  * @modulation_system: modulation system, %TRUE if DVB-S2, else DVB-S
252  * @modulation_type: Modulation scheme used
253  * @symbol_rate: Symbol rate (in symbols per second)
254  * @fec_inner: inner FEC scheme used
255  *
256  * Satellite Delivery System Descriptor (EN 300 468 v.1.13.1)
257  */
258 struct _GstMpegtsSatelliteDeliverySystemDescriptor
259 {
260   guint32                            frequency;
261   gfloat                             orbital_position;
262   gboolean                           west_east;
263   GstMpegtsSatellitePolarizationType polarization;
264 
265   GstMpegtsSatelliteRolloff          roll_off;
266   gboolean                           modulation_system;
267   GstMpegtsModulationType            modulation_type;
268 
269   guint32                            symbol_rate;
270   GstMpegtsDVBCodeRate               fec_inner;
271 };
272 
273 #define GST_TYPE_MPEGTS_SATELLITE_DELIVERY_SYSTEM_DESCRIPTOR (gst_mpegts_satellite_delivery_system_descriptor_get_type())
274 
275 GST_MPEGTS_API
276 GType gst_mpegts_satellite_delivery_system_descriptor_get_type(void);
277 
278 GST_MPEGTS_API
279 gboolean gst_mpegts_descriptor_parse_satellite_delivery_system (const GstMpegtsDescriptor *descriptor,
280 								GstMpegtsSatelliteDeliverySystemDescriptor *res);
281 
282 
283 /* GST_MTS_DESC_DVB_CABLE_DELIVERY_SYSTEM (0x44) */
284 typedef enum {
285   GST_MPEGTS_CABLE_OUTER_FEC_UNDEFINED = 0,
286   GST_MPEGTS_CABLE_OUTER_FEC_NONE,
287   GST_MPEGTS_CABLE_OUTER_FEC_RS_204_188,
288 } GstMpegtsCableOuterFECScheme;
289 
290 typedef struct _GstMpegtsCableDeliverySystemDescriptor GstMpegtsCableDeliverySystemDescriptor;
291 /**
292  * GstMpegtsCableDeliverySystemDescriptor:
293  * @frequency: the frequency in Hz (Hertz)
294  * @outer_fec: the outer FEC scheme used
295  * @modulation: Modulation scheme used
296  * @symbol_rate: Symbol rate (in symbols per second)
297  * @fec_inner: inner FEC scheme used
298  *
299  * Cable Delivery System Descriptor (EN 300 468 v.1.13.1)
300  */
301 struct _GstMpegtsCableDeliverySystemDescriptor
302 {
303   guint32                            frequency;
304   GstMpegtsCableOuterFECScheme       outer_fec;
305   GstMpegtsModulationType            modulation;
306 
307   guint32                            symbol_rate;
308   GstMpegtsDVBCodeRate               fec_inner;
309 };
310 
311 #define GST_TYPE_MPEGTS_DVB_CABLE_DELIVERY_SYSTEM_DESCRIPTOR ( gst_mpegts_dvb_cable_system_delivery_descriptor_get_type())
312 
313 GST_MPEGTS_API
314 GType gst_mpegts_dvb_cable_delivery_system_descriptor_get_type (void);
315 
316 GST_MPEGTS_API
317 gboolean gst_mpegts_descriptor_parse_cable_delivery_system (const GstMpegtsDescriptor *descriptor,
318 							    GstMpegtsCableDeliverySystemDescriptor *res);
319 
320 GST_MPEGTS_API
321 void gst_mpegts_dvb_cable_delivery_system_descriptor_free (GstMpegtsCableDeliverySystemDescriptor * source);
322 
323 /* GST_MTS_DESC_DVB_BOUQUET_NAME (0x47) */
324 
325 GST_MPEGTS_API
326 gboolean gst_mpegts_descriptor_parse_dvb_bouquet_name (const GstMpegtsDescriptor * descriptor,
327                                                        gchar ** bouquet_name);
328 
329 /* GST_MTS_DESC_DVB_SERVICE (0x48) */
330 /**
331  * GstMpegtsDVBServiceType:
332  *
333  * The type of service of a channel.
334  *
335  * As specified in Table 87 of ETSI EN 300 468 v1.13.1
336  */
337 typedef enum {
338   GST_DVB_SERVICE_RESERVED_00               = 0x00,
339   GST_DVB_SERVICE_DIGITAL_TELEVISION,
340   GST_DVB_SERVICE_DIGITAL_RADIO_SOUND,
341   GST_DVB_SERVICE_TELETEXT,
342   GST_DVB_SERVICE_NVOD_REFERENCE,
343   GST_DVB_SERVICE_NVOD_TIME_SHIFTED,
344   GST_DVB_SERVICE_MOSAIC,
345   GST_DVB_SERVICE_FM_RADIO,
346   GST_DVB_SERVICE_DVB_SRM,
347   GST_DVB_SERVICE_RESERVED_09,
348   GST_DVB_SERVICE_ADVANCED_CODEC_DIGITAL_RADIO_SOUND,
349   GST_DVB_SERVICE_ADVANCED_CODEC_MOSAIC,
350   GST_DVB_SERVICE_DATA_BROADCAST,
351   GST_DVB_SERVICE_RESERVED_0D_COMMON_INTERFACE,
352   GST_DVB_SERVICE_RCS_MAP,
353   GST_DVB_SERVICE_RCS_FLS,
354   GST_DVB_SERVICE_DVB_MHP,
355   GST_DVB_SERVICE_MPEG2_HD_DIGITAL_TELEVISION,
356   /* 0x12 - 015 Reserved for future use */
357   GST_DVB_SERVICE_ADVANCED_CODEC_SD_DIGITAL_TELEVISION = 0x16,
358   GST_DVB_SERVICE_ADVANCED_CODEC_SD_NVOD_TIME_SHIFTED,
359   GST_DVB_SERVICE_ADVANCED_CODEC_SD_NVOD_REFERENCE,
360   GST_DVB_SERVICE_ADVANCED_CODEC_HD_DIGITAL_TELEVISION,
361   GST_DVB_SERVICE_ADVANCED_CODEC_HD_NVOD_TIME_SHIFTED,
362   GST_DVB_SERVICE_ADVANCED_CODEC_HD_NVOD_REFERENCE,
363   GST_DVB_SERVICE_ADVANCED_CODEC_STEREO_HD_DIGITAL_TELEVISION,
364   GST_DVB_SERVICE_ADVANCED_CODEC_STEREO_HD_NVOD_TIME_SHIFTED,
365   GST_DVB_SERVICE_ADVANCED_CODEC_STEREO_HD_NVOD_REFERENCE,
366   /* 0x1F - 0x7f Reserved for future use */
367   /* 0x80 - 0xfe user defined */
368   /* 0xff Reserved for future use */
369   GST_DVB_SERVICE_RESERVED_FF
370 } GstMpegtsDVBServiceType;
371 
372 GST_MPEGTS_API
373 gboolean gst_mpegts_descriptor_parse_dvb_service (const GstMpegtsDescriptor *descriptor,
374 						  GstMpegtsDVBServiceType *service_type,
375 						  gchar **service_name,
376 						  gchar **provider_name);
377 
378 GST_MPEGTS_API
379 GstMpegtsDescriptor *gst_mpegts_descriptor_from_dvb_service (GstMpegtsDVBServiceType service_type,
380 							     const gchar * service_name,
381 							     const gchar * service_provider);
382 
383 /* GST_MTS_DESC_DVB_SERVICE_LIST (0x41) */
384 typedef struct _GstMpegtsDVBServiceListItem GstMpegtsDVBServiceListItem;
385 
386 /**
387  * GstMpegtsDVBServiceListItem:
388  * @service_id: the id of a service
389  * @type: the type of a service
390  */
391 struct _GstMpegtsDVBServiceListItem
392 {
393   guint16                 service_id;
394   GstMpegtsDVBServiceType type;
395 };
396 
397 #define GST_TYPE_MPEGTS_DVB_SERVICE_LIST_ITEM (gst_mpegts_dvb_service_list_item_get_type ())
398 
399 GST_MPEGTS_API
400 GType gst_mpegts_dvb_service_list_item_get_type (void);
401 
402 GST_MPEGTS_API
403 gboolean gst_mpegts_descriptor_parse_dvb_service_list (const GstMpegtsDescriptor * descriptor,
404     GPtrArray ** list);
405 
406 /* GST_MTS_DESC_DVB_LINKAGE (0x4A) */
407 /**
408  * GstMpegtsDVBLinkageType:
409  *
410  * Linkage Type (EN 300 468 v.1.13.1)
411  */
412 typedef enum {
413   /* 0x00, 0x0F-0x7F reserved for future use */
414   GST_MPEGTS_DVB_LINKAGE_RESERVED_00               = 0x00,
415   GST_MPEGTS_DVB_LINKAGE_INFORMATION               = 0x01,
416   GST_MPEGTS_DVB_LINKAGE_EPG                       = 0x02,
417   GST_MPEGTS_DVB_LINKAGE_CA_REPLACEMENT            = 0x03,
418   GST_MPEGTS_DVB_LINKAGE_TS_CONTAINING_COMPLETE_SI = 0x04,
419   GST_MPEGTS_DVB_LINKAGE_SERVICE_REPLACEMENT       = 0x05,
420   GST_MPEGTS_DVB_LINKAGE_DATA_BROADCAST            = 0x06,
421   GST_MPEGTS_DVB_LINKAGE_RCS_MAP                   = 0x07,
422   GST_MPEGTS_DVB_LINKAGE_MOBILE_HAND_OVER          = 0x08,
423   GST_MPEGTS_DVB_LINKAGE_SYSTEM_SOFTWARE_UPDATE    = 0x09,
424   GST_MPEGTS_DVB_LINKAGE_TS_CONTAINING_SSU         = 0x0A,
425   GST_MPEGTS_DVB_LINKAGE_IP_MAC_NOTIFICATION       = 0x0B,
426   GST_MPEGTS_DVB_LINKAGE_TS_CONTAINING_INT         = 0x0C,
427   GST_MPEGTS_DVB_LINKAGE_EVENT                     = 0x0D,
428   GST_MPEGTS_DVB_LINKAGE_EXTENDED_EVENT            = 0x0E,
429 } GstMpegtsDVBLinkageType;
430 
431 typedef enum {
432   GST_MPEGTS_DVB_LINKAGE_HAND_OVER_RESERVED        = 0x00,
433   GST_MPEGTS_DVB_LINKAGE_HAND_OVER_IDENTICAL       = 0x01,
434   GST_MPEGTS_DVB_LINKAGE_HAND_OVER_LOCAL_VARIATION = 0x02,
435   GST_MPEGTS_DVB_LINKAGE_HAND_OVER_ASSOCIATED      = 0x03,
436 } GstMpegtsDVBLinkageHandOverType;
437 
438 typedef struct _GstMpegtsDVBLinkageMobileHandOver GstMpegtsDVBLinkageMobileHandOver;
439 typedef struct _GstMpegtsDVBLinkageEvent GstMpegtsDVBLinkageEvent;
440 typedef struct _GstMpegtsDVBLinkageExtendedEvent GstMpegtsDVBLinkageExtendedEvent;
441 typedef struct _GstMpegtsDVBLinkageDescriptor GstMpegtsDVBLinkageDescriptor;
442 
443 struct _GstMpegtsDVBLinkageMobileHandOver
444 {
445   GstMpegtsDVBLinkageHandOverType hand_over_type;
446   /* 0 = NIT, 1 = SDT */
447   gboolean                        origin_type;
448   guint16                         network_id;
449   guint16                         initial_service_id;
450 };
451 
452 struct _GstMpegtsDVBLinkageEvent
453 {
454   guint16  target_event_id;
455   gboolean target_listed;
456   gboolean event_simulcast;
457 };
458 
459 struct _GstMpegtsDVBLinkageExtendedEvent
460 {
461   guint16        target_event_id;
462   gboolean       target_listed;
463   gboolean       event_simulcast;
464   /* FIXME: */
465   guint8         link_type;
466   /* FIXME: */
467   guint8         target_id_type;
468   gboolean       original_network_id_flag;
469   gboolean       service_id_flag;
470   /* if (target_id_type == 3) */
471   guint16        user_defined_id;
472   /* else */
473   guint16        target_transport_stream_id;
474   guint16        target_original_network_id;
475   guint16        target_service_id;
476 };
477 
478 /**
479  * GstMpegtsDVBLinkageDescriptor:
480  * @transport_stream_id: the transport id
481  * @original_network_id: the original network id
482  * @service_id: the service id
483  * @linkage_type: the type which @linkage_data has
484  * @private_data_length: the length for @private_data_bytes
485  * @private_data_bytes: additional data bytes
486  */
487 struct _GstMpegtsDVBLinkageDescriptor
488 {
489   guint16                           transport_stream_id;
490   guint16                           original_network_id;
491   guint16                           service_id;
492   GstMpegtsDVBLinkageType           linkage_type;
493   /*< private >*/
494   gpointer                          linkage_data;
495   /*< public >*/
496   guint8                            private_data_length;
497   guint8                            *private_data_bytes;
498 };
499 
500 #define GST_TYPE_MPEGTS_DVB_LINKAGE_DESCRIPTOR ( gst_mpegts_dvb_linkage_descriptor_get_type())
501 
502 GST_MPEGTS_API
503 GType gst_mpegts_dvb_linkage_descriptor_get_type (void);
504 
505 GST_MPEGTS_API
506 void gst_mpegts_dvb_linkage_descriptor_free (GstMpegtsDVBLinkageDescriptor * source);
507 
508 #define GST_TYPE_MPEGTS_DVB_LINKAGE_MOBILE_HAND_OVER (gst_mpegts_dvb_linkage_mobile_hand_over_get_type())
509 
510 GST_MPEGTS_API
511 GType gst_mpegts_dvb_linkage_mobile_hand_over_get_type (void);
512 
513 GST_MPEGTS_API
514 const GstMpegtsDVBLinkageMobileHandOver * gst_mpegts_dvb_linkage_descriptor_get_mobile_hand_over
515     (const GstMpegtsDVBLinkageDescriptor * desc);
516 
517 #define GST_TYPE_MPEGTS_DVB_LINKAGE_EVENT (gst_mpegts_dvb_linkage_event_get_type())
518 
519 GST_MPEGTS_API
520 GType gst_mpegts_dvb_linkage_event_get_type (void);
521 
522 GST_MPEGTS_API
523 const GstMpegtsDVBLinkageEvent * gst_mpegts_dvb_linkage_descriptor_get_event
524     (const GstMpegtsDVBLinkageDescriptor * desc);
525 
526 #define GST_TYPE_MPEGTS_DVB_LINKAGE_EXTENDED_EVENT (gst_mpegts_dvb_linkage_extended_event_get_type())
527 
528 GST_MPEGTS_API
529 GType gst_mpegts_dvb_linkage_extended_event_get_type (void);
530 
531 GST_MPEGTS_API
532 const GPtrArray * gst_mpegts_dvb_linkage_descriptor_get_extended_event
533     (const GstMpegtsDVBLinkageDescriptor * desc);
534 
535 GST_MPEGTS_API
536 gboolean gst_mpegts_descriptor_parse_dvb_linkage (const GstMpegtsDescriptor * descriptor,
537                                                   GstMpegtsDVBLinkageDescriptor ** res);
538 
539 /* GST_MTS_DESC_DVB_SHORT_EVENT (0x4D) */
540 
541 GST_MPEGTS_API
542 gboolean gst_mpegts_descriptor_parse_dvb_short_event (const GstMpegtsDescriptor *descriptor,
543 						       gchar **language_code,
544 						       gchar **event_name,
545 						       gchar **text);
546 
547 /* GST_MTS_DESC_DVB_EXTENDED_EVENT (0x4E) */
548 typedef struct _GstMpegtsExtendedEventDescriptor GstMpegtsExtendedEventDescriptor;
549 typedef struct _GstMpegtsExtendedEventItem GstMpegtsExtendedEventItem;
550 
551 /* FIXME : Maybe make a separate method for getting a specific item entry ? */
552 struct _GstMpegtsExtendedEventItem
553 {
554   gchar *item_description;
555   gchar *item;
556 };
557 
558 #define GST_TYPE_MPEGTS_EXTENDED_EVENT_ITEM (gst_mpegts_extended_event_item_get_type())
559 
560 GST_MPEGTS_API
561 GType gst_mpegts_extended_event_item_get_type(void);
562 
563 /**
564  * GstMpegtsExtendedEventDescriptor:
565  * @descriptor_number:
566  * @last_descriptor_number:
567  * @language_code: NULL terminated language code.
568  * @items: (element-type GstMpegtsExtendedEventItem): the #GstMpegtsExtendedEventItem
569  * @text:
570  *
571  * Extended Event Descriptor (EN 300 468 v.1.13.1)
572  */
573 struct _GstMpegtsExtendedEventDescriptor
574 {
575   guint8 descriptor_number;
576   guint8 last_descriptor_number;
577   gchar  *language_code;
578   GPtrArray *items;
579   gchar *text;
580 };
581 
582 #define GST_TYPE_MPEGTS_EXTENDED_EVENT_DESCRIPTOR (gst_mpegts_extended_event_descriptor_get_type())
583 
584 GST_MPEGTS_API
585 GType gst_mpegts_extended_event_descriptor_get_type (void);
586 
587 GST_MPEGTS_API
588 void gst_mpegts_extended_event_descriptor_free (GstMpegtsExtendedEventDescriptor * source);
589 
590 GST_MPEGTS_API
591 gboolean gst_mpegts_descriptor_parse_dvb_extended_event (const GstMpegtsDescriptor *descriptor,
592 							  GstMpegtsExtendedEventDescriptor **res);
593 
594 /* GST_MTS_DESC_DVB_COMPONENT (0x50) */
595 #define GST_TYPE_MPEGTS_COMPONENT_DESCRIPTOR (gst_mpegts_component_descriptor_get_type ())
596 typedef enum {
597   GST_MPEGTS_STREAM_CONTENT_MPEG2_VIDEO          = 0x01,
598   GST_MPEGTS_STREAM_CONTENT_MPEG1_LAYER2_AUDIO   = 0x02,
599   GST_MPEGTS_STREAM_CONTENT_TELETEXT_OR_SUBTITLE = 0x03,
600   GST_MPEGTS_STREAM_CONTENT_AC_3                 = 0x04,
601   GST_MPEGTS_STREAM_CONTENT_AVC                  = 0x05,
602   GST_MPEGTS_STREAM_CONTENT_AAC                  = 0x06,
603   GST_MPEGTS_STREAM_CONTENT_DTS                  = 0x07,
604   GST_MPEGTS_STREAM_CONTENT_SRM_CPCM             = 0x08
605 } GstMpegtsComponentStreamContent;
606 
607 typedef struct _GstMpegtsComponentDescriptor GstMpegtsComponentDescriptor;
608 struct _GstMpegtsComponentDescriptor
609 {
610   guint8 stream_content;
611   guint8 component_type;
612   guint8 component_tag;
613   gchar  *language_code;
614   gchar  *text;
615 };
616 
617 GST_MPEGTS_API
618 GType gst_mpegts_component_descriptor_get_type (void);
619 
620 GST_MPEGTS_API
621 void gst_mpegts_dvb_component_descriptor_free (GstMpegtsComponentDescriptor * source);
622 
623 GST_MPEGTS_API
624 gboolean gst_mpegts_descriptor_parse_dvb_component (const GstMpegtsDescriptor *descriptor,
625 						    GstMpegtsComponentDescriptor **res);
626 
627 /* GST_MTS_DESC_DVB_STREAM_IDENTIFIER (0x52) */
628 
629 GST_MPEGTS_API
630 gboolean gst_mpegts_descriptor_parse_dvb_stream_identifier (const GstMpegtsDescriptor *descriptor,
631 							    guint8 *component_tag);
632 
633 /* GST_MTS_DESC_DVB_CA_IDENTIFIER (0x53) */
634 
635 GST_MPEGTS_API
636 gboolean gst_mpegts_descriptor_parse_dvb_ca_identifier (const GstMpegtsDescriptor * descriptor,
637                                                         GArray ** list);
638 
639 /* GST_MTS_DESC_DVB_CONTENT (0x54) */
640 typedef enum {
641   GST_MPEGTS_CONTENT_MOVIE_DRAMA                = 0x01,
642   GST_MPEGTS_CONTENT_NEWS_CURRENT_AFFAIRS       = 0x02,
643   GST_MPEGTS_CONTENT_SHOW_GAME_SHOW             = 0x03,
644   GST_MPEGTS_CONTENT_SPORTS                     = 0x04,
645   GST_MPEGTS_CONTENT_CHILDREN_YOUTH_PROGRAM     = 0x05,
646   GST_MPEGTS_CONTENT_MUSIC_BALLET_DANCE         = 0x06,
647   GST_MPEGTS_CONTENT_ARTS_CULTURE               = 0x07,
648   GST_MPEGTS_CONTENT_SOCIAL_POLITICAL_ECONOMICS = 0x08,
649   GST_MPEGTS_CONTENT_EDUCATION_SCIENCE_FACTUAL  = 0x09,
650   GST_MPEGTS_CONTENT_LEISURE_HOBBIES            = 0x0A,
651   GST_MPEGTS_CONTENT_SPECIAL_CHARACTERISTICS    = 0x0B
652 } GstMpegtsContentNibbleHi;
653 
654 typedef struct _GstMpegtsContent GstMpegtsContent;
655 struct _GstMpegtsContent
656 {
657   GstMpegtsContentNibbleHi content_nibble_1;
658   guint8 content_nibble_2;
659   guint8 user_byte;
660 };
661 
662 #define GST_TYPE_MPEGTS_CONTENT (gst_mpegts_content_get_type ())
663 
664 GST_MPEGTS_API
665 GType gst_mpegts_content_get_type (void);
666 
667 GST_MPEGTS_API
668 gboolean gst_mpegts_descriptor_parse_dvb_content (const GstMpegtsDescriptor *
669 	descriptor, GPtrArray ** content);
670 
671 /* GST_MTS_DESC_DVB_PARENTAL_RATING (0x55) */
672 typedef struct _GstMpegtsDVBParentalRatingItem GstMpegtsDVBParentalRatingItem;
673 
674 #define GST_TYPE_MPEGTS_DVB_PARENTAL_RATING_ITEM (gst_mpegts_dvb_parental_rating_item_get_type())
675 
676 GST_MPEGTS_API
677 GType gst_mpegts_dvb_parental_rating_item_get_type (void);
678 
679 /**
680  * GstMpegtsDVBParentalRating:
681  * @country_code: This 24-bit field identifies a country using the 3-character
682  * code as specified in ISO 3166
683  * @rating: the rating age
684  */
685 struct _GstMpegtsDVBParentalRatingItem
686 {
687   gchar  *country_code;
688   guint8 rating;
689 };
690 
691 GST_MPEGTS_API
692 gboolean gst_mpegts_descriptor_parse_dvb_parental_rating (const GstMpegtsDescriptor
693         * descriptor, GPtrArray ** rating);
694 
695 /* GST_MTS_DESC_DVB_TELETEXT (0x56) */
696 /**
697  * GstMpegtsDVBTeletextType:
698  *
699  * The type of teletext page.
700  *
701  * As specified in Table 100 of ETSI EN 300 468 v1.13.1
702  */
703 typedef enum {
704   INITIAL_PAGE = 0x01,
705   SUBTITLE_PAGE,
706   ADDITIONAL_INFO_PAGE,
707   PROGRAMME_SCHEDULE_PAGE,
708   HEARING_IMPAIRED_PAGE
709 } GstMpegtsDVBTeletextType;
710 
711 GST_MPEGTS_API
712 gboolean gst_mpegts_descriptor_parse_dvb_teletext_idx (const GstMpegtsDescriptor *
713     descriptor, guint idx, gchar ** language_code,
714     GstMpegtsDVBTeletextType * teletext_type, guint8 * magazine_number,
715     guint8 * page_number);
716 
717 GST_MPEGTS_API
718 guint gst_mpegts_descriptor_parse_dvb_teletext_nb (const GstMpegtsDescriptor *
719     descriptor);
720 
721 /* GST_MTS_DESC_DVB_SUBTITLING (0x59) */
722 
723 GST_MPEGTS_API
724 gboolean gst_mpegts_descriptor_parse_dvb_subtitling_idx (const GstMpegtsDescriptor *descriptor,
725 							 guint idx, gchar ** lang,
726 							 guint8 *type, guint16 *composition_page_id,
727 							 guint16 *ancillary_page_id);
728 
729 GST_MPEGTS_API
730 guint gst_mpegts_descriptor_parse_dvb_subtitling_nb (const GstMpegtsDescriptor *descriptor);
731 
732 GST_MPEGTS_API
733 GstMpegtsDescriptor * gst_mpegts_descriptor_from_dvb_subtitling (const gchar *lang,
734     guint8 type, guint16 composition, guint16 ancillary);
735 
736 
737 
738 /* GST_MTS_DESC_DVB_TERRESTRIAL_DELIVERY_SYSTEM (0x5A) */
739 typedef struct _GstMpegtsTerrestrialDeliverySystemDescriptor GstMpegtsTerrestrialDeliverySystemDescriptor;
740 
741 typedef enum {
742   GST_MPEGTS_TRANSMISSION_MODE_2K = 0,
743   GST_MPEGTS_TRANSMISSION_MODE_8K,
744   GST_MPEGTS_TRANSMISSION_MODE_AUTO,
745   GST_MPEGTS_TRANSMISSION_MODE_4K,
746   GST_MPEGTS_TRANSMISSION_MODE_1K,
747   GST_MPEGTS_TRANSMISSION_MODE_16K,
748   GST_MPEGTS_TRANSMISSION_MODE_32K,
749   GST_MPEGTS_TRANSMISSION_MODE_C1,
750   GST_MPEGTS_TRANSMISSION_MODE_C3780
751 } GstMpegtsTerrestrialTransmissionMode;
752 
753 typedef enum {
754   GST_MPEGTS_GUARD_INTERVAL_1_32 = 0,
755   GST_MPEGTS_GUARD_INTERVAL_1_16,
756   GST_MPEGTS_GUARD_INTERVAL_1_8,
757   GST_MPEGTS_GUARD_INTERVAL_1_4,
758   GST_MPEGTS_GUARD_INTERVAL_AUTO,
759   GST_MPEGTS_GUARD_INTERVAL_1_128,
760   GST_MPEGTS_GUARD_INTERVAL_19_128,
761   GST_MPEGTS_GUARD_INTERVAL_19_256,
762   GST_MPEGTS_GUARD_INTERVAL_PN420,
763   GST_MPEGTS_GUARD_INTERVAL_PN595,
764   GST_MPEGTS_GUARD_INTERVAL_PN945
765 } GstMpegtsTerrestrialGuardInterval;
766 
767 typedef enum {
768   GST_MPEGTS_HIERARCHY_NONE = 0,
769   GST_MPEGTS_HIERARCHY_1,
770   GST_MPEGTS_HIERARCHY_2,
771   GST_MPEGTS_HIERARCHY_4,
772   GST_MPEGTS_HIERARCHY_AUTO
773 } GstMpegtsTerrestrialHierarchy;
774 
775 /**
776  * GstMpegtsTerrestrialDeliverySystemDescriptor:
777  * @frequency: the frequency in Hz (Hertz)
778  * @bandwidth: the bandwidth in Hz (Hertz)
779  * @priority: %TRUE High Priority %FALSE Low Priority
780  * @time_slicing: %TRUE no time slicing %FALSE time slicing
781  * @mpe_fec: %TRUE no mpe-fec is used %FALSE mpe-fec is use
782  * @constellation: the constellation
783  * @hierarchy: the hierarchy
784  * @code_rate_hp:
785  * @code_rate_lp:
786  * @guard_interval:
787  * @transmission_mode:
788  * @other_frequency: %TRUE more frequency are use, else not
789  *
790  * Terrestrial Delivery System Descriptor (EN 300 468 v.1.13.1)
791  */
792 
793 struct _GstMpegtsTerrestrialDeliverySystemDescriptor
794 {
795   guint32				frequency;
796   guint32				bandwidth;
797   gboolean				priority;
798   gboolean				time_slicing;
799   gboolean				mpe_fec;
800   GstMpegtsModulationType		constellation;
801   GstMpegtsTerrestrialHierarchy		hierarchy;
802   GstMpegtsDVBCodeRate			code_rate_hp;
803   GstMpegtsDVBCodeRate			code_rate_lp;
804   GstMpegtsTerrestrialGuardInterval	guard_interval;
805   GstMpegtsTerrestrialTransmissionMode	transmission_mode;
806   gboolean				other_frequency;
807 };
808 
809 #define GST_TYPE_MPEGTS_TERRESTRIAL_DELIVERY_SYSTEM_DESCRIPTOR (gst_mpegts_terrestrial_delivery_system_descriptor_get_type())
810 
811 GST_MPEGTS_API
812 GType gst_mpegts_terrestrial_delivery_system_descriptor_get_type(void);
813 
814 GST_MPEGTS_API
815 gboolean gst_mpegts_descriptor_parse_terrestrial_delivery_system (const GstMpegtsDescriptor
816               *descriptor, GstMpegtsTerrestrialDeliverySystemDescriptor * res);
817 
818 /* GST_MTS_DESC_DVB_MULTILINGUAL_NETWORK_NAME (0x5B) */
819 typedef struct _GstMpegtsDvbMultilingualNetworkNameItem GstMpegtsDvbMultilingualNetworkNameItem;
820 
821 /**
822  * GstMpegtsDvbMultilingualNetworkNameItem:
823  * @language_code: the ISO 639 language code
824  * @network_name: the network name
825  *
826  * a multilingual network name entry
827  */
828 struct _GstMpegtsDvbMultilingualNetworkNameItem
829 {
830   gchar *language_code;
831   gchar *network_name;
832 };
833 
834 #define GST_TYPE_MPEGTS_DVB_MULTILINGUAL_NETWORK_NAME_ITEM (gst_mpegts_dvb_multilingual_network_name_item_get_type())
835 
836 GST_MPEGTS_API
837 GType gst_mpegts_dvb_multilingual_network_name_item_get_type(void);
838 
839 GST_MPEGTS_API
840 gboolean gst_mpegts_descriptor_parse_dvb_multilingual_network_name (const GstMpegtsDescriptor
841               *descriptor, GPtrArray ** network_name_items);
842 
843 /* GST_MTS_DESC_DVB_MULTILINGUAL_BOUQUET_NAME (0x5C) */
844 typedef struct _GstMpegtsDvbMultilingualBouquetNameItem GstMpegtsDvbMultilingualBouquetNameItem;
845 
846 /**
847  * GstMpegtsDvbMultilingualBouquetNameItem:
848  * @language_code: the ISO 639 language code
849  * @bouquet_name: the bouquet name
850  *
851  * a multilingual bouquet name entry
852  */
853 struct _GstMpegtsDvbMultilingualBouquetNameItem
854 {
855   gchar *language_code;
856   gchar *bouquet_name;
857 };
858 
859 #define GST_TYPE_MPEGTS_DVB_MULTILINGUAL_BOUQUET_NAME_ITEM (gst_mpegts_dvb_multilingual_bouquet_name_item_get_type())
860 
861 GST_MPEGTS_API
862 GType gst_mpegts_dvb_multilingual_bouquet_name_item_get_type(void);
863 
864 GST_MPEGTS_API
865 gboolean gst_mpegts_descriptor_parse_dvb_multilingual_bouquet_name (const GstMpegtsDescriptor
866               *descriptor, GPtrArray ** bouquet_name_items);
867 
868 /* GST_MTS_DESC_DVB_MULTILINGUAL_SERVICE_NAME (0x5D) */
869 typedef struct _GstMpegtsDvbMultilingualServiceNameItem GstMpegtsDvbMultilingualServiceNameItem;
870 
871 /**
872  * GstMpegtsDvbMultilingualServiceNameItem:
873  * @language_code: the ISO 639 language code
874  * @provider_name: the provider name
875  * @service_name: the service name
876  *
877  * a multilingual service name entry
878  */
879 struct _GstMpegtsDvbMultilingualServiceNameItem
880 {
881   gchar *language_code;
882   gchar *provider_name;
883   gchar *service_name;
884 };
885 
886 #define GST_TYPE_MPEGTS_DVB_MULTILINGUAL_SERVICE_NAME_ITEM (gst_mpegts_dvb_multilingual_service_name_item_get_type())
887 
888 GST_MPEGTS_API
889 GType gst_mpegts_dvb_multilingual_service_name_item_get_type(void);
890 
891 GST_MPEGTS_API
892 gboolean gst_mpegts_descriptor_parse_dvb_multilingual_service_name (const GstMpegtsDescriptor
893               *descriptor, GPtrArray ** service_name_items);
894 
895 /* GST_MTS_DESC_DVB_MULTILINGUAL_COMPONENT (0x5E) */
896 typedef struct _GstMpegtsDvbMultilingualComponentItem GstMpegtsDvbMultilingualComponentItem;
897 
898 /**
899  * GstMpegtsDvbMultilingualComponentItem:
900  * @language_code: the ISO 639 language code
901  * @description: the component description
902  */
903 struct _GstMpegtsDvbMultilingualComponentItem
904 {
905   gchar *language_code;
906   gchar *description;
907 };
908 
909 #define GST_TYPE_MPEGTS_DVB_MULTILINGUAL_COMPONENT_ITEM (gst_mpegts_dvb_multilingual_component_item_get_type())
910 
911 GST_MPEGTS_API
912 GType gst_mpegts_dvb_multilingual_component_item_get_type(void);
913 
914 GST_MPEGTS_API
915 gboolean gst_mpegts_descriptor_parse_dvb_multilingual_component (const GstMpegtsDescriptor
916               *descriptor, guint8 * component_tag, GPtrArray ** component_description_items);
917 
918 /* GST_MTS_DESC_DVB_PRIVATE_DATA_SPECIFIER (0x5F) */
919 
920 GST_MPEGTS_API
921 gboolean gst_mpegts_descriptor_parse_dvb_private_data_specifier (const GstMpegtsDescriptor
922               * descriptor, guint32 * private_data_specifier, guint8 ** private_data,
923               guint8 * length);
924 
925 /* GST_MTS_DESC_DVB_FREQUENCY_LIST (0x62) */
926 
927 GST_MPEGTS_API
928 gboolean gst_mpegts_descriptor_parse_dvb_frequency_list (const GstMpegtsDescriptor
929     * descriptor, gboolean * offset, GArray ** list);
930 
931 /* GST_MTS_DESC_DVB_DATA_BROADCAST (0x64) */
932 typedef struct _GstMpegtsDataBroadcastDescriptor GstMpegtsDataBroadcastDescriptor;
933 
934 /**
935  * GstMpegtsDataBroadcastDescriptor:
936  * @data_broadcast_id: the data broadcast id
937  * @component_tag: the component tag
938  * @selector_bytes: the selector byte field
939  * @language_code: language of @text
940  * @text: description of data broadcast
941  */
942 struct _GstMpegtsDataBroadcastDescriptor
943 {
944   guint16     data_broadcast_id;
945   guint8      component_tag;
946   guint8      length;
947   guint8      *selector_bytes;
948   gchar       *language_code;
949   gchar       *text;
950 };
951 
952 
953 #define GST_TYPE_MPEGTS_DVB_DATA_BROADCAST_DESCRIPTOR (gst_mpegts_dvb_data_broadcast_descriptor_get_type ())
954 GST_MPEGTS_API
955 GType gst_mpegts_dvb_data_broadcast_descriptor_get_type (void);
956 
957 GST_MPEGTS_API
958 void gst_mpegts_dvb_data_broadcast_descriptor_free (GstMpegtsDataBroadcastDescriptor * source);
959 
960 GST_MPEGTS_API
961 gboolean gst_mpegts_descriptor_parse_dvb_data_broadcast (const GstMpegtsDescriptor
962               *descriptor, GstMpegtsDataBroadcastDescriptor ** res);
963 
964 /* GST_MTS_DESC_DVB_SCRAMBLING (0x65) */
965 typedef enum
966 {
967   GST_MPEGTS_DVB_SCRAMBLING_MODE_RESERVED              = 0x00,
968   GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA1                  = 0x01,
969   GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA2                  = 0x02,
970   GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA3_STANDARD         = 0x03,
971   GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA3_MINIMAL_ENHANCED = 0x04,
972   GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA3_FULL_ENHANCED    = 0x05,
973   /* 0x06 - 0x0f reserved for future use */
974   GST_MPEGTS_DVB_SCRAMBLING_MODE_CISSA                 = 0x10,
975   /* 0x11 - 0x1f reserved for future DVB-CISSA versions */
976   GST_MPEGTS_DVB_SCRAMBLING_MODE_ATIS_0                = 0x70,
977   GST_MPEGTS_DVB_SCRAMBLING_MODE_ATIS_F                = 0x7f,
978 } GstMpegtsDVBScramblingModeType;
979 
980 GST_MPEGTS_API
981 gboolean gst_mpegts_descriptor_parse_dvb_scrambling (const GstMpegtsDescriptor * descriptor,
982        GstMpegtsDVBScramblingModeType * scrambling_mode);
983 
984 /* GST_MTS_DESC_DVB_DATA_BROADCAST_ID (0x66) */
985 
986 GST_MPEGTS_API
987 gboolean gst_mpegts_descriptor_parse_dvb_data_broadcast_id (const GstMpegtsDescriptor
988        * descriptor, guint16 * data_broadcast_id, guint8 ** id_selector_bytes, guint8 * len);
989 
990 /* GST_MTS_DESC_DVB_AC3 (0x6a) */
991 /* FIXME : Implement */
992 
993 /* GST_MTS_DESC_EXT_DVB_T2_DELIVERY_SYSTEM (0x7F && 0x04) */
994 typedef struct _GstMpegtsT2DeliverySystemCellExtension GstMpegtsT2DeliverySystemCellExtension;
995 
996 /**
997  * GstMpegtsT2DeliverySystemCellExtension:
998  * @cell_id_extension: id of the sub cell
999  * @transposer_frequency: centre frequency of the sub cell in Hz
1000  */
1001 struct _GstMpegtsT2DeliverySystemCellExtension
1002 {
1003   guint8  cell_id_extension;
1004   guint32 transposer_frequency;
1005 };
1006 
1007 #define GST_TYPE_MPEGTS_T2_DELIVERY_SYSTEM_CELL_EXTENSION (gst_mpegts_t2_delivery_system_cell_extension_get_type())
1008 
1009 GST_MPEGTS_API
1010 GType gst_mpegts_t2_delivery_system_cell_extension_get_type(void);
1011 
1012 typedef struct _GstMpegtsT2DeliverySystemCell GstMpegtsT2DeliverySystemCell;
1013 
1014 /**
1015  * GstMpegtsT2DeliverySystemCell:
1016  * @cell_id: id of the cell
1017  * @centre_frequencies: (element-type guint32): centre frequencies in Hz
1018  * @sub_cells: (element-type GstMpegtsT2DeliverySystemCellExtension):
1019  */
1020 struct _GstMpegtsT2DeliverySystemCell
1021 {
1022   guint16      cell_id;
1023   GArray       *centre_frequencies;
1024   GPtrArray    *sub_cells;
1025 };
1026 
1027 #define GST_TYPE_MPEGTS_T2_DELIVERY_SYSTEM_CELL (gst_mpegts_t2_delivery_system_cell_get_type())
1028 
1029 GST_MPEGTS_API
1030 GType gst_mpegts_t2_delivery_system_cell_get_type(void);
1031 
1032 typedef struct _GstMpegtsT2DeliverySystemDescriptor GstMpegtsT2DeliverySystemDescriptor;
1033 
1034 /**
1035  * GstMpegtsT2DeliverySystemDescriptor:
1036  * @plp_id:
1037  * @t2_system_id:
1038  * @siso_miso:
1039  * @bandwidth:
1040  * @guard_interval:
1041  * @transmission_mode:
1042  * @other_frequency:
1043  * @tfs:
1044  * @cells: (element-type GstMpegtsT2DeliverySystemCell):
1045  *
1046  * describe DVB-T2 transmissions according to EN 302 755
1047  */
1048 struct _GstMpegtsT2DeliverySystemDescriptor
1049 {
1050   guint8                                plp_id;
1051   guint16                               t2_system_id;
1052   /* FIXME: */
1053   guint8                                siso_miso;
1054   guint32                               bandwidth;
1055   GstMpegtsTerrestrialGuardInterval     guard_interval;
1056   GstMpegtsTerrestrialTransmissionMode  transmission_mode;
1057   gboolean                              other_frequency;
1058   gboolean                              tfs;
1059   GPtrArray                             *cells;
1060 };
1061 
1062 #define GST_TYPE_MPEGTS_T2_DELIVERY_SYSTEM_DESCRIPTOR (gst_mpegts_t2_delivery_system_descriptor_get_type ())
1063 GST_MPEGTS_API
1064 GType gst_mpegts_t2_delivery_system_descriptor_get_type (void);
1065 
1066 GST_MPEGTS_API
1067 void gst_mpegts_t2_delivery_system_descriptor_free (GstMpegtsT2DeliverySystemDescriptor * source);
1068 
1069 GST_MPEGTS_API
1070 gboolean gst_mpegts_descriptor_parse_dvb_t2_delivery_system (const GstMpegtsDescriptor
1071               *descriptor, GstMpegtsT2DeliverySystemDescriptor ** res);
1072 
1073 /**
1074  * GstMpegtsAudioPreselectionDescriptor:
1075  * @preselection_id: 5-bit
1076  * @audio_rendering_indication: 3-bit field
1077  * @audio_description: visually impaired
1078  * @spoken_subtitles:
1079  * @dialogue_enhancement:
1080  * @interactivity_enabled:
1081  * @language_code_present:
1082  * @text_label_present:
1083  * @multi_stream_info_present: indicates if this PID conveys a complete audio programme
1084  * @future_extension:
1085  * @language_code: NULL terminated ISO 639 language code.
1086  * @message_id:
1087  * @items: (element-type GstMpegtsExtendedEventItem): the #GstMpegtsExtendedEventItem
1088  * @text:
1089  *
1090  * Table 110: Audio Preselection Descriptor (ETSI EN 300 468 v1.16.1)
1091  *
1092  * Since: 1.20
1093  */
1094 typedef struct _GstMpegtsAudioPreselectionDescriptor GstMpegtsAudioPreselectionDescriptor;
1095 struct _GstMpegtsAudioPreselectionDescriptor
1096 {
1097   guint8                                preselection_id;
1098   guint8                                audio_rendering_indication;
1099   gboolean                              audio_description;
1100   gboolean                              spoken_subtitles;
1101   gboolean                              dialogue_enhancement;
1102   gboolean                              interactivity_enabled;
1103   gboolean                              language_code_present;
1104   gboolean                              text_label_present;
1105   gboolean                              multi_stream_info_present;
1106   gboolean                              future_extension;
1107   gchar                                 *language_code;
1108   guint8                                message_id;
1109 };
1110 
1111 GST_MPEGTS_API
1112 gboolean
1113 gst_mpegts_descriptor_parse_audio_preselection_list (const GstMpegtsDescriptor
1114     * descriptor, GPtrArray ** list);
1115 
1116 /**
1117  * gst_mpegts_descriptor_parse_audio_preselection_free:
1118  *
1119  * Since: 1.20
1120  */
1121 GST_MPEGTS_API
1122 void
1123 gst_mpegts_descriptor_parse_audio_preselection_free (GstMpegtsAudioPreselectionDescriptor
1124     * source);
1125 
1126 /**
1127  * gst_mpegts_descriptor_parse_audio_preselection_dump:
1128  *
1129  * Since: 1.20
1130  */
1131 GST_MPEGTS_API
1132 void
1133 gst_mpegts_descriptor_parse_audio_preselection_dump (GstMpegtsAudioPreselectionDescriptor
1134     * source);
1135 
1136 
1137 G_END_DECLS
1138 
1139 #endif				/* GST_MPEGTS_DESCRIPTOR_H */
1140