vdr 2.6.4
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
28#if BYTE_ORDER == BIG_ENDIAN
32#else
34 u_char :3;
36#endif
38};
39
42#if BYTE_ORDER == BIG_ENDIAN
46#else
48 u_char :3;
50#endif
54#if BYTE_ORDER == BIG_ENDIAN
58#else
61 u_char :2;
62#endif
65};
66
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
98#else
100 u_char :2;
101 u_char dummy :1; // has to be 0
103#endif
107#if BYTE_ORDER == BIG_ENDIAN
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
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 {
150#if BYTE_ORDER == BIG_ENDIAN
152 u_char dummy :1; // has to be 0
155#else
157 u_char :2;
158 u_char dummy :1; // has to be 0
160#endif
164#if BYTE_ORDER == BIG_ENDIAN
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 {
191#if BYTE_ORDER == BIG_ENDIAN
193 u_char dummy :1; // has to be 0
196#else
198 u_char :2;
199 u_char dummy :1; // has to be 0
201#endif
205#if BYTE_ORDER == BIG_ENDIAN
209#else
212 u_char :2;
213#endif
216#if BYTE_ORDER == BIG_ENDIAN
219#else
221 u_char :3;
222#endif
224#if BYTE_ORDER == BIG_ENDIAN
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
242#else
244 u_char :3;
245#endif
247#if BYTE_ORDER == BIG_ENDIAN
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 {
272#if BYTE_ORDER == BIG_ENDIAN
274 u_char dummy :1; // has to be 0
277#else
279 u_char :2;
280 u_char dummy :1; // has to be 0
282#endif
286#if BYTE_ORDER == BIG_ENDIAN
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 {
313#if BYTE_ORDER == BIG_ENDIAN
317#else
319 u_char :3;
321#endif
325#if BYTE_ORDER == BIG_ENDIAN
329#else
332 u_char :2;
333#endif
336#if BYTE_ORDER == BIG_ENDIAN
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
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
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 {
415#if BYTE_ORDER == BIG_ENDIAN
419#else
421 u_char :3;
423#endif
427#if BYTE_ORDER == BIG_ENDIAN
431#else
434 u_char :2;
435#endif
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
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 {
484#if BYTE_ORDER == BIG_ENDIAN
488#else
490 u_char :3;
492#endif
496#if BYTE_ORDER == BIG_ENDIAN
500#else
503 u_char :2;
504#endif
513};
514
515#define EIT_EVENT_LEN 12
516
517struct eit_event {
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 {
552#if BYTE_ORDER == BIG_ENDIAN
556#else
558 u_char :3;
560#endif
562};
563
564struct rst_info {
573#if BYTE_ORDER == BIG_ENDIAN
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 {
596#if BYTE_ORDER == BIG_ENDIAN
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 {
626#if BYTE_ORDER == BIG_ENDIAN
630#else
632 u_char :3;
634#endif
641#if BYTE_ORDER == BIG_ENDIAN
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 {
695#if BYTE_ORDER == BIG_ENDIAN
699#else
701 u_char :3;
703#endif
707#if BYTE_ORDER == BIG_ENDIAN
711#else
714 u_char :2;
715#endif
718#if BYTE_ORDER == BIG_ENDIAN
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
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
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 {
778#if BYTE_ORDER == BIG_ENDIAN
780 u_char dummy :1; // has to be 0
783#else
785 u_char :2;
786 u_char dummy :1; // has to be 0
788#endif
792#if BYTE_ORDER == BIG_ENDIAN
796#else
799 u_char :2;
800#endif
803
808
812
813#if BYTE_ORDER == BIG_ENDIAN
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
862#else
863 u_char CA_PID_hi :5;
864 u_char reserved :3;
865#endif
867};
868
869/* 0x0A iso_639_language_descriptor */
870
871#define DESCR_ISO_639_LANGUAGE_LEN 5
875};
876
882};
883
884/* 0x13 carousel_identifier_descriptor */
885
886#define DESCR_CAROUSEL_IDENTIFIER_LEN 7
895 /* FormatSpecifier follows */
896};
897
898/* 0x40 network_name_descriptor */
899
900#define DESCR_NETWORK_NAME_LEN 2
904};
905
906/* 0x41 service_list_descriptor */
907
908#define DESCR_SERVICE_LIST_LEN 2
912};
913
914#define DESCR_SERVICE_LIST_LOOP_LEN 3
919};
920
921/* 0x42 stuffing_descriptor */
922
923#define DESCR_STUFFING_LEN XX
927 /* TBD */
928};
929
930/* 0x43 satellite_delivery_system_descriptor */
931
932#define DESCR_SATELLITE_DELIVERY_SYSTEM_LEN 13
942#if BYTE_ORDER == BIG_ENDIAN
948#else
951 u_char roll_off :2;
954#endif
958#if BYTE_ORDER == BIG_ENDIAN
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
978#if BYTE_ORDER == BIG_ENDIAN
981#else
982 u_char fec_outer :4;
983 u_char reserved2 :4;
984#endif
989#if BYTE_ORDER == BIG_ENDIAN
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
1004 /* TBD */
1005};
1006
1007/* 0x46 vbi_teletext_descriptor */
1008
1009#define DESCR_VBI_TELETEXT_LEN XX
1013 /* TBD */
1014};
1015
1016/* 0x47 bouquet_name_descriptor */
1017
1018#define DESCR_BOUQUET_NAME_LEN 2
1022};
1023
1024/* 0x48 service_descriptor */
1025
1026#define DESCR_SERVICE_LEN 4
1032};
1033
1036};
1037
1038/* 0x49 country_availability_descriptor */
1039
1040#define DESCR_COUNTRY_AVAILABILITY_LEN 3
1044#if BYTE_ORDER == BIG_ENDIAN
1047#else
1048 u_char reserved :7;
1050#endif
1051};
1052
1053/* 0x4A linkage_descriptor */
1054
1055#define DESCR_LINKAGE_LEN 9
1066};
1067
1068#define DESCR_LINKAGE_8_LEN 3
1070#if BYTE_ORDER == BIG_ENDIAN
1074#else
1076 u_char reserved :3;
1078#endif
1081};
1082
1083/* 0x4B nvod_reference_descriptor */
1084
1085#define DESCR_NVOD_REFERENCE_LEN 2
1089};
1090
1091#define ITEM_NVOD_REFERENCE_LEN 6
1099};
1100
1101/* 0x4C time_shifted_service_descriptor */
1102
1103#define DESCR_TIME_SHIFTED_SERVICE_LEN 4
1109};
1110
1111/* 0x4D short_event_descriptor */
1112
1113#define DESCR_SHORT_EVENT_LEN 6
1121};
1122
1125};
1126
1127/* 0x4E extended_event_descriptor */
1128
1129#define DESCR_EXTENDED_EVENT_LEN 7
1133 /* TBD */
1134#if BYTE_ORDER == BIG_ENDIAN
1137#else
1140#endif
1145};
1146
1149};
1150
1151#define ITEM_EXTENDED_EVENT_LEN 1
1154};
1155
1158};
1159
1160/* 0x4F time_shifted_event_descriptor */
1161
1162#define DESCR_TIME_SHIFTED_EVENT_LEN 6
1170};
1171
1172/* 0x50 component_descriptor */
1173
1174#define DESCR_COMPONENT_LEN 8
1178#if BYTE_ORDER == BIG_ENDIAN
1181#else
1184#endif
1190};
1191
1192/* 0x51 mosaic_descriptor */
1193
1194#define DESCR_MOSAIC_LEN XX
1198 /* TBD */
1199};
1200
1201/* 0x52 stream_identifier_descriptor */
1202
1203#define DESCR_STREAM_IDENTIFIER_LEN 3
1208};
1209
1210/* 0x53 ca_identifier_descriptor */
1211
1212#define DESCR_CA_IDENTIFIER_LEN 2
1216};
1217
1218/* 0x54 content_descriptor */
1219
1220#define DESCR_CONTENT_LEN 2
1224};
1225
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
1249};
1250
1251#define PARENTAL_RATING_LEN 4
1257};
1258
1259/* 0x56 teletext_descriptor */
1260
1261#define DESCR_TELETEXT_LEN 2
1265};
1266
1267#define ITEM_TELETEXT_LEN 5
1272#if BYTE_ORDER == BIG_ENDIAN
1275#else
1277 u_char type :5;
1278#endif
1280};
1281
1282/* 0x57 telephone_descriptor */
1283
1284#define DESCR_TELEPHONE_LEN XX
1288 /* TBD */
1289};
1290
1291/* 0x58 local_time_offset_descriptor */
1292
1293#define DESCR_LOCAL_TIME_OFFSET_LEN 2
1297};
1298
1299#define LOCAL_TIME_OFFSET_ENTRY_LEN 15
1304#if BYTE_ORDER == BIG_ENDIAN
1308#else
1310 u_char :1;
1312#endif
1322};
1323
1324/* 0x59 subtitling_descriptor */
1325
1326#define DESCR_SUBTITLING_LEN 2
1330};
1331
1332#define ITEM_SUBTITLING_LEN 8
1342};
1343
1344/* 0x5A terrestrial_delivery_system_descriptor */
1345
1346#define DESCR_TERRESTRIAL_DELIVERY_SYSTEM_LEN XX
1354#if BYTE_ORDER == BIG_ENDIAN
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
1371#else
1373 u_char hierarchy :3;
1375#endif
1376#if BYTE_ORDER == BIG_ENDIAN
1381#else
1386#endif
1391};
1392
1393/* 0x5B multilingual_network_name_descriptor */
1394
1395#define DESCR_MULTILINGUAL_NETWORK_NAME_LEN XX
1399};
1400
1406};
1407
1408/* 0x5C multilingual_bouquet_name_descriptor */
1409
1410#define DESCR_MULTILINGUAL_BOUQUET_NAME_LEN XX
1414};
1415
1416/* 0x5D multilingual_service_name_descriptor */
1417
1418#define DESCR_MULTILINGUAL_SERVICE_NAME_LEN XX
1422};
1423
1426};
1427
1428/* 0x5E multilingual_component_descriptor */
1429
1430#define DESCR_MULTILINGUAL_COMPONENT_LEN XX
1435};
1436
1437/* 0x5F private_data_specifier_descriptor */
1438
1439#define DESCR_PRIVATE_DATA_SPECIFIER_LEN XX
1447};
1448
1449/* 0x60 service_move_descriptor */
1450
1451#define DESCR_SERVICE_MOVE_LEN XX
1461};
1462
1463/* 0x61 short_smoothing_buffer_descriptor */
1464
1465#define DESCR_SHORT_SMOOTHING_BUFFER_LEN XX
1469 /* TBD */
1470};
1471
1472/* 0x62 frequency_list_descriptor */
1473
1474#define DESCR_FREQUENCY_LIST_LEN XX
1478#if BYTE_ORDER == BIG_ENDIAN
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
1493 /* TBD */
1494};
1495
1496/* 0x64 data_broadcast_descriptor */
1497
1498#define DESCR_DATA_BROADCAST_LEN XX
1502 /* TBD */
1503};
1504
1505/* 0x65 scrambling_descriptor */
1506
1507#define DESCR_SCRAMBLING_LEN XX
1511 /* TBD */
1512};
1513
1514/* 0x66 data_broadcast_id_descriptor */
1515
1516#define DESCR_DATA_BROADCAST_ID_LEN XX
1520 /* TBD */
1521};
1522
1523/* 0x67 transport_stream_descriptor */
1524
1525#define DESCR_TRANSPORT_STREAM_LEN XX
1529 /* TBD */
1530};
1531
1532/* 0x68 dsng_descriptor */
1533
1534#define DESCR_DSNG_LEN XX
1538 /* TBD */
1539};
1540
1541/* 0x69 pdc_descriptor */
1542
1543#define DESCR_PDC_LEN 5
1550};
1551
1552/* 0x6A ac3_descriptor */
1553
1554#define DESCR_AC3_LEN 3
1558#if BYTE_ORDER == BIG_ENDIAN
1564#else
1565 u_char reserved :4;
1566 u_char asvc_flag :1;
1568 u_char bsid_flag :1;
1570#endif
1575};
1576
1577/* 0x6B ancillary_data_descriptor */
1578
1579#define DESCR_ANCILLARY_DATA_LEN 3
1584};
1585
1586/* 0x6C cell_list_descriptor */
1587
1588#define DESCR_CELL_LIST_LEN XX
1592 /* TBD */
1593};
1594
1595/* 0x6D cell_frequency_link_descriptor */
1596
1597#define DESCR_CELL_FREQUENCY_LINK_LEN XX
1601 /* TBD */
1602};
1603
1604/* 0x6E announcement_support_descriptor */
1605
1606#define DESCR_ANNOUNCEMENT_SUPPORT_LEN XX
1610 /* TBD */
1611};
1612
1613/* 0x6F application_signalling_descriptor */
1614
1615#define DESCR_APPLICATION_SIGNALLING_LEN 2
1619};
1620
1621#define APPLICATION_SIGNALLING_ENTRY_LEN 3
1625#if BYTE_ORDER == BIG_ENDIAN
1628#else
1630 u_char :3;
1631#endif
1632};
1633
1634/* 0x71 service_identifier_descriptor (ETSI TS 102 812, MHP) */
1635
1639};
1640
1641/* 0x72 service_availbility_descriptor */
1642
1646#if BYTE_ORDER == BIG_ENDIAN
1649#else
1650 u_char reserved :7;
1652#endif
1653};
1654
1655/* 0x73 default_authority_descriptor (ETSI TS 102 323) */
1656
1660};
1661
1662/* 0x74 related_content_descriptor (ETSI TS 102 323) */
1663
1667};
1668
1669/* 0x75 tva_id_descriptor (ETSI TS 102 323) */
1670
1674};
1675
1676/* 0x76 content_identifier_descriptor (ETSI TS 102 323) */
1677
1681};
1682
1684#if BYTE_ORDER == BIG_ENDIAN
1687#else
1689 u_char crid_type :6;
1690#endif
1691 union {
1694 };
1695 union {
1698 };
1699};
1700
1701/* 0x77 time_slice_fec_identifier_descriptor (ETSI EN 301 192) */
1702
1706#if BYTE_ORDER == BIG_ENDIAN
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
1736};
1737
1738/* 0x79 s2_satellite_delivery_system_descriptor */
1739
1743#if BYTE_ORDER == BIG_ENDIAN
1748#else
1749 u_char reserved :5;
1753#endif
1754};
1755
1757#if BYTE_ORDER == BIG_ENDIAN
1760#else
1762 u_char reserved :6;
1763#endif
1766};
1767
1768/* 0x7A enhanced_ac3_descriptor */
1769
1773#if BYTE_ORDER == BIG_ENDIAN
1782#else
1787 u_char asvc_flag :1;
1789 u_char bsid_flag :1;
1791#endif
1792};
1793
1794/* 0x7B dts_descriptor */
1795
1799#if BYTE_ORDER == BIG_ENDIAN
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
1826#if BYTE_ORDER == BIG_ENDIAN
1829#else
1830 u_char reserved :7;
1832#endif
1833};
1834/* 0x7F extension_descriptor */
1835
1840};
1841
1842/* extension 0x04 t2_delivery_system_descriptor */
1843
1851#if BYTE_ORDER == BIG_ENDIAN
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
1879};
1880
1881#define ITEM_LOGICAL_CHANNEL_LEN 4
1885#if BYTE_ORDER == BIG_ENDIAN
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
1903};
1904
1905#define ITEM_HD_SIMULCAST_LOGICAL_CHANNEL_LEN 4
1909#if BYTE_ORDER == BIG_ENDIAN
1913#else
1915 u_char reserved :5;
1917#endif
1919};
1920
1921/* MHP 0x00 application_descriptor */
1922
1923#define DESCR_APPLICATION_LEN 3
1924
1929};
1930
1931#define DESCR_APPLICATION_END_LEN 2
1932
1934#if BYTE_ORDER == BIG_ENDIAN
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
1955};
1956
1957/* MHP 0x01 application_name_desriptor */
1958
1959#define DESCR_APPLICATION_NAME_LEN 2
1960
1964};
1965
1966#define APPLICATION_NAME_ENTRY_LEN 4
1967
1973 /* application name string */
1974};
1975
1976/* MHP 0x02 transport_protocol_descriptor */
1977
1978#define DESCR_TRANSPORT_PROTOCOL_LEN 5
1979
1986 /* protocol_id-specific selector bytes follow */
1987};
1988
1991 /* URL extension string */
1992};
1993
1994#define TRANSPORT_VIA_OC_LEN 1
1995
1997#if BYTE_ORDER == BIG_ENDIAN
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
2019};
2020
2021#define TRANSPORT_VIA_OC_END_LEN 1
2022
2025};
2026
2027#define TRANSPORT_VIA_HTTP_LEN 1
2028
2031};
2032
2033/* 0x03 dvb_j_application_descriptor() */
2034
2035#define DESCR_DVBJ_APPLICATION_LEN 2
2036
2040};
2041
2042#define DESCR_DVBJ_APPLICATION_ENTRY_LEN 1
2043
2046 /* parameter string */
2047};
2048
2049/* 0x04 dvb_j_application_location_descriptor */
2050
2051#define DESCR_DVBJ_APPLICATION_LOCATION_LEN 3
2052
2057 /* base directory string */
2058};
2059
2060#define DESCR_DVBJ_APPLICATION_LOCATION_MID_LEN 1
2061
2064};
2065
2066/* 0x0B application_icons_descriptor */
2067
2068#define DESCR_APPLICATION_ICONS_LEN 3
2069
2074 /* icon locator */
2075};
2076
2077#define DESCR_APPLICATION_ICONS_END_LEN 2
2078
2082};
2083
2084/* 0x15 simple application location descriptor */
2085
2086#define DESCR_SIMPLE_APPLICATION_LOCATION_LEN 3
2087
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
2109};
2110
2111#define ITEM_PREMIERE_CONTENT_TRANSMISSION_DAY_LEN 3
2112
2117};
2118
2119#define ITEM_PREMIERE_CONTENT_TRANSMISSION_TIME_LEN 3
2120
2125};
2126
2127/* 0x05 registration_descriptor */
2128
2129#define DESCR_REGISTRATION_LEN 6
2137};
2138
2139/* 0x28 avc_descriptor */
2140
2141#define DESCR_AVC_LEN 6
2158};
2159
2160} //end of namespace
2161
2162#endif //LIBSI_HEADERS_H
unsigned char u_char
Definition headers.h:24
u_char descriptor_tag
Definition headers.h:68
u_char descriptor_length
Definition headers.h:69
u_char section_syntax_indicator
Definition headers.h:43
u_char section_syntax_indicator
Definition headers.h:29
u_char section_length_lo
Definition headers.h:37
u_char table_id
Definition headers.h:27
u_char section_length_hi
Definition headers.h:31
u_char application_descriptors_length_hi
Definition headers.h:763
u_char application_id_lo
Definition headers.h:759
u_char organisation_id_lo_lo
Definition headers.h:755
u_char organisation_id_lo_hi
Definition headers.h:754
u_char application_descriptors_length_lo
Definition headers.h:768
u_char application_control_code
Definition headers.h:760
u_char organisation_id_hi_hi
Definition headers.h:752
u_char organisation_id_hi_lo
Definition headers.h:753
u_char application_id_hi
Definition headers.h:758
u_char application_loop_length_lo
Definition headers.h:738
u_char application_loop_length_hi
Definition headers.h:733
u_char common_descriptors_length_hi
Definition headers.h:720
u_char last_section_number
Definition headers.h:717
u_char version_number
Definition headers.h:709
u_char application_type_hi
Definition headers.h:705
u_char section_syntax_indicator
Definition headers.h:696
u_char section_number
Definition headers.h:716
u_char section_length_lo
Definition headers.h:704
u_char current_next_indicator
Definition headers.h:710
u_char application_type_lo
Definition headers.h:706
u_char common_descriptors_length_lo
Definition headers.h:725
u_char section_length_hi
Definition headers.h:698
u_char table_id
Definition headers.h:694
Definition headers.h:1949
u_char version_minor
Definition headers.h:1953
u_char application_profile_hi
Definition headers.h:1950
u_char version_micro
Definition headers.h:1954
u_char version_major
Definition headers.h:1952
u_char application_profile_lo
Definition headers.h:1951
Definition headers.h:1622
u_char application_type_hi
Definition headers.h:1623
u_char AIT_version_number
Definition headers.h:1627
u_char application_type_lo
Definition headers.h:1624
u_char section_syntax_indicator
Definition headers.h:151
u_char section_length_hi
Definition headers.h:154
u_char section_length_lo
Definition headers.h:161
u_char table_id
Definition headers.h:149
u_char reserved_2
Definition headers.h:163
u_char last_section_number
Definition headers.h:174
u_char current_next_indicator
Definition headers.h:167
u_char dummy
Definition headers.h:152
u_char section_number
Definition headers.h:173
u_char version_number
Definition headers.h:166
u_char reserved_1
Definition headers.h:162
Definition headers.h:1683
u_char crid_ref_hi
Definition headers.h:1693
u_char crid_location
Definition headers.h:1686
u_char crid_length
Definition headers.h:1692
u_char crid_byte
Definition headers.h:1696
u_char crid_type
Definition headers.h:1685
u_char crid_ref_lo
Definition headers.h:1697
u_char profile_and_level
Definition headers.h:1825
u_char reserved
Definition headers.h:1828
u_char descriptor_tag
Definition headers.h:1823
u_char aac_type_flag
Definition headers.h:1827
u_char descriptor_length
Definition headers.h:1824
u_char ac3_type
Definition headers.h:1571
u_char ac3_type_flag
Definition headers.h:1559
u_char bsid
Definition headers.h:1572
u_char reserved
Definition headers.h:1563
u_char descriptor_tag
Definition headers.h:1556
u_char asvc
Definition headers.h:1574
u_char bsid_flag
Definition headers.h:1560
u_char descriptor_length
Definition headers.h:1557
u_char mainid
Definition headers.h:1573
u_char mainid_flag
Definition headers.h:1561
u_char asvc_flag
Definition headers.h:1562
Definition headers.h:1968
u_char application_name_length
Definition headers.h:1972
u_char lang_code2
Definition headers.h:1970
u_char lang_code3
Definition headers.h:1971
u_char lang_code1
Definition headers.h:1969
u_char application_profiles_length
Definition headers.h:1928
u_char descriptor_tag
Definition headers.h:2143
u_char constraint_set4_flag
Definition headers.h:2150
u_char profile_idc
Definition headers.h:2145
u_char frame_packing_sei_not_present_flag
Definition headers.h:2156
u_char constraint_set1_flag
Definition headers.h:2147
u_char level_idc
Definition headers.h:2153
u_char constraint_set2_flag
Definition headers.h:2148
u_char constraint_set3_flag
Definition headers.h:2149
u_char constraint_set5_flag
Definition headers.h:2151
u_char avc_still_present
Definition headers.h:2154
u_char avc_24_hour_picture_flag
Definition headers.h:2155
u_char avc_compatible_flags
Definition headers.h:2152
u_char reserved
Definition headers.h:2157
u_char constraint_set0_flag
Definition headers.h:2146
u_char descriptor_length
Definition headers.h:2144
u_char descriptor_length
Definition headers.h:856
u_char reserved
Definition headers.h:860
u_char CA_PID_hi
Definition headers.h:861
u_char CA_type_lo
Definition headers.h:858
u_char CA_PID_lo
Definition headers.h:866
u_char CA_type_hi
Definition headers.h:857
u_char descriptor_tag
Definition headers.h:855
u_char descriptor_length
Definition headers.h:1591
u_char stream_content_ext
Definition headers.h:1179
u_char descriptor_length
Definition headers.h:1177
u_char descriptor_length
Definition headers.h:1223
u_char descriptor_tag
Definition headers.h:1222
u_char descriptor_tag
Definition headers.h:1536
u_char descriptor_length
Definition headers.h:1537
u_char fsize_hi
Definition headers.h:1803
u_char sample_rate_code
Definition headers.h:1800
u_char lfe_flag
Definition headers.h:1806
u_char descriptor_length
Definition headers.h:1798
u_char fsize_lo
Definition headers.h:1804
u_char nblks
Definition headers.h:1802
u_char extended_surround_flag
Definition headers.h:1807
u_char descriptor_tag
Definition headers.h:1797
u_char surround_mode
Definition headers.h:1805
u_char bit_rate_code
Definition headers.h:1801
Definition headers.h:2044
u_char parameter_length
Definition headers.h:2045
u_char descriptor_length
Definition headers.h:1838
u_char descriptor_tag_extension
Definition headers.h:1839
u_char descriptor_tag
Definition headers.h:844
u_char descriptor_length
Definition headers.h:845
u_char service_id_hi
Definition headers.h:1063
u_char original_network_id_lo
Definition headers.h:1062
u_char descriptor_tag
Definition headers.h:1057
u_char transport_stream_id_hi
Definition headers.h:1059
u_char original_network_id_hi
Definition headers.h:1061
u_char descriptor_length
Definition headers.h:1058
u_char linkage_type
Definition headers.h:1065
u_char service_id_lo
Definition headers.h:1064
u_char transport_stream_id_lo
Definition headers.h:1060
u_char descriptor_length
Definition headers.h:1197
u_char descriptor_tag
Definition headers.h:1196
u_char pil2
Definition headers.h:1549
u_char descriptor_tag
Definition headers.h:1545
u_char descriptor_length
Definition headers.h:1546
u_char pil0
Definition headers.h:1547
u_char pil1
Definition headers.h:1548
u_char format_identifier_lo_lo
Definition headers.h:2136
u_char format_identifier_hi_lo
Definition headers.h:2134
u_char format_identifier_hi_hi
Definition headers.h:2133
u_char format_identifier_lo_hi
Definition headers.h:2135
u_char new_transport_stream_id_hi
Definition headers.h:1457
u_char new_original_network_id_hi
Definition headers.h:1455
u_char new_original_network_id_lo
Definition headers.h:1456
u_char new_transport_stream_id_lo
Definition headers.h:1458
u_char descriptor_length
Definition headers.h:1029
u_char descriptor_tag
Definition headers.h:1028
u_char provider_name_length
Definition headers.h:1031
u_char service_type
Definition headers.h:1030
u_char descriptor_length
Definition headers.h:926
u_char descriptor_tag
Definition headers.h:925
u_char descriptor_length
Definition headers.h:1287
u_char descriptor_tag
Definition headers.h:1263
u_char descriptor_length
Definition headers.h:1264
u_char descriptor_tag
Definition headers.h:1672
u_char descriptor_length
Definition headers.h:1673
Definition headers.h:1989
u_char url_extension_length
Definition headers.h:1990
u_char descriptor_tag
Definition headers.h:1002
u_char descriptor_length
Definition headers.h:1003
u_char duration_s
Definition headers.h:527
u_char mjd_lo
Definition headers.h:521
u_char start_time_h
Definition headers.h:522
u_char running_status
Definition headers.h:529
u_char descriptors_loop_length_hi
Definition headers.h:531
u_char start_time_m
Definition headers.h:523
u_char duration_h
Definition headers.h:525
u_char free_ca_mode
Definition headers.h:530
u_char start_time_s
Definition headers.h:524
u_char descriptors_loop_length_lo
Definition headers.h:537
u_char event_id_hi
Definition headers.h:518
u_char mjd_hi
Definition headers.h:520
u_char event_id_lo
Definition headers.h:519
u_char duration_m
Definition headers.h:526
u_char segment_last_section_number
Definition headers.h:511
u_char section_number
Definition headers.h:505
u_char section_length_hi
Definition headers.h:487
u_char current_next_indicator
Definition headers.h:499
u_char last_section_number
Definition headers.h:506
u_char section_syntax_indicator
Definition headers.h:485
u_char version_number
Definition headers.h:498
u_char transport_stream_id_hi
Definition headers.h:507
u_char last_table_id
Definition headers.h:512
u_char transport_stream_id_lo
Definition headers.h:508
u_char section_length_lo
Definition headers.h:493
u_char table_id
Definition headers.h:483
u_char original_network_id_hi
Definition headers.h:509
u_char service_id_hi
Definition headers.h:494
u_char original_network_id_lo
Definition headers.h:510
u_char service_id_lo
Definition headers.h:495
u_char ancillary_page_id_hi
Definition headers.h:1340
u_char composition_page_id_lo
Definition headers.h:1339
u_char composition_page_id_hi
Definition headers.h:1338
u_char ancillary_page_id_lo
Definition headers.h:1341
u_char magazine_number
Definition headers.h:1274
Definition headers.h:1300
u_char time_of_change_time_m
Definition headers.h:1318
u_char country_code2
Definition headers.h:1302
u_char country_code1
Definition headers.h:1301
u_char time_of_change_time_s
Definition headers.h:1319
u_char time_of_change_mjd_hi
Definition headers.h:1315
u_char next_time_offset_m
Definition headers.h:1321
u_char local_time_offset_m
Definition headers.h:1314
u_char time_of_change_time_h
Definition headers.h:1317
u_char time_of_change_mjd_lo
Definition headers.h:1316
u_char country_code3
Definition headers.h:1303
u_char local_time_offset_polarity
Definition headers.h:1307
u_char next_time_offset_h
Definition headers.h:1320
u_char country_region_id
Definition headers.h:1305
u_char local_time_offset_h
Definition headers.h:1313
u_char transport_stream_id_lo
Definition headers.h:370
u_char transport_descriptors_length_hi
Definition headers.h:375
u_char original_network_id_lo
Definition headers.h:372
u_char original_network_id_hi
Definition headers.h:371
u_char transport_descriptors_length_lo
Definition headers.h:380
u_char transport_stream_id_hi
Definition headers.h:369
u_char content_nibble_level_1
Definition headers.h:1228
u_char content_nibble_level_2
Definition headers.h:1229
u_char transport_stream_loop_length_lo
Definition headers.h:357
u_char transport_stream_loop_length_hi
Definition headers.h:352
u_char section_length_hi
Definition headers.h:316
u_char section_syntax_indicator
Definition headers.h:314
u_char network_id_hi
Definition headers.h:323
u_char network_id_lo
Definition headers.h:324
u_char last_section_number
Definition headers.h:335
u_char section_length_lo
Definition headers.h:322
u_char network_descriptor_length_lo
Definition headers.h:343
u_char current_next_indicator
Definition headers.h:328
u_char table_id
Definition headers.h:312
u_char version_number
Definition headers.h:327
u_char network_descriptor_length_hi
Definition headers.h:338
u_char section_number
Definition headers.h:334
u_char program_number_lo
Definition headers.h:124
u_char network_pid_hi
Definition headers.h:127
u_char network_pid_lo
Definition headers.h:132
u_char program_number_hi
Definition headers.h:123
u_char section_number
Definition headers.h:116
u_char section_length_hi
Definition headers.h:97
u_char transport_stream_id_lo
Definition headers.h:106
u_char table_id
Definition headers.h:92
u_char dummy
Definition headers.h:95
u_char section_syntax_indicator
Definition headers.h:94
u_char last_section_number
Definition headers.h:117
u_char section_length_lo
Definition headers.h:104
u_char version_number
Definition headers.h:109
u_char current_next_indicator
Definition headers.h:110
u_char transport_stream_id_hi
Definition headers.h:105
u_char duration_m
Definition headers.h:810
u_char last_section_number
Definition headers.h:802
u_char descriptors_loop_length_hi
Definition headers.h:815
u_char table_id
Definition headers.h:777
u_char duration_s
Definition headers.h:811
u_char section_syntax_indicator
Definition headers.h:779
u_char section_length_hi
Definition headers.h:782
u_char contentId_lo_hi
Definition headers.h:806
u_char section_number
Definition headers.h:801
u_char section_length_lo
Definition headers.h:789
u_char dummy
Definition headers.h:780
u_char version_number
Definition headers.h:794
u_char duration_h
Definition headers.h:809
u_char descriptors_loop_length_lo
Definition headers.h:820
u_char current_next_indicator
Definition headers.h:795
u_char contentId_hi_hi
Definition headers.h:804
u_char contentId_lo_lo
Definition headers.h:807
u_char contentId_hi_lo
Definition headers.h:805
u_char elementary_PID_hi
Definition headers.h:241
u_char ES_info_length_lo
Definition headers.h:254
u_char elementary_PID_lo
Definition headers.h:246
u_char ES_info_length_hi
Definition headers.h:249
u_char stream_type
Definition headers.h:238
u_char table_id
Definition headers.h:190
u_char current_next_indicator
Definition headers.h:208
u_char dummy
Definition headers.h:193
u_char section_length_lo
Definition headers.h:202
u_char last_section_number
Definition headers.h:215
u_char program_number_lo
Definition headers.h:204
u_char PCR_PID_hi
Definition headers.h:218
u_char program_info_length_lo
Definition headers.h:231
u_char section_number
Definition headers.h:214
u_char PCR_PID_lo
Definition headers.h:223
u_char program_number_hi
Definition headers.h:203
u_char section_length_hi
Definition headers.h:195
u_char section_syntax_indicator
Definition headers.h:192
u_char program_info_length_hi
Definition headers.h:226
u_char version_number
Definition headers.h:207
u_char service_id_lo
Definition headers.h:570
u_char event_id_hi
Definition headers.h:571
u_char event_id_lo
Definition headers.h:572
u_char original_network_id_hi
Definition headers.h:567
u_char transport_stream_id_lo
Definition headers.h:566
u_char original_network_id_lo
Definition headers.h:568
u_char service_id_hi
Definition headers.h:569
u_char transport_stream_id_hi
Definition headers.h:565
u_char running_status
Definition headers.h:575
u_char table_id
Definition headers.h:551
u_char section_syntax_indicator
Definition headers.h:553
u_char section_length_hi
Definition headers.h:555
u_char section_length_lo
Definition headers.h:561
u_char running_status
Definition headers.h:455
u_char descriptors_loop_length_hi
Definition headers.h:457
u_char service_id_lo
Definition headers.h:450
u_char eit_present_following_flag
Definition headers.h:454
u_char service_id_hi
Definition headers.h:449
u_char free_ca_mode
Definition headers.h:456
u_char eit_schedule_flag
Definition headers.h:453
u_char descriptors_loop_length_lo
Definition headers.h:466
u_char transport_stream_id_hi
Definition headers.h:425
u_char original_network_id_hi
Definition headers.h:438
u_char table_id
Definition headers.h:414
u_char version_number
Definition headers.h:429
u_char transport_stream_id_lo
Definition headers.h:426
u_char section_syntax_indicator
Definition headers.h:416
u_char section_number
Definition headers.h:436
u_char section_length_lo
Definition headers.h:424
u_char current_next_indicator
Definition headers.h:430
u_char section_length_hi
Definition headers.h:418
u_char last_section_number
Definition headers.h:437
u_char original_network_id_lo
Definition headers.h:439
u_char section_length_lo
Definition headers.h:605
u_char section_syntax_indicator
Definition headers.h:597
u_char utc_time_m
Definition headers.h:609
u_char utc_time_h
Definition headers.h:608
u_char utc_mjd_hi
Definition headers.h:606
u_char section_length_hi
Definition headers.h:599
u_char utc_mjd_lo
Definition headers.h:607
u_char utc_time_s
Definition headers.h:610
u_char table_id
Definition headers.h:595
u_char table_id
Definition headers.h:625
u_char descriptors_loop_length_hi
Definition headers.h:643
u_char utc_time_m
Definition headers.h:639
u_char section_length_lo
Definition headers.h:635
u_char descriptors_loop_length_lo
Definition headers.h:648
u_char utc_time_h
Definition headers.h:638
u_char utc_mjd_hi
Definition headers.h:636
u_char section_length_hi
Definition headers.h:629
u_char utc_mjd_lo
Definition headers.h:637
u_char utc_time_s
Definition headers.h:640
u_char section_syntax_indicator
Definition headers.h:627
u_char section_number
Definition headers.h:295
u_char dummy
Definition headers.h:274
u_char table_id
Definition headers.h:271
u_char section_length_hi
Definition headers.h:276
u_char version_number
Definition headers.h:288
u_char section_syntax_indicator
Definition headers.h:273
u_char last_section_number
Definition headers.h:296
u_char current_next_indicator
Definition headers.h:289
u_char section_length_lo
Definition headers.h:283