2 * gstmpegtsdescriptor.h -
3 * Copyright (C) 2013 Edward Hervey
6 * Edward Hervey <edward@collabora.com>
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.
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.
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.
23 * Some parts of this code come from the Fluendo MPEG Demuxer plugin.
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.
29 * Contributor(s): Wim Taymans <wim@fluendo.com>
32 #ifndef GST_DVB_DESCRIPTOR_H
33 #define GST_DVB_DESCRIPTOR_H
36 #include <gst/mpegts/mpegts-prelude.h>
41 * GstMpegtsDVBDescriptorType:
43 * The type of #GstMpegtsDescriptor
45 * These values correspond to the registered descriptor type from
46 * the various DVB specifications.
48 * Consult the relevant specifications for more details.
51 /* 64-127 DVB tags ETSI EN 300 468
52 * (Specification for Service Information (SI) in DVB systems)
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 GST_MTS_DESC_DVB_PARTIAL_TRANSPORT_STREAM = 0x63,
90 GST_MTS_DESC_DVB_DATA_BROADCAST = 0x64,
91 GST_MTS_DESC_DVB_SCRAMBLING = 0x65,
92 GST_MTS_DESC_DVB_DATA_BROADCAST_ID = 0x66,
93 GST_MTS_DESC_DVB_TRANSPORT_STREAM = 0x67,
94 GST_MTS_DESC_DVB_DSNG = 0x68,
95 GST_MTS_DESC_DVB_PDC = 0x69,
96 GST_MTS_DESC_DVB_AC3 = 0x6A,
97 GST_MTS_DESC_DVB_ANCILLARY_DATA = 0x6B,
98 GST_MTS_DESC_DVB_CELL_LIST = 0x6C,
99 GST_MTS_DESC_DVB_CELL_FREQUENCY_LINK = 0x6D,
100 GST_MTS_DESC_DVB_ANNOUNCEMENT_SUPPORT = 0x6E,
101 GST_MTS_DESC_DVB_APPLICATION_SIGNALLING = 0x6F,
102 GST_MTS_DESC_DVB_ADAPTATION_FIELD_DATA = 0x70,
103 GST_MTS_DESC_DVB_SERVICE_IDENTIFIER = 0x71,
104 GST_MTS_DESC_DVB_SERVICE_AVAILABILITY = 0x72,
105 GST_MTS_DESC_DVB_DEFAULT_AUTHORITY = 0x73,
106 GST_MTS_DESC_DVB_RELATED_CONTENT = 0x74,
107 GST_MTS_DESC_DVB_TVA_ID = 0x75,
108 GST_MTS_DESC_DVB_CONTENT_IDENTIFIER = 0x76,
109 GST_MTS_DESC_DVB_TIMESLICE_FEC_IDENTIFIER = 0x77,
110 GST_MTS_DESC_DVB_ECM_REPETITION_RATE = 0x78,
111 GST_MTS_DESC_DVB_S2_SATELLITE_DELIVERY_SYSTEM = 0x79,
112 GST_MTS_DESC_DVB_ENHANCED_AC3 = 0x7A,
113 GST_MTS_DESC_DVB_DTS = 0x7B,
114 GST_MTS_DESC_DVB_AAC = 0x7C,
115 GST_MTS_DESC_DVB_XAIT_LOCATION = 0x7D,
116 GST_MTS_DESC_DVB_FTA_CONTENT_MANAGEMENT = 0x7E,
117 GST_MTS_DESC_DVB_EXTENSION = 0x7F,
118 } GstMpegtsDVBDescriptorType;
121 * GstMpegtsDVBExtendedDescriptorType:
123 * The type of #GstMpegtsDescriptor
125 * These values correspond to the registered extended descriptor
126 * type from the various DVB specifications.
128 * Consult the relevant specifications for more details.
131 /* 00 - 0x7F DVB extended tags ETSI EN 300 468
132 * (Specification for Service Information (SI) in DVB systems)
134 GST_MTS_DESC_EXT_DVB_IMAGE_ICON = 0x00,
136 GST_MTS_DESC_EXT_DVB_CPCM_DELIVERY_SIGNALLING = 0x01,
137 GST_MTS_DESC_EXT_DVB_CP = 0x02,
138 GST_MTS_DESC_EXT_DVB_CP_IDENTIFIER = 0x03,
139 GST_MTS_DESC_EXT_DVB_T2_DELIVERY_SYSTEM = 0x04,
140 GST_MTS_DESC_EXT_DVB_SH_DELIVERY_SYSTEM = 0x05,
141 GST_MTS_DESC_EXT_DVB_SUPPLEMENTARY_AUDIO = 0x06,
142 GST_MTS_DESC_EXT_DVB_NETWORK_CHANGE_NOTIFY = 0x07,
143 GST_MTS_DESC_EXT_DVB_MESSAGE = 0x08,
144 GST_MTS_DESC_EXT_DVB_TARGET_REGION = 0x09,
145 GST_MTS_DESC_EXT_DVB_TARGET_REGION_NAME = 0x0A,
146 GST_MTS_DESC_EXT_DVB_SERVICE_RELOCATED = 0x0B,
147 GST_MTS_DESC_EXT_DVB_XAIT_PID = 0x0C,
148 GST_MTS_DESC_EXT_DVB_C2_DELIVERY_SYSTEM = 0x0D,
149 GST_MTS_DESC_EXT_DVB_DTS_HD_AUDIO_STREAM = 0x0E,
150 GST_MTS_DESC_EXT_DVB_DTS_NEUTRAL = 0x0F,
151 GST_MTS_DESC_EXT_DVB_VIDEO_DEPTH_RANGE = 0x10,
152 GST_MTS_DESC_EXT_DVB_T2MI = 0x11,
153 GST_MTS_DESC_EXT_DVB_URI_LINKAGE = 0x13,
154 } GstMpegtsDVBExtendedDescriptorType;
156 /* GST_MTS_DESC_DVB_CAROUSEL_IDENTIFIER (0x13) */
157 /* FIXME : Implement */
159 /* GST_MTS_DESC_DVB_NETWORK_NAME (0x40) */
162 gboolean gst_mpegts_descriptor_parse_dvb_network_name (const GstMpegtsDescriptor *descriptor,
166 GstMpegtsDescriptor *gst_mpegts_descriptor_from_dvb_network_name (const gchar * name);
168 /* GST_MTS_DESC_DVB_STUFFING (0x42) */
171 gboolean gst_mpegts_descriptor_parse_dvb_stuffing (const GstMpegtsDescriptor * descriptor,
172 guint8 ** stuffing_bytes);
175 /* GST_MTS_DESC_DVB_SATELLITE_DELIVERY_SYSTEM (0x43) */
176 typedef struct _GstMpegtsSatelliteDeliverySystemDescriptor GstMpegtsSatelliteDeliverySystemDescriptor;
179 GST_MPEGTS_MODULATION_QPSK = 0,
180 GST_MPEGTS_MODULATION_QAM_16,
181 GST_MPEGTS_MODULATION_QAM_32,
182 GST_MPEGTS_MODULATION_QAM_64,
183 GST_MPEGTS_MODULATION_QAM_128,
184 GST_MPEGTS_MODULATION_QAM_256,
185 GST_MPEGTS_MODULATION_QAM_AUTO,
186 GST_MPEGTS_MODULATION_VSB_8,
187 GST_MPEGTS_MODULATION_VSB_16,
188 GST_MPEGTS_MODULATION_PSK_8,
189 GST_MPEGTS_MODULATION_APSK_16,
190 GST_MPEGTS_MODULATION_APSK_32,
191 GST_MPEGTS_MODULATION_DQPSK,
192 GST_MPEGTS_MODULATION_QAM_4_NR_,
193 GST_MPEGTS_MODULATION_NONE
194 } GstMpegtsModulationType;
197 GST_MPEGTS_FEC_NONE = 0,
210 } GstMpegtsDVBCodeRate;
213 GST_MPEGTS_ROLLOFF_35 = 0,
214 GST_MPEGTS_ROLLOFF_20,
215 GST_MPEGTS_ROLLOFF_25,
216 GST_MPEGTS_ROLLOFF_RESERVED,
217 GST_MPEGTS_ROLLOFF_AUTO
218 } GstMpegtsSatelliteRolloff;
221 GST_MPEGTS_POLARIZATION_LINEAR_HORIZONTAL = 0,
222 GST_MPEGTS_POLARIZATION_LINEAR_VERTICAL,
223 GST_MPEGTS_POLARIZATION_CIRCULAR_LEFT,
224 GST_MPEGTS_POLARIZATION_CIRCULAR_RIGHT
225 } GstMpegtsSatellitePolarizationType;
228 * GstMpegtsSatelliteDeliverySystemDescriptor:
229 * @frequency: the frequency in kHz (kiloHertz)
230 * @orbital_position: the orbital position in degrees
231 * @west_east: If %TRUE, the satellite is in the eastern part of the orbit,
232 * else in the western part.
233 * @polarization: The polarization of the transmitted signal
234 * @roll_off: Roll-off factor used in DVB-S2
235 * @modulation_system: modulation system, %TRUE if DVB-S2, else DVB-S
236 * @modulation_type: Modulation scheme used
237 * @symbol_rate: Symbol rate (in symbols per second)
238 * @fec_inner: inner FEC scheme used
240 * Satellite Delivery System Descriptor (EN 300 468 v.1.13.1)
242 struct _GstMpegtsSatelliteDeliverySystemDescriptor
245 gfloat orbital_position;
247 GstMpegtsSatellitePolarizationType polarization;
249 GstMpegtsSatelliteRolloff roll_off;
250 gboolean modulation_system;
251 GstMpegtsModulationType modulation_type;
254 GstMpegtsDVBCodeRate fec_inner;
257 #define GST_TYPE_MPEGTS_SATELLITE_DELIVERY_SYSTEM_DESCRIPTOR (gst_mpegts_satellite_delivery_system_descriptor_get_type())
260 GType gst_mpegts_satellite_delivery_system_descriptor_get_type(void);
263 gboolean gst_mpegts_descriptor_parse_satellite_delivery_system (const GstMpegtsDescriptor *descriptor,
264 GstMpegtsSatelliteDeliverySystemDescriptor *res);
267 /* GST_MTS_DESC_DVB_CABLE_DELIVERY_SYSTEM (0x44) */
269 GST_MPEGTS_CABLE_OUTER_FEC_UNDEFINED = 0,
270 GST_MPEGTS_CABLE_OUTER_FEC_NONE,
271 GST_MPEGTS_CABLE_OUTER_FEC_RS_204_188,
272 } GstMpegtsCableOuterFECScheme;
274 typedef struct _GstMpegtsCableDeliverySystemDescriptor GstMpegtsCableDeliverySystemDescriptor;
276 * GstMpegtsCableDeliverySystemDescriptor:
277 * @frequency: the frequency in Hz (Hertz)
278 * @outer_fec: the outer FEC scheme used
279 * @modulation: Modulation scheme used
280 * @symbol_rate: Symbol rate (in symbols per second)
281 * @fec_inner: inner FEC scheme used
283 * Cable Delivery System Descriptor (EN 300 468 v.1.13.1)
285 struct _GstMpegtsCableDeliverySystemDescriptor
288 GstMpegtsCableOuterFECScheme outer_fec;
289 GstMpegtsModulationType modulation;
292 GstMpegtsDVBCodeRate fec_inner;
295 #define GST_TYPE_MPEGTS_DVB_CABLE_DELIVERY_SYSTEM_DESCRIPTOR ( gst_mpegts_dvb_cable_system_delivery_descriptor_get_type())
298 GType gst_mpegts_dvb_cable_delivery_system_descriptor_get_type (void);
301 gboolean gst_mpegts_descriptor_parse_cable_delivery_system (const GstMpegtsDescriptor *descriptor,
302 GstMpegtsCableDeliverySystemDescriptor *res);
305 void gst_mpegts_dvb_cable_delivery_system_descriptor_free (GstMpegtsCableDeliverySystemDescriptor * source);
307 /* GST_MTS_DESC_DVB_BOUQUET_NAME (0x47) */
310 gboolean gst_mpegts_descriptor_parse_dvb_bouquet_name (const GstMpegtsDescriptor * descriptor,
311 gchar ** bouquet_name);
313 /* GST_MTS_DESC_DVB_SERVICE (0x48) */
315 * GstMpegtsDVBServiceType:
317 * The type of service of a channel.
319 * As specified in Table 87 of ETSI EN 300 468 v1.13.1
322 GST_DVB_SERVICE_RESERVED_00 = 0x00,
323 GST_DVB_SERVICE_DIGITAL_TELEVISION,
324 GST_DVB_SERVICE_DIGITAL_RADIO_SOUND,
325 GST_DVB_SERVICE_TELETEXT,
326 GST_DVB_SERVICE_NVOD_REFERENCE,
327 GST_DVB_SERVICE_NVOD_TIME_SHIFTED,
328 GST_DVB_SERVICE_MOSAIC,
329 GST_DVB_SERVICE_FM_RADIO,
330 GST_DVB_SERVICE_DVB_SRM,
331 GST_DVB_SERVICE_RESERVED_09,
332 GST_DVB_SERVICE_ADVANCED_CODEC_DIGITAL_RADIO_SOUND,
333 GST_DVB_SERVICE_ADVANCED_CODEC_MOSAIC,
334 GST_DVB_SERVICE_DATA_BROADCAST,
335 GST_DVB_SERVICE_RESERVED_0D_COMMON_INTERFACE,
336 GST_DVB_SERVICE_RCS_MAP,
337 GST_DVB_SERVICE_RCS_FLS,
338 GST_DVB_SERVICE_DVB_MHP,
339 GST_DVB_SERVICE_MPEG2_HD_DIGITAL_TELEVISION,
340 /* 0x12 - 015 Reserved for future use */
341 GST_DVB_SERVICE_ADVANCED_CODEC_SD_DIGITAL_TELEVISION = 0x16,
342 GST_DVB_SERVICE_ADVANCED_CODEC_SD_NVOD_TIME_SHIFTED,
343 GST_DVB_SERVICE_ADVANCED_CODEC_SD_NVOD_REFERENCE,
344 GST_DVB_SERVICE_ADVANCED_CODEC_HD_DIGITAL_TELEVISION,
345 GST_DVB_SERVICE_ADVANCED_CODEC_HD_NVOD_TIME_SHIFTED,
346 GST_DVB_SERVICE_ADVANCED_CODEC_HD_NVOD_REFERENCE,
347 GST_DVB_SERVICE_ADVANCED_CODEC_STEREO_HD_DIGITAL_TELEVISION,
348 GST_DVB_SERVICE_ADVANCED_CODEC_STEREO_HD_NVOD_TIME_SHIFTED,
349 GST_DVB_SERVICE_ADVANCED_CODEC_STEREO_HD_NVOD_REFERENCE,
350 /* 0x1F - 0x7f Reserved for future use */
351 /* 0x80 - 0xfe user defined */
352 /* 0xff Reserved for future use */
353 GST_DVB_SERVICE_RESERVED_FF
354 } GstMpegtsDVBServiceType;
357 gboolean gst_mpegts_descriptor_parse_dvb_service (const GstMpegtsDescriptor *descriptor,
358 GstMpegtsDVBServiceType *service_type,
359 gchar **service_name,
360 gchar **provider_name);
363 GstMpegtsDescriptor *gst_mpegts_descriptor_from_dvb_service (GstMpegtsDVBServiceType service_type,
364 const gchar * service_name,
365 const gchar * service_provider);
367 /* GST_MTS_DESC_DVB_SERVICE_LIST (0x41) */
368 typedef struct _GstMpegtsDVBServiceListItem GstMpegtsDVBServiceListItem;
371 * GstMpegtsDVBServiceListItem:
372 * @service_id: the id of a service
373 * @type: the type of a service
375 struct _GstMpegtsDVBServiceListItem
378 GstMpegtsDVBServiceType type;
381 #define GST_TYPE_MPEGTS_DVB_SERVICE_LIST_ITEM (gst_mpegts_dvb_service_list_item_get_type ())
384 GType gst_mpegts_dvb_service_list_item_get_type (void);
387 gboolean gst_mpegts_descriptor_parse_dvb_service_list (const GstMpegtsDescriptor * descriptor,
390 /* GST_MTS_DESC_DVB_LINKAGE (0x4A) */
392 * GstMpegtsDVBLinkageType:
394 * Linkage Type (EN 300 468 v.1.13.1)
397 /* 0x00, 0x0F-0x7F reserved for future use */
398 GST_MPEGTS_DVB_LINKAGE_RESERVED_00 = 0x00,
399 GST_MPEGTS_DVB_LINKAGE_INFORMATION = 0x01,
400 GST_MPEGTS_DVB_LINKAGE_EPG = 0x02,
401 GST_MPEGTS_DVB_LINKAGE_CA_REPLACEMENT = 0x03,
402 GST_MPEGTS_DVB_LINKAGE_TS_CONTAINING_COMPLETE_SI = 0x04,
403 GST_MPEGTS_DVB_LINKAGE_SERVICE_REPLACEMENT = 0x05,
404 GST_MPEGTS_DVB_LINKAGE_DATA_BROADCAST = 0x06,
405 GST_MPEGTS_DVB_LINKAGE_RCS_MAP = 0x07,
406 GST_MPEGTS_DVB_LINKAGE_MOBILE_HAND_OVER = 0x08,
407 GST_MPEGTS_DVB_LINKAGE_SYSTEM_SOFTWARE_UPDATE = 0x09,
408 GST_MPEGTS_DVB_LINKAGE_TS_CONTAINING_SSU = 0x0A,
409 GST_MPEGTS_DVB_LINKAGE_IP_MAC_NOTIFICATION = 0x0B,
410 GST_MPEGTS_DVB_LINKAGE_TS_CONTAINING_INT = 0x0C,
411 GST_MPEGTS_DVB_LINKAGE_EVENT = 0x0D,
412 GST_MPEGTS_DVB_LINKAGE_EXTENDED_EVENT = 0x0E,
413 } GstMpegtsDVBLinkageType;
416 GST_MPEGTS_DVB_LINKAGE_HAND_OVER_RESERVED = 0x00,
417 GST_MPEGTS_DVB_LINKAGE_HAND_OVER_IDENTICAL = 0x01,
418 GST_MPEGTS_DVB_LINKAGE_HAND_OVER_LOCAL_VARIATION = 0x02,
419 GST_MPEGTS_DVB_LINKAGE_HAND_OVER_ASSOCIATED = 0x03,
420 } GstMpegtsDVBLinkageHandOverType;
422 typedef struct _GstMpegtsDVBLinkageMobileHandOver GstMpegtsDVBLinkageMobileHandOver;
423 typedef struct _GstMpegtsDVBLinkageEvent GstMpegtsDVBLinkageEvent;
424 typedef struct _GstMpegtsDVBLinkageExtendedEvent GstMpegtsDVBLinkageExtendedEvent;
425 typedef struct _GstMpegtsDVBLinkageDescriptor GstMpegtsDVBLinkageDescriptor;
427 struct _GstMpegtsDVBLinkageMobileHandOver
429 GstMpegtsDVBLinkageHandOverType hand_over_type;
430 /* 0 = NIT, 1 = SDT */
431 gboolean origin_type;
433 guint16 initial_service_id;
436 struct _GstMpegtsDVBLinkageEvent
438 guint16 target_event_id;
439 gboolean target_listed;
440 gboolean event_simulcast;
443 struct _GstMpegtsDVBLinkageExtendedEvent
445 guint16 target_event_id;
446 gboolean target_listed;
447 gboolean event_simulcast;
451 guint8 target_id_type;
452 gboolean original_network_id_flag;
453 gboolean service_id_flag;
454 /* if (target_id_type == 3) */
455 guint16 user_defined_id;
457 guint16 target_transport_stream_id;
458 guint16 target_original_network_id;
459 guint16 target_service_id;
463 * GstMpegtsDVBLinkageDescriptor:
464 * @transport_stream_id: the transport id
465 * @original_network_id: the original network id
466 * @service_id: the service id
467 * @linkage_type: the type which @linkage_data has
468 * @private_data_length: the length for @private_data_bytes
469 * @private_data_bytes: additional data bytes
471 struct _GstMpegtsDVBLinkageDescriptor
473 guint16 transport_stream_id;
474 guint16 original_network_id;
476 GstMpegtsDVBLinkageType linkage_type;
478 gpointer linkage_data;
480 guint8 private_data_length;
481 guint8 *private_data_bytes;
484 #define GST_TYPE_MPEGTS_DVB_LINKAGE_DESCRIPTOR ( gst_mpegts_dvb_linkage_descriptor_get_type())
487 GType gst_mpegts_dvb_linkage_descriptor_get_type (void);
490 void gst_mpegts_dvb_linkage_descriptor_free (GstMpegtsDVBLinkageDescriptor * source);
492 #define GST_TYPE_MPEGTS_DVB_LINKAGE_MOBILE_HAND_OVER (gst_mpegts_dvb_linkage_mobile_hand_over_get_type())
495 GType gst_mpegts_dvb_linkage_mobile_hand_over_get_type (void);
498 const GstMpegtsDVBLinkageMobileHandOver * gst_mpegts_dvb_linkage_descriptor_get_mobile_hand_over
499 (const GstMpegtsDVBLinkageDescriptor * desc);
501 #define GST_TYPE_MPEGTS_DVB_LINKAGE_EVENT (gst_mpegts_dvb_linkage_event_get_type())
504 GType gst_mpegts_dvb_linkage_event_get_type (void);
507 const GstMpegtsDVBLinkageEvent * gst_mpegts_dvb_linkage_descriptor_get_event
508 (const GstMpegtsDVBLinkageDescriptor * desc);
510 #define GST_TYPE_MPEGTS_DVB_LINKAGE_EXTENDED_EVENT (gst_mpegts_dvb_linkage_extended_event_get_type())
513 GType gst_mpegts_dvb_linkage_extended_event_get_type (void);
516 const GPtrArray * gst_mpegts_dvb_linkage_descriptor_get_extended_event
517 (const GstMpegtsDVBLinkageDescriptor * desc);
520 gboolean gst_mpegts_descriptor_parse_dvb_linkage (const GstMpegtsDescriptor * descriptor,
521 GstMpegtsDVBLinkageDescriptor ** res);
523 /* GST_MTS_DESC_DVB_SHORT_EVENT (0x4D) */
526 gboolean gst_mpegts_descriptor_parse_dvb_short_event (const GstMpegtsDescriptor *descriptor,
527 gchar **language_code,
531 /* GST_MTS_DESC_DVB_EXTENDED_EVENT (0x4E) */
532 typedef struct _GstMpegtsExtendedEventDescriptor GstMpegtsExtendedEventDescriptor;
533 typedef struct _GstMpegtsExtendedEventItem GstMpegtsExtendedEventItem;
535 /* FIXME : Maybe make a separate method for getting a specific item entry ? */
536 struct _GstMpegtsExtendedEventItem
538 gchar *item_description;
542 #define GST_TYPE_MPEGTS_EXTENDED_EVENT_ITEM (gst_mpegts_extended_event_item_get_type())
545 GType gst_mpegts_extended_event_item_get_type(void);
548 * GstMpegtsExtendedEventDescriptor:
549 * @descriptor_number:
550 * @last_descriptor_number:
551 * @language_code: NULL terminated language code.
552 * @items: (element-type GstMpegtsExtendedEventItem): the #GstMpegtsExtendedEventItem
555 * Extended Event Descriptor (EN 300 468 v.1.13.1)
557 struct _GstMpegtsExtendedEventDescriptor
559 guint8 descriptor_number;
560 guint8 last_descriptor_number;
561 gchar *language_code;
566 #define GST_TYPE_MPEGTS_EXTENDED_EVENT_DESCRIPTOR (gst_mpegts_extended_event_descriptor_get_type())
569 GType gst_mpegts_extended_event_descriptor_get_type (void);
572 void gst_mpegts_extended_event_descriptor_free (GstMpegtsExtendedEventDescriptor * source);
575 gboolean gst_mpegts_descriptor_parse_dvb_extended_event (const GstMpegtsDescriptor *descriptor,
576 GstMpegtsExtendedEventDescriptor **res);
578 /* GST_MTS_DESC_DVB_COMPONENT (0x50) */
579 #define GST_TYPE_MPEGTS_COMPONENT_DESCRIPTOR (gst_mpegts_component_descriptor_get_type ())
581 GST_MPEGTS_STREAM_CONTENT_MPEG2_VIDEO = 0x01,
582 GST_MPEGTS_STREAM_CONTENT_MPEG1_LAYER2_AUDIO = 0x02,
583 GST_MPEGTS_STREAM_CONTENT_TELETEXT_OR_SUBTITLE = 0x03,
584 GST_MPEGTS_STREAM_CONTENT_AC_3 = 0x04,
585 GST_MPEGTS_STREAM_CONTENT_AVC = 0x05,
586 GST_MPEGTS_STREAM_CONTENT_AAC = 0x06,
587 GST_MPEGTS_STREAM_CONTENT_DTS = 0x07,
588 GST_MPEGTS_STREAM_CONTENT_SRM_CPCM = 0x08
589 } GstMpegtsComponentStreamContent;
591 typedef struct _GstMpegtsComponentDescriptor GstMpegtsComponentDescriptor;
592 struct _GstMpegtsComponentDescriptor
594 guint8 stream_content;
595 guint8 component_type;
596 guint8 component_tag;
597 gchar *language_code;
602 GType gst_mpegts_component_descriptor_get_type (void);
605 void gst_mpegts_dvb_component_descriptor_free (GstMpegtsComponentDescriptor * source);
608 gboolean gst_mpegts_descriptor_parse_dvb_component (const GstMpegtsDescriptor *descriptor,
609 GstMpegtsComponentDescriptor **res);
611 /* GST_MTS_DESC_DVB_STREAM_IDENTIFIER (0x52) */
614 gboolean gst_mpegts_descriptor_parse_dvb_stream_identifier (const GstMpegtsDescriptor *descriptor,
615 guint8 *component_tag);
617 /* GST_MTS_DESC_DVB_CA_IDENTIFIER (0x53) */
620 gboolean gst_mpegts_descriptor_parse_dvb_ca_identifier (const GstMpegtsDescriptor * descriptor,
623 /* GST_MTS_DESC_DVB_CONTENT (0x54) */
625 GST_MPEGTS_CONTENT_MOVIE_DRAMA = 0x01,
626 GST_MPEGTS_CONTENT_NEWS_CURRENT_AFFAIRS = 0x02,
627 GST_MPEGTS_CONTENT_SHOW_GAME_SHOW = 0x03,
628 GST_MPEGTS_CONTENT_SPORTS = 0x04,
629 GST_MPEGTS_CONTENT_CHILDREN_YOUTH_PROGRAM = 0x05,
630 GST_MPEGTS_CONTENT_MUSIC_BALLET_DANCE = 0x06,
631 GST_MPEGTS_CONTENT_ARTS_CULTURE = 0x07,
632 GST_MPEGTS_CONTENT_SOCIAL_POLITICAL_ECONOMICS = 0x08,
633 GST_MPEGTS_CONTENT_EDUCATION_SCIENCE_FACTUAL = 0x09,
634 GST_MPEGTS_CONTENT_LEISURE_HOBBIES = 0x0A,
635 GST_MPEGTS_CONTENT_SPECIAL_CHARACTERISTICS = 0x0B
636 } GstMpegtsContentNibbleHi;
638 typedef struct _GstMpegtsContent GstMpegtsContent;
639 struct _GstMpegtsContent
641 GstMpegtsContentNibbleHi content_nibble_1;
642 guint8 content_nibble_2;
646 #define GST_TYPE_MPEGTS_CONTENT (gst_mpegts_content_get_type ())
649 GType gst_mpegts_content_get_type (void);
652 gboolean gst_mpegts_descriptor_parse_dvb_content (const GstMpegtsDescriptor *
653 descriptor, GPtrArray ** content);
655 /* GST_MTS_DESC_DVB_PARENTAL_RATING (0x55) */
656 typedef struct _GstMpegtsDVBParentalRatingItem GstMpegtsDVBParentalRatingItem;
658 #define GST_TYPE_MPEGTS_DVB_PARENTAL_RATING_ITEM (gst_mpegts_dvb_parental_rating_item_get_type())
661 GType gst_mpegts_dvb_parental_rating_item_get_type (void);
664 * GstMpegtsDVBParentalRating:
665 * @country_code: This 24-bit field identifies a country using the 3-character
666 * code as specified in ISO 3166
667 * @rating: the rating age
669 struct _GstMpegtsDVBParentalRatingItem
676 gboolean gst_mpegts_descriptor_parse_dvb_parental_rating (const GstMpegtsDescriptor
677 * descriptor, GPtrArray ** rating);
679 /* GST_MTS_DESC_DVB_TELETEXT (0x56) */
681 * GstMpegtsDVBTeletextType:
683 * The type of teletext page.
685 * As specified in Table 100 of ETSI EN 300 468 v1.13.1
690 ADDITIONAL_INFO_PAGE,
691 PROGRAMME_SCHEDULE_PAGE,
692 HEARING_IMPAIRED_PAGE
693 } GstMpegtsDVBTeletextType;
696 gboolean gst_mpegts_descriptor_parse_dvb_teletext_idx (const GstMpegtsDescriptor *
697 descriptor, guint idx, gchar ** language_code,
698 GstMpegtsDVBTeletextType * teletext_type, guint8 * magazine_number,
699 guint8 * page_number);
702 guint gst_mpegts_descriptor_parse_dvb_teletext_nb (const GstMpegtsDescriptor *
705 /* GST_MTS_DESC_DVB_SUBTITLING (0x59) */
708 gboolean gst_mpegts_descriptor_parse_dvb_subtitling_idx (const GstMpegtsDescriptor *descriptor,
709 guint idx, gchar ** lang,
710 guint8 *type, guint16 *composition_page_id,
711 guint16 *ancillary_page_id);
714 guint gst_mpegts_descriptor_parse_dvb_subtitling_nb (const GstMpegtsDescriptor *descriptor);
717 GstMpegtsDescriptor * gst_mpegts_descriptor_from_dvb_subtitling (const gchar *lang,
718 guint8 type, guint16 composition, guint16 ancillary);
722 /* GST_MTS_DESC_DVB_TERRESTRIAL_DELIVERY_SYSTEM (0x5A) */
723 typedef struct _GstMpegtsTerrestrialDeliverySystemDescriptor GstMpegtsTerrestrialDeliverySystemDescriptor;
726 GST_MPEGTS_TRANSMISSION_MODE_2K = 0,
727 GST_MPEGTS_TRANSMISSION_MODE_8K,
728 GST_MPEGTS_TRANSMISSION_MODE_AUTO,
729 GST_MPEGTS_TRANSMISSION_MODE_4K,
730 GST_MPEGTS_TRANSMISSION_MODE_1K,
731 GST_MPEGTS_TRANSMISSION_MODE_16K,
732 GST_MPEGTS_TRANSMISSION_MODE_32K,
733 GST_MPEGTS_TRANSMISSION_MODE_C1,
734 GST_MPEGTS_TRANSMISSION_MODE_C3780
735 } GstMpegtsTerrestrialTransmissionMode;
738 GST_MPEGTS_GUARD_INTERVAL_1_32 = 0,
739 GST_MPEGTS_GUARD_INTERVAL_1_16,
740 GST_MPEGTS_GUARD_INTERVAL_1_8,
741 GST_MPEGTS_GUARD_INTERVAL_1_4,
742 GST_MPEGTS_GUARD_INTERVAL_AUTO,
743 GST_MPEGTS_GUARD_INTERVAL_1_128,
744 GST_MPEGTS_GUARD_INTERVAL_19_128,
745 GST_MPEGTS_GUARD_INTERVAL_19_256,
746 GST_MPEGTS_GUARD_INTERVAL_PN420,
747 GST_MPEGTS_GUARD_INTERVAL_PN595,
748 GST_MPEGTS_GUARD_INTERVAL_PN945
749 } GstMpegtsTerrestrialGuardInterval;
752 GST_MPEGTS_HIERARCHY_NONE = 0,
753 GST_MPEGTS_HIERARCHY_1,
754 GST_MPEGTS_HIERARCHY_2,
755 GST_MPEGTS_HIERARCHY_4,
756 GST_MPEGTS_HIERARCHY_AUTO
757 } GstMpegtsTerrestrialHierarchy;
760 * GstMpegtsTerrestrialDeliverySystemDescriptor:
761 * @frequency: the frequency in Hz (Hertz)
762 * @bandwidth: the bandwidth in Hz (Hertz)
763 * @priority: %TRUE High Priority %FALSE Low Priority
764 * @time_slicing: %TRUE no time slicing %FALSE time slicing
765 * @mpe_fec: %TRUE no mpe-fec is used %FALSE mpe-fec is use
766 * @constellation: the constellation
767 * @hierarchy: the hierarchy
771 * @transmission_mode:
772 * @other_frequency: %TRUE more frequency are use, else not
774 * Terrestrial Delivery System Descriptor (EN 300 468 v.1.13.1)
777 struct _GstMpegtsTerrestrialDeliverySystemDescriptor
782 gboolean time_slicing;
784 GstMpegtsModulationType constellation;
785 GstMpegtsTerrestrialHierarchy hierarchy;
786 GstMpegtsDVBCodeRate code_rate_hp;
787 GstMpegtsDVBCodeRate code_rate_lp;
788 GstMpegtsTerrestrialGuardInterval guard_interval;
789 GstMpegtsTerrestrialTransmissionMode transmission_mode;
790 gboolean other_frequency;
793 #define GST_TYPE_MPEGTS_TERRESTRIAL_DELIVERY_SYSTEM_DESCRIPTOR (gst_mpegts_terrestrial_delivery_system_descriptor_get_type())
796 GType gst_mpegts_terrestrial_delivery_system_descriptor_get_type(void);
799 gboolean gst_mpegts_descriptor_parse_terrestrial_delivery_system (const GstMpegtsDescriptor
800 *descriptor, GstMpegtsTerrestrialDeliverySystemDescriptor * res);
802 /* GST_MTS_DESC_DVB_MULTILINGUAL_NETWORK_NAME (0x5B) */
803 typedef struct _GstMpegtsDvbMultilingualNetworkNameItem GstMpegtsDvbMultilingualNetworkNameItem;
806 * GstMpegtsDvbMultilingualNetworkNameItem:
807 * @language_code: the ISO 639 language code
808 * @network_name: the network name
810 * a multilingual network name entry
812 struct _GstMpegtsDvbMultilingualNetworkNameItem
814 gchar *language_code;
818 #define GST_TYPE_MPEGTS_DVB_MULTILINGUAL_NETWORK_NAME_ITEM (gst_mpegts_dvb_multilingual_network_name_item_get_type())
821 GType gst_mpegts_dvb_multilingual_network_name_item_get_type(void);
824 gboolean gst_mpegts_descriptor_parse_dvb_multilingual_network_name (const GstMpegtsDescriptor
825 *descriptor, GPtrArray ** network_name_items);
827 /* GST_MTS_DESC_DVB_MULTILINGUAL_BOUQUET_NAME (0x5C) */
828 typedef struct _GstMpegtsDvbMultilingualBouquetNameItem GstMpegtsDvbMultilingualBouquetNameItem;
831 * GstMpegtsDvbMultilingualBouquetNameItem:
832 * @language_code: the ISO 639 language code
833 * @bouquet_name: the bouquet name
835 * a multilingual bouquet name entry
837 struct _GstMpegtsDvbMultilingualBouquetNameItem
839 gchar *language_code;
843 #define GST_TYPE_MPEGTS_DVB_MULTILINGUAL_BOUQUET_NAME_ITEM (gst_mpegts_dvb_multilingual_bouquet_name_item_get_type())
846 GType gst_mpegts_dvb_multilingual_bouquet_name_item_get_type(void);
849 gboolean gst_mpegts_descriptor_parse_dvb_multilingual_bouquet_name (const GstMpegtsDescriptor
850 *descriptor, GPtrArray ** bouquet_name_items);
852 /* GST_MTS_DESC_DVB_MULTILINGUAL_SERVICE_NAME (0x5D) */
853 typedef struct _GstMpegtsDvbMultilingualServiceNameItem GstMpegtsDvbMultilingualServiceNameItem;
856 * GstMpegtsDvbMultilingualServiceNameItem:
857 * @language_code: the ISO 639 language code
858 * @provider_name: the provider name
859 * @service_name: the service name
861 * a multilingual service name entry
863 struct _GstMpegtsDvbMultilingualServiceNameItem
865 gchar *language_code;
866 gchar *provider_name;
870 #define GST_TYPE_MPEGTS_DVB_MULTILINGUAL_SERVICE_NAME_ITEM (gst_mpegts_dvb_multilingual_service_name_item_get_type())
873 GType gst_mpegts_dvb_multilingual_service_name_item_get_type(void);
876 gboolean gst_mpegts_descriptor_parse_dvb_multilingual_service_name (const GstMpegtsDescriptor
877 *descriptor, GPtrArray ** service_name_items);
879 /* GST_MTS_DESC_DVB_MULTILINGUAL_COMPONENT (0x5E) */
880 typedef struct _GstMpegtsDvbMultilingualComponentItem GstMpegtsDvbMultilingualComponentItem;
883 * GstMpegtsDvbMultilingualComponentItem:
884 * @language_code: the ISO 639 language code
885 * @description: the component description
887 struct _GstMpegtsDvbMultilingualComponentItem
889 gchar *language_code;
893 #define GST_TYPE_MPEGTS_DVB_MULTILINGUAL_COMPONENT_ITEM (gst_mpegts_dvb_multilingual_component_item_get_type())
896 GType gst_mpegts_dvb_multilingual_component_item_get_type(void);
899 gboolean gst_mpegts_descriptor_parse_dvb_multilingual_component (const GstMpegtsDescriptor
900 *descriptor, guint8 * component_tag, GPtrArray ** component_description_items);
902 /* GST_MTS_DESC_DVB_PRIVATE_DATA_SPECIFIER (0x5F) */
905 gboolean gst_mpegts_descriptor_parse_dvb_private_data_specifier (const GstMpegtsDescriptor
906 * descriptor, guint32 * private_data_specifier, guint8 ** private_data,
909 /* GST_MTS_DESC_DVB_FREQUENCY_LIST (0x62) */
912 gboolean gst_mpegts_descriptor_parse_dvb_frequency_list (const GstMpegtsDescriptor
913 * descriptor, gboolean * offset, GArray ** list);
915 /* GST_MTS_DESC_DVB_DATA_BROADCAST (0x64) */
916 typedef struct _GstMpegtsDataBroadcastDescriptor GstMpegtsDataBroadcastDescriptor;
919 * GstMpegtsDataBroadcastDescriptor:
920 * @data_broadcast_id: the data broadcast id
921 * @component_tag: the component tag
922 * @selector_bytes: the selector byte field
923 * @language_code: language of @text
924 * @text: description of data broadcast
926 struct _GstMpegtsDataBroadcastDescriptor
928 guint16 data_broadcast_id;
929 guint8 component_tag;
931 guint8 *selector_bytes;
932 gchar *language_code;
937 #define GST_TYPE_MPEGTS_DVB_DATA_BROADCAST_DESCRIPTOR (gst_mpegts_dvb_data_broadcast_descriptor_get_type ())
939 GType gst_mpegts_dvb_data_broadcast_descriptor_get_type (void);
942 void gst_mpegts_dvb_data_broadcast_descriptor_free (GstMpegtsDataBroadcastDescriptor * source);
945 gboolean gst_mpegts_descriptor_parse_dvb_data_broadcast (const GstMpegtsDescriptor
946 *descriptor, GstMpegtsDataBroadcastDescriptor ** res);
948 /* GST_MTS_DESC_DVB_SCRAMBLING (0x65) */
951 GST_MPEGTS_DVB_SCRAMBLING_MODE_RESERVED = 0x00,
952 GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA1 = 0x01,
953 GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA2 = 0x02,
954 GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA3_STANDARD = 0x03,
955 GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA3_MINIMAL_ENHANCED = 0x04,
956 GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA3_FULL_ENHANCED = 0x05,
957 /* 0x06 - 0x0f reserved for future use */
958 GST_MPEGTS_DVB_SCRAMBLING_MODE_CISSA = 0x10,
959 /* 0x11 - 0x1f reserved for future DVB-CISSA versions */
960 GST_MPEGTS_DVB_SCRAMBLING_MODE_ATIS_0 = 0x70,
961 GST_MPEGTS_DVB_SCRAMBLING_MODE_ATIS_F = 0x7f,
962 } GstMpegtsDVBScramblingModeType;
965 gboolean gst_mpegts_descriptor_parse_dvb_scrambling (const GstMpegtsDescriptor * descriptor,
966 GstMpegtsDVBScramblingModeType * scrambling_mode);
968 /* GST_MTS_DESC_DVB_DATA_BROADCAST_ID (0x66) */
971 gboolean gst_mpegts_descriptor_parse_dvb_data_broadcast_id (const GstMpegtsDescriptor
972 * descriptor, guint16 * data_broadcast_id, guint8 ** id_selector_bytes, guint8 * len);
974 /* GST_MTS_DESC_DVB_AC3 (0x6a) */
975 /* FIXME : Implement */
977 /* GST_MTS_DESC_EXT_DVB_T2_DELIVERY_SYSTEM (0x7F && 0x04) */
978 typedef struct _GstMpegtsT2DeliverySystemCellExtension GstMpegtsT2DeliverySystemCellExtension;
981 * GstMpegtsT2DeliverySystemCellExtension:
982 * @cell_id_extension: id of the sub cell
983 * @transposer_frequency: centre frequency of the sub cell in Hz
985 struct _GstMpegtsT2DeliverySystemCellExtension
987 guint8 cell_id_extension;
988 guint32 transposer_frequency;
991 #define GST_TYPE_MPEGTS_T2_DELIVERY_SYSTEM_CELL_EXTENSION (gst_mpegts_t2_delivery_system_cell_extension_get_type())
994 GType gst_mpegts_t2_delivery_system_cell_extension_get_type(void);
996 typedef struct _GstMpegtsT2DeliverySystemCell GstMpegtsT2DeliverySystemCell;
999 * GstMpegtsT2DeliverySystemCell:
1000 * @cell_id: id of the cell
1001 * @centre_frequencies: (element-type guint32): centre frequencies in Hz
1002 * @sub_cells: (element-type GstMpegtsT2DeliverySystemCellExtension):
1004 struct _GstMpegtsT2DeliverySystemCell
1007 GArray *centre_frequencies;
1008 GPtrArray *sub_cells;
1011 #define GST_TYPE_MPEGTS_T2_DELIVERY_SYSTEM_CELL (gst_mpegts_t2_delivery_system_cell_get_type())
1014 GType gst_mpegts_t2_delivery_system_cell_get_type(void);
1016 typedef struct _GstMpegtsT2DeliverySystemDescriptor GstMpegtsT2DeliverySystemDescriptor;
1019 * GstMpegtsT2DeliverySystemDescriptor:
1025 * @transmission_mode:
1028 * @cells: (element-type GstMpegtsT2DeliverySystemCell):
1030 * describe DVB-T2 transmissions according to EN 302 755
1032 struct _GstMpegtsT2DeliverySystemDescriptor
1035 guint16 t2_system_id;
1039 GstMpegtsTerrestrialGuardInterval guard_interval;
1040 GstMpegtsTerrestrialTransmissionMode transmission_mode;
1041 gboolean other_frequency;
1046 #define GST_TYPE_MPEGTS_T2_DELIVERY_SYSTEM_DESCRIPTOR (gst_mpegts_t2_delivery_system_descriptor_get_type ())
1048 GType gst_mpegts_t2_delivery_system_descriptor_get_type (void);
1051 void gst_mpegts_t2_delivery_system_descriptor_free (GstMpegtsT2DeliverySystemDescriptor * source);
1054 gboolean gst_mpegts_descriptor_parse_dvb_t2_delivery_system (const GstMpegtsDescriptor
1055 *descriptor, GstMpegtsT2DeliverySystemDescriptor ** res);
1059 #endif /* GST_MPEGTS_DESCRIPTOR_H */