vdr 2.6.1
libsi/headers.h
Go to the documentation of this file.
1/***************************************************************************
2 * *
3 * (C) 2001-03 Rolf Hakenes <hakenes@hippomi.de>, under the *
4 * GNU GPL with contribution of Oleg Assovski, *
5 * www.satmania.com *
6 * Adapted and extended by Marcel Wiesweg *
7 * *
8 * This program is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU General Public License as published by *
10 * the Free Software Foundation; either version 2 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * $Id: headers.h 4.2 2020/09/16 13:48:33 kls Exp $
14 * *
15 ***************************************************************************/
16
17#ifndef LIBSI_HEADERS_H
18#define LIBSI_HEADERS_H
19
20#include <endian.h>
21
22namespace SI {
23
24typedef unsigned char u_char;
25
26struct SectionHeader {
28#if BYTE_ORDER == BIG_ENDIAN
30 u_char :3;
32#else
34 u_char :3;
36#endif
38};
39
40struct ExtendedSectionHeader {
42#if BYTE_ORDER == BIG_ENDIAN
44 u_char :3;
46#else
48 u_char :3;
50#endif
54#if BYTE_ORDER == BIG_ENDIAN
55 u_char :2;
58#else
61 u_char :2;
62#endif
65};
66
67struct DescriptorHeader {
70};
71
72/*
73 *
74 * ETSI ISO/IEC 13818-1 specifies SI which is referred to as PSI. The PSI
75 * data provides information to enable automatic configuration of the
76 * receiver to demultiplex and decode the various streams of programs
77 * within the multiplex. The PSI data is structured as four types of table.
78 * The tables are transmitted in sections.
79 *
80 * 1) Program Association Table (PAT):
81 *
82 * - for each service in the multiplex, the PAT indicates the location
83 * (the Packet Identifier (PID) values of the Transport Stream (TS)
84 * packets) of the corresponding Program Map Table (PMT).
85 * It also gives the location of the Network Information Table (NIT).
86 *
87 */
88
89#define PAT_LEN 8
90
91struct pat {
93#if BYTE_ORDER == BIG_ENDIAN
95 u_char dummy :1; // has to be 0
96 u_char :2;
98#else
100 u_char :2;
101 u_char dummy :1; // has to be 0
103#endif
107#if BYTE_ORDER == BIG_ENDIAN
108 u_char :2;
111#else
114 u_char :2;
115#endif
118};
119
120#define PAT_PROG_LEN 4
121
122struct pat_prog {
125#if BYTE_ORDER == BIG_ENDIAN
126 u_char :3;
128#else
130 u_char :3;
131#endif
133 /* or program_map_pid (if prog_num=0)*/
134};
135
136/*
137 *
138 * 2) Conditional Access Table (CAT):
139 *
140 * - the CAT provides information on the CA systems used in the
141 * multiplex; the information is private and dependent on the CA
142 * system, but includes the location of the EMM stream, when
143 * applicable.
144 *
145 */
146#define CAT_LEN 8
147
148struct cat {
149 u_char table_id :8;
150#if BYTE_ORDER == BIG_ENDIAN
152 u_char dummy :1; // has to be 0
153 u_char :2;
155#else
157 u_char :2;
158 u_char dummy :1; // has to be 0
160#endif
164#if BYTE_ORDER == BIG_ENDIAN
165 u_char :2;
168#else
171 u_char :2;
172#endif
175};
176
177/*
178 *
179 * 3) Program Map Table (PMT):
180 *
181 * - the PMT identifies and indicates the locations of the streams that
182 * make up each service, and the location of the Program Clock
183 * Reference fields for a service.
184 *
185 */
186
187#define PMT_LEN 12
188
189struct pmt {
190 u_char table_id :8;
191#if BYTE_ORDER == BIG_ENDIAN
193 u_char dummy :1; // has to be 0
194 u_char :2;
196#else
198 u_char :2;
199 u_char dummy :1; // has to be 0
201#endif
205#if BYTE_ORDER == BIG_ENDIAN
206 u_char :2;
209#else
212 u_char :2;
213#endif
216#if BYTE_ORDER == BIG_ENDIAN
217 u_char :3;
219#else
221 u_char :3;
222#endif
224#if BYTE_ORDER == BIG_ENDIAN
225 u_char :4;
227#else
229 u_char :4;
230#endif
232 //descriptors
233};
234
235#define PMT_INFO_LEN 5
236
237struct pmt_info {
239#if BYTE_ORDER == BIG_ENDIAN
240 u_char :3;
242#else
244 u_char :3;
245#endif
247#if BYTE_ORDER == BIG_ENDIAN
248 u_char :4;
250#else
252 u_char :4;
253#endif
255 // descriptors
256};
257
258/*
259 *
260 * 4) Transport Stream Description Table (TSDT):
261 *
262 * - The TSDT carries a loop of descriptors that apply to
263 * the whole transport stream. The syntax and semantics
264 * of the TSDT are defined in newer versions of ISO/IEC 13818-1.
265 *
266 */
267
268#define TSDT_LEN 8
269
270struct tsdt {
271 u_char table_id :8;
272#if BYTE_ORDER == BIG_ENDIAN
274 u_char dummy :1; // has to be 0
275 u_char :2;
277#else
279 u_char :2;
280 u_char dummy :1; // has to be 0
282#endif
284 u_char :8;
285 u_char :8;
286#if BYTE_ORDER == BIG_ENDIAN
287 u_char :2;
290#else
293 u_char :2;
294#endif
297};
298
299/*
300 *
301 * 5) Network Information Table (NIT):
302 *
303 * - the NIT is intended to provide information about the physical
304 * network. The syntax and semantics of the NIT are defined in
305 * ETSI EN 300 468.
306 *
307 */
308
309#define NIT_LEN 10
310
311struct nit {
312 u_char table_id :8;
313#if BYTE_ORDER == BIG_ENDIAN
315 u_char :3;
317#else
319 u_char :3;
321#endif
325#if BYTE_ORDER == BIG_ENDIAN
326 u_char :2;
329#else
332 u_char :2;
333#endif
336#if BYTE_ORDER == BIG_ENDIAN
337 u_char :4;
339#else
341 u_char :4;
342#endif
344 /* descriptors */
345};
346
347#define SIZE_NIT_MID 2
348
349struct nit_mid { // after descriptors
350#if BYTE_ORDER == BIG_ENDIAN
351 u_char :4;
353#else
355 u_char :4;
356#endif
358};
359
360#define SIZE_NIT_END 4
361
362struct nit_end {
363 long CRC;
364};
365
366#define NIT_TS_LEN 6
367
368struct ni_ts {
373#if BYTE_ORDER == BIG_ENDIAN
374 u_char :4;
376#else
378 u_char :4;
379#endif
381 /* descriptors */
382};
383
384/*
385 *
386 * In addition to the PSI, data is needed to provide identification of
387 * services and events for the user. In contrast with the PAT, CAT, and
388 * PMT of the PSI, which give information only for the multiplex in which
389 * they are contained (the actual multiplex), the additional information
390 * defined within the present document can also provide information on
391 * services and events carried by different multiplexes, and even on other
392 * networks. This data is structured as nine tables:
393 *
394 * 1) Bouquet Association Table (BAT):
395 *
396 * - the BAT provides information regarding bouquets. As well as giving
397 * the name of the bouquet, it provides a list of services for each
398 * bouquet.
399 *
400 */
401/* SEE NIT (It has the same structure but has different allowed descriptors) */
402/*
403 *
404 * 2) Service Description Table (SDT):
405 *
406 * - the SDT contains data describing the services in the system e.g.
407 * names of services, the service provider, etc.
408 *
409 */
410
411#define SDT_LEN 11
412
413struct sdt {
414 u_char table_id :8;
415#if BYTE_ORDER == BIG_ENDIAN
417 u_char :3;
419#else
421 u_char :3;
423#endif
427#if BYTE_ORDER == BIG_ENDIAN
428 u_char :2;
431#else
434 u_char :2;
435#endif
440 u_char :8;
441};
442
443#define GetSDTTransportStreamId(x) (HILO(((sdt_t *) x)->transport_stream_id))
444#define GetSDTOriginalNetworkId(x) (HILO(((sdt_t *) x)->original_network_id))
445
446#define SDT_DESCR_LEN 5
447
448struct sdt_descr {
451#if BYTE_ORDER == BIG_ENDIAN
452 u_char :6;
458#else
461 u_char :6;
465#endif
467};
468
469/*
470 *
471 * 3) Event Information Table (EIT):
472 *
473 * - the EIT contains data concerning events or programmes such as event
474 * name, start time, duration, etc.; - the use of different descriptors
475 * allows the transmission of different kinds of event information e.g.
476 * for different service types.
477 *
478 */
479
480#define EIT_LEN 14
481
482struct eit {
483 u_char table_id :8;
484#if BYTE_ORDER == BIG_ENDIAN
486 u_char :3;
488#else
490 u_char :3;
492#endif
496#if BYTE_ORDER == BIG_ENDIAN
497 u_char :2;
500#else
503 u_char :2;
504#endif
513};
514
515#define EIT_EVENT_LEN 12
516
517struct eit_event {
520 u_char mjd_hi :8;
521 u_char mjd_lo :8;
528#if BYTE_ORDER == BIG_ENDIAN
532#else
536#endif
538};
539
540/*
541 *
542 * 4) Running Status Table (RST):
543 *
544 * - the RST gives the status of an event (running/not running). The RST
545 * updates this information and allows timely automatic switching to
546 * events.
547 *
548 */
549
550struct rst {
551 u_char table_id :8;
552#if BYTE_ORDER == BIG_ENDIAN
554 u_char :3;
556#else
558 u_char :3;
560#endif
562};
563
564struct rst_info {
573#if BYTE_ORDER == BIG_ENDIAN
574 u_char :5;
576#else
578 u_char :5;
579#endif
580};
581
582/*
583 *
584 * 5) Time and Date Table (TDT):
585 *
586 * - the TDT gives information relating to the present time and date.
587 * This information is given in a separate table due to the frequent
588 * updating of this information.
589 *
590 */
591
592#define TDT_LEN 8
593
594struct tdt {
595 u_char table_id :8;
596#if BYTE_ORDER == BIG_ENDIAN
598 u_char :3;
600#else
602 u_char :3;
604#endif
611};
612
613/*
614 *
615 * 6) Time Offset Table (TOT):
616 *
617 * - the TOT gives information relating to the present time and date and
618 * local time offset. This information is given in a separate table due
619 * to the frequent updating of the time information.
620 *
621 */
622#define TOT_LEN 10
623
624struct tot {
625 u_char table_id :8;
626#if BYTE_ORDER == BIG_ENDIAN
628 u_char :3;
630#else
632 u_char :3;
634#endif
641#if BYTE_ORDER == BIG_ENDIAN
642 u_char :4;
644#else
646 u_char :4;
647#endif
649};
650
651/*
652 *
653 * 7) Stuffing Table (ST):
654 *
655 * - the ST is used to invalidate existing sections, for example at
656 * delivery system boundaries.
657 *
658 */
659 /* TO BE DONE */
660/*
661 *
662 * 8) Selection Information Table (SIT):
663 *
664 * - the SIT is used only in "partial" (i.e. recorded) bitstreams. It
665 * carries a summary of the SI information required to describe the
666 * streams in the partial bitstream.
667 *
668 */
669 /* TO BE DONE */
670/*
671 *
672 * 9) Discontinuity Information Table (DIT):
673 *
674 * - the DIT is used only in "partial" (i.e. recorded) bitstreams.
675 * It is inserted where the SI information in the partial bitstream may
676 * be discontinuous. Where applicable the use of descriptors allows a
677 * flexible approach to the organization of the tables and allows for
678 * future compatible extensions.
679 *
680 */
681 /* TO BE DONE */
682
683/*
684 *
685 * 3) Application Information Table (AIT):
686 *
687 * - the AIT contains data concerning MHP application broadcast by a service.
688 *
689 */
690
691#define AIT_LEN 10
692
693struct ait {
694 u_char table_id :8;
695#if BYTE_ORDER == BIG_ENDIAN
697 u_char :3;
699#else
701 u_char :3;
703#endif
707#if BYTE_ORDER == BIG_ENDIAN
708 u_char :2;
711#else
714 u_char :2;
715#endif
718#if BYTE_ORDER == BIG_ENDIAN
719 u_char :4;
721#else
723 u_char :4;
724#endif
726};
727
728#define SIZE_AIT_MID 2
729
730struct ait_mid { // after descriptors
731#if BYTE_ORDER == BIG_ENDIAN
732 u_char :4;
734#else
736 u_char :4;
737#endif
739};
740
741#define SIZE_AIT_END 4
742
743struct ait_end {
744 long CRC;
745};
746
747#define AIT_APP_LEN 9
748
749struct ait_app {
750 //how to deal with 32 bit fields?
751
756
757 //long organisation_id :32;
761#if BYTE_ORDER == BIG_ENDIAN
762 u_char :4;
764#else
766 u_char :4;
767#endif
769 /* descriptors */
770};
771
772/* Premiere Content Information Table */
773
774#define PCIT_LEN 17
775
776struct pcit {
777 u_char table_id :8;
778#if BYTE_ORDER == BIG_ENDIAN
780 u_char dummy :1; // has to be 0
781 u_char :2;
783#else
785 u_char :2;
786 u_char dummy :1; // has to be 0
788#endif
790 u_char :8;
791 u_char :8;
792#if BYTE_ORDER == BIG_ENDIAN
793 u_char :2;
796#else
799 u_char :2;
800#endif
803
808
812
813#if BYTE_ORDER == BIG_ENDIAN
814 u_char :4;
816#else
818 u_char :4;
819#endif
821};
822
823/*
824 *
825 * The following describes the different descriptors that can be used within
826 * the SI.
827 *
828 * The following semantics apply to all the descriptors defined in this
829 * subclause:
830 *
831 * descriptor_tag: The descriptor tag is an 8-bit field which identifies
832 * each descriptor. Those values with MPEG-2 normative
833 * meaning are described in ISO/IEC 13818-1. The values of
834 * descriptor_tag are defined in 'libsi.h'
835 * descriptor_length: The descriptor length is an 8-bit field specifying the
836 * total number of bytes of the data portion of the
837 * descriptor following the byte defining the value of
838 * this field.
839 *
840 */
841
842#define DESCR_GEN_LEN 2
843struct descr_gen {
846};
847
848#define GetDescriptorTag(x) (((descr_gen_t *) x)->descriptor_tag)
849#define GetDescriptorLength(x) (((descr_gen_t *) x)->descriptor_length+DESCR_GEN_LEN)
850
851/* 0x09 ca_descriptor */
852
853#define DESCR_CA_LEN 6
854struct descr_ca {
859#if BYTE_ORDER == BIG_ENDIAN
860 u_char reserved :3;
861 u_char CA_PID_hi :5;
862#else
863 u_char CA_PID_hi :5;
864 u_char reserved :3;
865#endif
866 u_char CA_PID_lo :8;
867};
868
869/* 0x0A iso_639_language_descriptor */
870
871#define DESCR_ISO_639_LANGUAGE_LEN 5
872struct descr_iso_639_language {
875};
876
877struct descr_iso_639_language_loop {
882};
883
884/* 0x13 carousel_identifier_descriptor */
885
886#define DESCR_CAROUSEL_IDENTIFIER_LEN 7
887struct descr_carousel_identifier {
894 u_char FormatId :8;
895 /* FormatSpecifier follows */
896};
897
898/* 0x40 network_name_descriptor */
899
900#define DESCR_NETWORK_NAME_LEN 2
901struct descr_network_name {
904};
905
906/* 0x41 service_list_descriptor */
907
908#define DESCR_SERVICE_LIST_LEN 2
909struct descr_service_list {
912};
913
914#define DESCR_SERVICE_LIST_LOOP_LEN 3
915struct descr_service_list_loop {
919};
920
921/* 0x42 stuffing_descriptor */
922
923#define DESCR_STUFFING_LEN XX
924struct descr_stuffing {
927 /* TBD */
928};
929
930/* 0x43 satellite_delivery_system_descriptor */
931
932#define DESCR_SATELLITE_DELIVERY_SYSTEM_LEN 13
933struct descr_satellite_delivery_system {
942#if BYTE_ORDER == BIG_ENDIAN
945 u_char roll_off :2;
948#else
951 u_char roll_off :2;
954#endif
958#if BYTE_ORDER == BIG_ENDIAN
960 u_char fec_inner :4;
961#else
962 u_char fec_inner :4;
964#endif
965};
966
967/* 0x44 cable_delivery_system_descriptor */
968
969#define DESCR_CABLE_DELIVERY_SYSTEM_LEN 13
970struct descr_cable_delivery_system {
977 u_char reserved1 :8;
978#if BYTE_ORDER == BIG_ENDIAN
979 u_char reserved2 :4;
980 u_char fec_outer :4;
981#else
982 u_char fec_outer :4;
983 u_char reserved2 :4;
984#endif
989#if BYTE_ORDER == BIG_ENDIAN
991 u_char fec_inner :4;
992#else
993 u_char fec_inner :4;
995#endif
996};
997
998/* 0x45 vbi_data_descriptor */
999
1000#define DESCR_VBI_DATA_LEN XX
1001struct descr_vbi_data {
1004 /* TBD */
1005};
1006
1007/* 0x46 vbi_teletext_descriptor */
1008
1009#define DESCR_VBI_TELETEXT_LEN XX
1010struct descr_vbi_teletext {
1013 /* TBD */
1014};
1015
1016/* 0x47 bouquet_name_descriptor */
1017
1018#define DESCR_BOUQUET_NAME_LEN 2
1019struct descr_bouquet_name {
1022};
1023
1024/* 0x48 service_descriptor */
1025
1026#define DESCR_SERVICE_LEN 4
1027struct descr_service {
1032};
1033
1034struct descr_service_mid {
1036};
1037
1038/* 0x49 country_availability_descriptor */
1039
1040#define DESCR_COUNTRY_AVAILABILITY_LEN 3
1041struct descr_country_availability {
1044#if BYTE_ORDER == BIG_ENDIAN
1046 u_char reserved :7;
1047#else
1048 u_char reserved :7;
1050#endif
1051};
1052
1053/* 0x4A linkage_descriptor */
1054
1055#define DESCR_LINKAGE_LEN 9
1056struct descr_linkage {
1066};
1067
1068#define DESCR_LINKAGE_8_LEN 3
1069struct descr_linkage_8 {
1070#if BYTE_ORDER == BIG_ENDIAN
1072 u_char reserved :3;
1074#else
1076 u_char reserved :3;
1078#endif
1079 u_char id_hi :8;
1080 u_char id_lo :8;
1081};
1082
1083/* 0x4B nvod_reference_descriptor */
1084
1085#define DESCR_NVOD_REFERENCE_LEN 2
1086struct descr_nvod_reference {
1089};
1090
1091#define ITEM_NVOD_REFERENCE_LEN 6
1092struct item_nvod_reference {
1099};
1100
1101/* 0x4C time_shifted_service_descriptor */
1102
1103#define DESCR_TIME_SHIFTED_SERVICE_LEN 4
1104struct descr_time_shifted_service {
1109};
1110
1111/* 0x4D short_event_descriptor */
1112
1113#define DESCR_SHORT_EVENT_LEN 6
1114struct descr_short_event {
1117 u_char lang_code1 :8;
1118 u_char lang_code2 :8;
1119 u_char lang_code3 :8;
1121};
1122
1123struct descr_short_event_mid {
1125};
1126
1127/* 0x4E extended_event_descriptor */
1128
1129#define DESCR_EXTENDED_EVENT_LEN 7
1130struct descr_extended_event {
1133 /* TBD */
1134#if BYTE_ORDER == BIG_ENDIAN
1137#else
1140#endif
1141 u_char lang_code1 :8;
1142 u_char lang_code2 :8;
1143 u_char lang_code3 :8;
1145};
1146
1147struct descr_extended_event_mid {
1149};
1150
1151#define ITEM_EXTENDED_EVENT_LEN 1
1152struct item_extended_event {
1154};
1155
1156struct item_extended_event_mid {
1158};
1159
1160/* 0x4F time_shifted_event_descriptor */
1161
1162#define DESCR_TIME_SHIFTED_EVENT_LEN 6
1163struct descr_time_shifted_event {
1170};
1171
1172/* 0x50 component_descriptor */
1173
1174#define DESCR_COMPONENT_LEN 8
1175struct descr_component {
1178#if BYTE_ORDER == BIG_ENDIAN
1181#else
1184#endif
1187 u_char lang_code1 :8;
1188 u_char lang_code2 :8;
1189 u_char lang_code3 :8;
1190};
1191
1192/* 0x51 mosaic_descriptor */
1193
1194#define DESCR_MOSAIC_LEN XX
1195struct descr_mosaic {
1198 /* TBD */
1199};
1200
1201/* 0x52 stream_identifier_descriptor */
1202
1203#define DESCR_STREAM_IDENTIFIER_LEN 3
1204struct descr_stream_identifier {
1208};
1209
1210/* 0x53 ca_identifier_descriptor */
1211
1212#define DESCR_CA_IDENTIFIER_LEN 2
1213struct descr_ca_identifier {
1216};
1217
1218/* 0x54 content_descriptor */
1219
1220#define DESCR_CONTENT_LEN 2
1221struct descr_content {
1224};
1225
1226struct nibble_content {
1227#if BYTE_ORDER == BIG_ENDIAN
1230#else
1233#endif
1234#if BYTE_ORDER == BIG_ENDIAN
1237#else
1240#endif
1241};
1242
1243/* 0x55 parental_rating_descriptor */
1244
1245#define DESCR_PARENTAL_RATING_LEN 2
1246struct descr_parental_rating {
1249};
1250
1251#define PARENTAL_RATING_LEN 4
1252struct parental_rating {
1253 u_char lang_code1 :8;
1254 u_char lang_code2 :8;
1255 u_char lang_code3 :8;
1256 u_char rating :8;
1257};
1258
1259/* 0x56 teletext_descriptor */
1260
1261#define DESCR_TELETEXT_LEN 2
1262struct descr_teletext {
1265};
1266
1267#define ITEM_TELETEXT_LEN 5
1268struct item_teletext {
1269 u_char lang_code1 :8;
1270 u_char lang_code2 :8;
1271 u_char lang_code3 :8;
1272#if BYTE_ORDER == BIG_ENDIAN
1273 u_char type :5;
1275#else
1277 u_char type :5;
1278#endif
1280};
1281
1282/* 0x57 telephone_descriptor */
1283
1284#define DESCR_TELEPHONE_LEN XX
1285struct descr_telephone {
1288 /* TBD */
1289};
1290
1291/* 0x58 local_time_offset_descriptor */
1292
1293#define DESCR_LOCAL_TIME_OFFSET_LEN 2
1294struct descr_local_time_offset {
1297};
1298
1299#define LOCAL_TIME_OFFSET_ENTRY_LEN 15
1300struct local_time_offset_entry {
1304#if BYTE_ORDER == BIG_ENDIAN
1306 u_char :1;
1308#else
1310 u_char :1;
1312#endif
1322};
1323
1324/* 0x59 subtitling_descriptor */
1325
1326#define DESCR_SUBTITLING_LEN 2
1327struct descr_subtitling {
1330};
1331
1332#define ITEM_SUBTITLING_LEN 8
1333struct item_subtitling {
1334 u_char lang_code1 :8;
1335 u_char lang_code2 :8;
1336 u_char lang_code3 :8;
1342};
1343
1344/* 0x5A terrestrial_delivery_system_descriptor */
1345
1346#define DESCR_TERRESTRIAL_DELIVERY_SYSTEM_LEN XX
1347struct descr_terrestrial_delivery {
1354#if BYTE_ORDER == BIG_ENDIAN
1355 u_char bandwidth :3;
1356 u_char priority :1;
1359 u_char reserved1 :2;
1360#else
1361 u_char reserved1 :2;
1364 u_char priority :1;
1365 u_char bandwidth :3;
1366#endif
1367#if BYTE_ORDER == BIG_ENDIAN
1369 u_char hierarchy :3;
1371#else
1373 u_char hierarchy :3;
1375#endif
1376#if BYTE_ORDER == BIG_ENDIAN
1381#else
1386#endif
1387 u_char reserver2 :8;
1388 u_char reserver3 :8;
1389 u_char reserver4 :8;
1390 u_char reserver5 :8;
1391};
1392
1393/* 0x5B multilingual_network_name_descriptor */
1394
1395#define DESCR_MULTILINGUAL_NETWORK_NAME_LEN XX
1396struct descr_multilingual_network_name {
1399};
1400
1401struct entry_multilingual_name {
1402 u_char lang_code1 :8;
1403 u_char lang_code2 :8;
1404 u_char lang_code3 :8;
1406};
1407
1408/* 0x5C multilingual_bouquet_name_descriptor */
1409
1410#define DESCR_MULTILINGUAL_BOUQUET_NAME_LEN XX
1411struct descr_multilingual_bouquet_name {
1414};
1415
1416/* 0x5D multilingual_service_name_descriptor */
1417
1418#define DESCR_MULTILINGUAL_SERVICE_NAME_LEN XX
1419struct descr_multilingual_service_name {
1422};
1423
1424struct entry_multilingual_service_name_mid {
1426};
1427
1428/* 0x5E multilingual_component_descriptor */
1429
1430#define DESCR_MULTILINGUAL_COMPONENT_LEN XX
1431struct descr_multilingual_component {
1435};
1436
1437/* 0x5F private_data_specifier_descriptor */
1438
1439#define DESCR_PRIVATE_DATA_SPECIFIER_LEN XX
1440struct descr_private_data_specifier {
1447};
1448
1449/* 0x60 service_move_descriptor */
1450
1451#define DESCR_SERVICE_MOVE_LEN XX
1452struct descr_service_move {
1461};
1462
1463/* 0x61 short_smoothing_buffer_descriptor */
1464
1465#define DESCR_SHORT_SMOOTHING_BUFFER_LEN XX
1466struct descr_short_smoothing_buffer {
1469 /* TBD */
1470};
1471
1472/* 0x62 frequency_list_descriptor */
1473
1474#define DESCR_FREQUENCY_LIST_LEN XX
1475struct descr_frequency_list {
1478#if BYTE_ORDER == BIG_ENDIAN
1479 u_char :6;
1481#else
1483 u_char :6;
1484#endif
1485};
1486
1487/* 0x63 partial_transport_stream_descriptor */
1488
1489#define DESCR_PARTIAL_TRANSPORT_STREAM_LEN XX
1490struct descr_partial_transport_stream {
1493 /* TBD */
1494};
1495
1496/* 0x64 data_broadcast_descriptor */
1497
1498#define DESCR_DATA_BROADCAST_LEN XX
1499struct descr_data_broadcast {
1502 /* TBD */
1503};
1504
1505/* 0x65 scrambling_descriptor */
1506
1507#define DESCR_SCRAMBLING_LEN XX
1508struct descr_scrambling {
1511 /* TBD */
1512};
1513
1514/* 0x66 data_broadcast_id_descriptor */
1515
1516#define DESCR_DATA_BROADCAST_ID_LEN XX
1517struct descr_data_broadcast_id {
1520 /* TBD */
1521};
1522
1523/* 0x67 transport_stream_descriptor */
1524
1525#define DESCR_TRANSPORT_STREAM_LEN XX
1526struct descr_transport_stream {
1529 /* TBD */
1530};
1531
1532/* 0x68 dsng_descriptor */
1533
1534#define DESCR_DSNG_LEN XX
1535struct descr_dsng {
1538 /* TBD */
1539};
1540
1541/* 0x69 pdc_descriptor */
1542
1543#define DESCR_PDC_LEN 5
1544struct descr_pdc {
1547 u_char pil0 :8;
1548 u_char pil1 :8;
1549 u_char pil2 :8;
1550};
1551
1552/* 0x6A ac3_descriptor */
1553
1554#define DESCR_AC3_LEN 3
1555struct descr_ac3 {
1558#if BYTE_ORDER == BIG_ENDIAN
1560 u_char bsid_flag :1;
1562 u_char asvc_flag :1;
1563 u_char reserved :4;
1564#else
1565 u_char reserved :4;
1566 u_char asvc_flag :1;
1568 u_char bsid_flag :1;
1570#endif
1571 u_char ac3_type :8;
1572 u_char bsid :8;
1573 u_char mainid :8;
1574 u_char asvc :8;
1575};
1576
1577/* 0x6B ancillary_data_descriptor */
1578
1579#define DESCR_ANCILLARY_DATA_LEN 3
1580struct descr_ancillary_data {
1584};
1585
1586/* 0x6C cell_list_descriptor */
1587
1588#define DESCR_CELL_LIST_LEN XX
1589struct descr_cell_list {
1592 /* TBD */
1593};
1594
1595/* 0x6D cell_frequency_link_descriptor */
1596
1597#define DESCR_CELL_FREQUENCY_LINK_LEN XX
1598struct descr_cell_frequency_link {
1601 /* TBD */
1602};
1603
1604/* 0x6E announcement_support_descriptor */
1605
1606#define DESCR_ANNOUNCEMENT_SUPPORT_LEN XX
1607struct descr_announcement_support {
1610 /* TBD */
1611};
1612
1613/* 0x6F application_signalling_descriptor */
1614
1615#define DESCR_APPLICATION_SIGNALLING_LEN 2
1616struct descr_application_signalling {
1619};
1620
1621#define APPLICATION_SIGNALLING_ENTRY_LEN 3
1622struct application_signalling_entry {
1625#if BYTE_ORDER == BIG_ENDIAN
1626 u_char :3;
1628#else
1630 u_char :3;
1631#endif
1632};
1633
1634/* 0x71 service_identifier_descriptor (ETSI TS 102 812, MHP) */
1635
1636struct descr_service_identifier {
1639};
1640
1641/* 0x72 service_availbility_descriptor */
1642
1643struct descr_service_availbility {
1646#if BYTE_ORDER == BIG_ENDIAN
1648 u_char reserved :7;
1649#else
1650 u_char reserved :7;
1652#endif
1653};
1654
1655/* 0x73 default_authority_descriptor (ETSI TS 102 323) */
1656
1657struct descr_default_authority {
1660};
1661
1662/* 0x74 related_content_descriptor (ETSI TS 102 323) */
1663
1664struct descr_related_content {
1667};
1668
1669/* 0x75 tva_id_descriptor (ETSI TS 102 323) */
1670
1671struct descr_tva_id {
1674};
1675
1676/* 0x76 content_identifier_descriptor (ETSI TS 102 323) */
1677
1678struct descr_content_identifier {
1681};
1682
1683struct content_identifier_entry {
1684#if BYTE_ORDER == BIG_ENDIAN
1685 u_char crid_type :6;
1687#else
1689 u_char crid_type :6;
1690#endif
1691 union {
1694 };
1695 union {
1696 u_char crid_byte :8;
1698 };
1699};
1700
1701/* 0x77 time_slice_fec_identifier_descriptor (ETSI EN 301 192) */
1702
1703struct descr_time_slice_fec_identifier {
1706#if BYTE_ORDER == BIG_ENDIAN
1708 u_char mpe_fec :2;
1709 u_char reserved :2;
1710 u_char frame_size :3;
1711#else
1712 u_char frame_size :3;
1713 u_char reserved :2;
1714 u_char mpe_fec :2;
1716#endif
1718#if BYTE_ORDER == BIG_ENDIAN
1721#else
1724#endif
1725};
1726
1727/* 0x78 ecm_repetition_rate_descriptor (ETSI EN 301 192) */
1728
1729struct descr_ecm_repetition_rate {
1736};
1737
1738/* 0x79 s2_satellite_delivery_system_descriptor */
1739
1740struct descr_s2_satellite_delivery_system {
1743#if BYTE_ORDER == BIG_ENDIAN
1747 u_char reserved :5;
1748#else
1749 u_char reserved :5;
1753#endif
1754};
1755
1756struct descr_scrambling_sequence_selector {
1757#if BYTE_ORDER == BIG_ENDIAN
1758 u_char reserved :6;
1760#else
1762 u_char reserved :6;
1763#endif
1766};
1767
1768/* 0x7A enhanced_ac3_descriptor */
1769
1770struct descr_enhanced_ac3 {
1773#if BYTE_ORDER == BIG_ENDIAN
1775 u_char bsid_flag :1;
1777 u_char asvc_flag :1;
1782#else
1787 u_char asvc_flag :1;
1789 u_char bsid_flag :1;
1791#endif
1792};
1793
1794/* 0x7B dts_descriptor */
1795
1796struct descr_dts {
1799#if BYTE_ORDER == BIG_ENDIAN
1802 u_char nblks :7;
1803 u_char fsize_hi :6;
1804 u_char fsize_lo :8;
1806 u_char lfe_flag :1;
1808#else
1810 u_char lfe_flag :1;
1812 u_char fsize_lo :8;
1813 u_char fsize_hi :6;
1814 u_char nblks :7;
1817#endif
1818};
1819
1820/* 0x7C aac_descriptor */
1821
1822struct descr_aac {
1826#if BYTE_ORDER == BIG_ENDIAN
1828 u_char reserved :7;
1829#else
1830 u_char reserved :7;
1832#endif
1833};
1834/* 0x7F extension_descriptor */
1835
1836struct descr_extension {
1840};
1841
1842/* extension 0x04 t2_delivery_system_descriptor */
1843
1844struct descr_t2_delivery_system {
1848 u_char plp_id :8;
1851#if BYTE_ORDER == BIG_ENDIAN
1852 u_char siso_miso :2;
1853 u_char bandwidth :4;
1854 u_char reserved :2;
1858 u_char tfs_flag :1;
1859#else
1860 u_char reserved :2;
1861 u_char bandwidth :4;
1862 u_char siso_miso :2;
1863 u_char tfs_flag :1;
1867#endif
1868/* now follow cell_id, frequency_loop_length, centre_frequency,
1869 subcell_info_loop_length, cell_id_extension, transposer_frequency
1870 fields looping to the end */
1871};
1872
1873/* 0x83 logical_channel_descriptor */
1874
1875#define DESCR_LOGICAL_CHANNEL_LEN 2
1876struct descr_logical_channel {
1879};
1880
1881#define ITEM_LOGICAL_CHANNEL_LEN 4
1882struct item_logical_channel {
1885#if BYTE_ORDER == BIG_ENDIAN
1887 u_char reserved :5;
1889#else
1891 u_char reserved :5;
1893#endif
1895};
1896
1897/* 0x88 hd_simulcast_logical_channel_descriptor */
1898
1899#define DESCR_HD_SIMULCAST_LOGICAL_CHANNEL_LEN 2
1900struct descr_hd_simulcast_logical_channel {
1903};
1904
1905#define ITEM_HD_SIMULCAST_LOGICAL_CHANNEL_LEN 4
1906struct item_hd_simulcast_logical_channel {
1909#if BYTE_ORDER == BIG_ENDIAN
1911 u_char reserved :5;
1913#else
1915 u_char reserved :5;
1917#endif
1919};
1920
1921/* MHP 0x00 application_descriptor */
1922
1923#define DESCR_APPLICATION_LEN 3
1924
1925struct descr_application {
1929};
1930
1931#define DESCR_APPLICATION_END_LEN 2
1932
1933struct descr_application_end {
1934#if BYTE_ORDER == BIG_ENDIAN
1936 u_char visibility :2;
1937 u_char :5;
1938#else
1939 u_char :5;
1940 u_char visibility :2;
1942#endif
1944/*now follow 8bit transport_protocol_label fields to the end */
1945};
1946
1947#define APPLICATION_PROFILE_ENTRY_LEN 5
1948
1949struct application_profile_entry {
1955};
1956
1957/* MHP 0x01 application_name_desriptor */
1958
1959#define DESCR_APPLICATION_NAME_LEN 2
1960
1961struct descr_application_name {
1964};
1965
1966#define APPLICATION_NAME_ENTRY_LEN 4
1967
1968struct descr_application_name_entry {
1969 u_char lang_code1 :8;
1970 u_char lang_code2 :8;
1971 u_char lang_code3 :8;
1973 /* application name string */
1974};
1975
1976/* MHP 0x02 transport_protocol_descriptor */
1977
1978#define DESCR_TRANSPORT_PROTOCOL_LEN 5
1979
1980struct descr_transport_protocol {
1986 /* protocol_id-specific selector bytes follow */
1987};
1988
1989struct descr_url_extension_entry {
1991 /* URL extension string */
1992};
1993
1994#define TRANSPORT_VIA_OC_LEN 1
1995
1996struct transport_via_oc {
1997#if BYTE_ORDER == BIG_ENDIAN
1998 u_char remote :1;
1999 u_char :7;
2000#else
2001 u_char :7;
2002 u_char remote :1;
2003#endif
2004};
2005
2006//if remote is true, transport_via_oc_remote_end_t follows,
2007// else transport_via_oc_end_t.
2008
2009#define TRANSPORT_VIA_OC_REMOTE_END_LEN 7
2010
2011struct transport_via_oc_remote_end {
2019};
2020
2021#define TRANSPORT_VIA_OC_END_LEN 1
2022
2023struct transport_via_oc_end {
2025};
2026
2027#define TRANSPORT_VIA_HTTP_LEN 1
2028
2029struct transport_via_http {
2031};
2032
2033/* 0x03 dvb_j_application_descriptor() */
2034
2035#define DESCR_DVBJ_APPLICATION_LEN 2
2036
2037struct descr_dvbj_application {
2040};
2041
2042#define DESCR_DVBJ_APPLICATION_ENTRY_LEN 1
2043
2044struct descr_dvbj_application_entry {
2046 /* parameter string */
2047};
2048
2049/* 0x04 dvb_j_application_location_descriptor */
2050
2051#define DESCR_DVBJ_APPLICATION_LOCATION_LEN 3
2052
2053struct descr_dvbj_application_location {
2057 /* base directory string */
2058};
2059
2060#define DESCR_DVBJ_APPLICATION_LOCATION_MID_LEN 1
2061
2062struct descr_dvbj_application_location_mid {
2064};
2065
2066/* 0x0B application_icons_descriptor */
2067
2068#define DESCR_APPLICATION_ICONS_LEN 3
2069
2070struct descr_application_icons_descriptor {
2074 /* icon locator */
2075};
2076
2077#define DESCR_APPLICATION_ICONS_END_LEN 2
2078
2079struct descr_application_icons_descriptor_end {
2082};
2083
2084/* 0x15 simple application location descriptor */
2085
2086#define DESCR_SIMPLE_APPLICATION_LOCATION_LEN 3
2087
2088struct descr_simple_application_location_descriptor {
2091 /* initial_path_bytes */
2092};
2093
2094// Private DVB Descriptor Premiere.de
2095// 0xF2 Content Transmission Descriptor
2096// http://dvbsnoop.sourceforge.net/examples/example-private-section.html
2097
2098#define DESCR_PREMIERE_CONTENT_TRANSMISSION_LEN 8
2099
2100struct descr_premiere_content_transmission {
2109};
2110
2111#define ITEM_PREMIERE_CONTENT_TRANSMISSION_DAY_LEN 3
2112
2113struct item_premiere_content_transmission_day {
2114 u_char mjd_hi :8;
2115 u_char mjd_lo :8;
2117};
2118
2119#define ITEM_PREMIERE_CONTENT_TRANSMISSION_TIME_LEN 3
2120
2121struct item_premiere_content_transmission_time {
2125};
2126
2127/* 0x05 registration_descriptor */
2128
2129#define DESCR_REGISTRATION_LEN 6
2130struct descr_registration {
2137};
2138
2139/* 0x28 avc_descriptor */
2140
2141#define DESCR_AVC_LEN 6
2142struct descr_avc {
2153 u_char level_idc :8;
2157 u_char reserved :5;
2158};
2159
2160} //end of namespace
2161
2162#endif //LIBSI_HEADERS_H
unsigned char u_char
u_char application_descriptors_length_hi
u_char application_descriptors_length_lo
u_char application_control_code
u_char application_loop_length_lo
u_char application_loop_length_hi
u_char common_descriptors_length_hi
u_char last_section_number
u_char application_type_hi
u_char section_syntax_indicator
u_char section_length_lo
u_char current_next_indicator
u_char application_type_lo
u_char common_descriptors_length_lo
u_char section_length_hi
u_char version_minor
u_char application_profile_hi
u_char version_micro
u_char version_major
u_char application_profile_lo
u_char application_type_hi
u_char AIT_version_number
u_char application_type_lo
u_char section_syntax_indicator
u_char section_length_hi
u_char section_length_lo
u_char last_section_number
u_char current_next_indicator
u_char crid_ref_hi
u_char crid_location
u_char crid_length
u_char crid_byte
u_char crid_type
u_char crid_ref_lo
u_char application_name_length
u_char lang_code2
u_char lang_code3
u_char lang_code1
u_char frame_packing_sei_not_present_flag
u_char parameter_length
u_char url_extension_length
u_char segment_last_section_number
u_char section_length_hi
u_char current_next_indicator
u_char last_section_number
u_char section_syntax_indicator
u_char transport_stream_id_hi
u_char transport_stream_id_lo
u_char section_length_lo
u_char original_network_id_hi
u_char original_network_id_lo
u_char time_of_change_time_m
u_char country_code2
u_char country_code1
u_char time_of_change_time_s
u_char time_of_change_mjd_hi
u_char next_time_offset_m
u_char local_time_offset_m
u_char time_of_change_time_h
u_char time_of_change_mjd_lo
u_char country_code3
u_char local_time_offset_polarity
u_char next_time_offset_h
u_char country_region_id
u_char local_time_offset_h
u_char transport_stream_id_lo
u_char transport_descriptors_length_hi
u_char original_network_id_lo
u_char original_network_id_hi
u_char transport_descriptors_length_lo
u_char transport_stream_id_hi
u_char transport_stream_loop_length_lo
u_char transport_stream_loop_length_hi
u_char section_length_hi
u_char section_syntax_indicator
u_char last_section_number
u_char section_length_lo
u_char network_descriptor_length_lo
u_char current_next_indicator
u_char network_descriptor_length_hi
u_char section_length_hi
u_char transport_stream_id_lo
u_char section_syntax_indicator
u_char last_section_number
u_char section_length_lo
u_char current_next_indicator
u_char transport_stream_id_hi
u_char last_section_number
u_char descriptors_loop_length_hi
u_char section_syntax_indicator
u_char section_length_hi
u_char section_length_lo
u_char descriptors_loop_length_lo
u_char current_next_indicator
u_char current_next_indicator
u_char section_length_lo
u_char last_section_number
u_char program_number_lo
u_char program_info_length_lo
u_char program_number_hi
u_char section_length_hi
u_char section_syntax_indicator
u_char program_info_length_hi
u_char section_syntax_indicator
u_char section_length_hi
u_char section_length_lo
u_char transport_stream_id_hi
u_char original_network_id_hi
u_char transport_stream_id_lo
u_char section_syntax_indicator
u_char section_length_lo
u_char current_next_indicator
u_char section_length_hi
u_char last_section_number
u_char original_network_id_lo
u_char section_length_lo
u_char section_syntax_indicator
u_char section_length_hi
u_char descriptors_loop_length_hi
u_char section_length_lo
u_char descriptors_loop_length_lo
u_char section_length_hi
u_char section_syntax_indicator
u_char section_length_hi
u_char section_syntax_indicator
u_char last_section_number
u_char current_next_indicator
u_char section_length_lo