vdr  2.0.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 2.5 2012/06/09 14:37:24 kls Exp $
14  * *
15  ***************************************************************************/
16 
17 #ifndef LIBSI_HEADERS_H
18 #define LIBSI_HEADERS_H
19 
20 #include <endian.h>
21 
22 namespace SI {
23 
24 typedef unsigned char u_char;
25 
26 struct SectionHeader {
28 #if BYTE_ORDER == BIG_ENDIAN
30  u_char :3;
32 #else
34  u_char :3;
36 #endif
38 };
39 
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 
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 
91 struct 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 
122 struct 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 
148 struct cat {
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 
189 struct pmt {
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
220  u_char PCR_PID_hi :5;
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 
237 struct 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 
270 struct tsdt {
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 
311 struct nit {
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 
349 struct 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 
362 struct nit_end {
363  long CRC;
364 };
365 
366 #define NIT_TS_LEN 6
367 
368 struct 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 
413 struct sdt {
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 
448 struct sdt_descr {
451 #if BYTE_ORDER == BIG_ENDIAN
452  u_char :6;
458 #else
461  u_char :6;
463  u_char free_ca_mode :1;
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 
482 struct eit {
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 
517 struct eit_event {
528 #if BYTE_ORDER == BIG_ENDIAN
532 #else
534  u_char free_ca_mode :1;
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 
550 struct rst {
552 #if BYTE_ORDER == BIG_ENDIAN
554  u_char :3;
556 #else
558  u_char :3;
560 #endif
562 };
563 
564 struct 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 
594 struct tdt {
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 
624 struct tot {
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 
693 struct ait {
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 
730 struct 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 
743 struct ait_end {
744  long CRC;
745 };
746 
747 #define AIT_APP_LEN 9
748 
749 struct 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 
776 struct pcit {
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
843 struct 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
854 struct 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;
952  u_char polarization :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
1075  u_char origin_type :1;
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
1183  u_char reserved :4;
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
1238  u_char user_nibble_2 :4;
1239  u_char user_nibble_1 :4;
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
1372  u_char code_rate_HP :3;
1373  u_char hierarchy :3;
1374  u_char constellation :2;
1375 #endif
1376 #if BYTE_ORDER == BIG_ENDIAN
1381 #else
1385  u_char code_rate_LP :3;
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
1482  u_char coding_type :2;
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
1535 struct descr_dsng {
1538  /* TBD */
1539 };
1540 
1541 /* 0x69 pdc_descriptor */
1542 
1543 #define DESCR_PDC_LEN 5
1544 struct descr_pdc {
1550 };
1551 
1552 /* 0x6A ac3_descriptor */
1553 
1554 #define DESCR_AC3_LEN 3
1555 struct descr_ac3 {
1558 #if BYTE_ORDER == BIG_ENDIAN
1564 #else
1565  u_char reserved :4;
1566  u_char asvc_flag :1;
1567  u_char mainid_flag :1;
1568  u_char bsid_flag :1;
1569  u_char ac3_type_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
1688  u_char crid_location :2;
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;
1715  u_char time_slicing :1;
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
1786  u_char mixinfoexists :1;
1787  u_char asvc_flag :1;
1788  u_char mainid_flag :1;
1789  u_char bsid_flag :1;
1791 #endif
1792 };
1793 
1794 /* 0x7B dts_descriptor */
1795 
1796 struct descr_dts {
1799 #if BYTE_ORDER == BIG_ENDIAN
1808 #else
1810  u_char lfe_flag :1;
1811  u_char surround_mode :6;
1812  u_char fsize_lo :8;
1813  u_char fsize_hi :6;
1814  u_char nblks :7;
1815  u_char bit_rate_code :6;
1817 #endif
1818 };
1819 
1820 /* 0x7C aac_descriptor */
1821 
1822 struct descr_aac {
1826 #if BYTE_ORDER == BIG_ENDIAN
1829 #else
1830  u_char reserved :7;
1831  u_char aac_type_flag :1;
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 /* MHP 0x00 application_descriptor */
1874 
1875 #define DESCR_APPLICATION_LEN 3
1876 
1881 };
1882 
1883 #define DESCR_APPLICATION_END_LEN 2
1884 
1886 #if BYTE_ORDER == BIG_ENDIAN
1890 #else
1891  u_char :5;
1892  u_char visibility :2;
1894 #endif
1896 /*now follow 8bit transport_protocol_label fields to the end */
1897 };
1898 
1899 #define APPLICATION_PROFILE_ENTRY_LEN 5
1900 
1907 };
1908 
1909 /* MHP 0x01 application_name_desriptor */
1910 
1911 #define DESCR_APPLICATION_NAME_LEN 2
1912 
1916 };
1917 
1918 #define APPLICATION_NAME_ENTRY_LEN 4
1919 
1925  /* application name string */
1926 };
1927 
1928 /* MHP 0x02 transport_protocol_descriptor */
1929 
1930 #define DESCR_TRANSPORT_PROTOCOL_LEN 5
1931 
1938  /* protocol_id-specific selector bytes follow */
1939 };
1940 
1943  /* URL extension string */
1944 };
1945 
1946 #define TRANSPORT_VIA_OC_LEN 1
1947 
1949 #if BYTE_ORDER == BIG_ENDIAN
1952 #else
1953  u_char :7;
1954  u_char remote :1;
1955 #endif
1956 };
1957 
1958 //if remote is true, transport_via_oc_remote_end_t follows,
1959 // else transport_via_oc_end_t.
1960 
1961 #define TRANSPORT_VIA_OC_REMOTE_END_LEN 7
1962 
1971 };
1972 
1973 #define TRANSPORT_VIA_OC_END_LEN 1
1974 
1977 };
1978 
1979 #define TRANSPORT_VIA_HTTP_LEN 1
1980 
1983 };
1984 
1985 /* 0x03 dvb_j_application_descriptor() */
1986 
1987 #define DESCR_DVBJ_APPLICATION_LEN 2
1988 
1992 };
1993 
1994 #define DESCR_DVBJ_APPLICATION_ENTRY_LEN 1
1995 
1998  /* parameter string */
1999 };
2000 
2001 /* 0x04 dvb_j_application_location_descriptor */
2002 
2003 #define DESCR_DVBJ_APPLICATION_LOCATION_LEN 3
2004 
2009  /* base directory string */
2010 };
2011 
2012 #define DESCR_DVBJ_APPLICATION_LOCATION_MID_LEN 1
2013 
2016 };
2017 
2018 /* 0x0B application_icons_descriptor */
2019 
2020 #define DESCR_APPLICATION_ICONS_LEN 3
2021 
2026  /* icon locator */
2027 };
2028 
2029 #define DESCR_APPLICATION_ICONS_END_LEN 2
2030 
2034 };
2035 
2036 /* 0x15 simple application location descrptor */
2037 
2038 #define DESCR_SIMPLE_APPLICATION_LOCATION_LEN 3
2039 
2043  /* initial_path_bytes */
2044 };
2045 
2046 // Private DVB Descriptor Premiere.de
2047 // 0xF2 Content Transmission Descriptor
2048 // http://dvbsnoop.sourceforge.net/examples/example-private-section.html
2049 
2050 #define DESCR_PREMIERE_CONTENT_TRANSMISSION_LEN 8
2051 
2061 };
2062 
2063 #define ITEM_PREMIERE_CONTENT_TRANSMISSION_DAY_LEN 3
2064 
2069 };
2070 
2071 #define ITEM_PREMIERE_CONTENT_TRANSMISSION_TIME_LEN 3
2072 
2077 };
2078 
2079 /* 0x05 registration_descriptor */
2080 
2081 #define DESCR_REGISTRATION_LEN 6
2089 };
2090 
2091 } //end of namespace
2092 
2093 #endif //LIBSI_HEADERS_H
2094