summaryrefslogtreecommitdiff
path: root/libdtv/libsi/include/si_tables.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2003-04-13 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2003-04-13 18:00:00 +0200
commit9f919801465f49be6b2118f54bd54df846e2f865 (patch)
tree721f42c9fd88ab33b47ad9b945247353bac9bc4c /libdtv/libsi/include/si_tables.h
parentb60eda5a8e8a9b9b96a90016fd27c03cd3f1ec8b (diff)
downloadvdr-patch-lnbsharing-9f919801465f49be6b2118f54bd54df846e2f865.tar.gz
vdr-patch-lnbsharing-9f919801465f49be6b2118f54bd54df846e2f865.tar.bz2
Version 1.1.27vdr-1.1.27
- The CAM is now accessed only if the current channel actually has a non-zero Ca value, and CAM access is completely suppressed during replay, which avoids problems in case the CAM is attached to the primary DVB device. - The "Left" and "Right" buttons now set the cursor to the first or last list item even if the list consist only of a single page, like, for instance, the Main menu (thanks to Oliver Endriss). - Made the log message "OSD window width must be a multiple of 4..." a debug message instead of an error message, so it can be avoided by using a log level less than 3. - Updated Greek language texts (thanks to Dimitrios Dimitrakos). - Fixed faulty behaviour of the "Mute" key in case the channel display is visible (thanks to Florian Bartels for reporting this one and Sascha Volkenandt for helping to fix it). - Modified LOF handling to allow for C-band reception (thanks to Malcolm Caldwell). - Added some missing cAudio handling calls (thanks to Werner Fink). - Replaced the 'for' loops in StripAudioPackets() with memset() calls (thanks to Werner Fink). - Further increased the timeout until an index file is considerd no longer to be written. - Fixed a crash in case the index file can't be accessed any more during replay (thanks to Stefan Huelswitt for reporting this one). - Fixed displaying messages in the status line in case they exceed the OSD width (thanks to Gerhard Steiner for reporting this one). - Avoiding high CPU load in case the connection to LIRC gets lost (thanks to Ludwig Nussel). - Fixed handling repeat function with LIRC (thanks to Ludwig Nussel). - Fixed handling min/max borders when entering integer values (thanks to Andy Grobb for reporting this one). - Implemented a "resume ID" which allows several users to each have their own resume.vdr files (thanks to Martin Hammerschmid). This parameter can be set in the "Setup/Replay" menu (see MANUAL for details). - Now using 'libdtv' version 0.0.5 (thanks to Rolf Hakenes for the new version and Stefan Huelswitt for adapting VDR to it). - If no device with an MPEG decoder can be found at startup, the first device is now used as primary device (just to have some device). - Adjusted some Premiere channels in 'channels.conf' (thanks to Thomas Koch). - Updated 'channels.conf.cable' (thanks to Stefan Hußfeldt). - The 'epg.data' file is now read after all plugins have been started (thanks to Sascha Volkenandt). - The LIRC remote control no longer tries to learn keys if it can't connect to the LIRC daemon (thanks to Ludwig Nussel for reporting this one). The same applies to the RCU remote control in case of errors during startup. - Fixed handling of Ca parameters with values <= MAXDEVICES, which don't indicate an actual encrypted channel (thanks to Stefan Huelswitt for reporting this one).
Diffstat (limited to 'libdtv/libsi/include/si_tables.h')
-rw-r--r--libdtv/libsi/include/si_tables.h156
1 files changed, 140 insertions, 16 deletions
diff --git a/libdtv/libsi/include/si_tables.h b/libdtv/libsi/include/si_tables.h
index dfda3bf..b7cfea2 100644
--- a/libdtv/libsi/include/si_tables.h
+++ b/libdtv/libsi/include/si_tables.h
@@ -5,11 +5,13 @@
/// ///
//////////////////////////////////////////////////////////////
-// $Revision: 1.3 $
-// $Date: 2001/10/07 10:24:46 $
+// $Revision: 1.4 $
+// $Date: 2003/02/04 18:45:36 $
// $Author: hakenes $
//
-// (C) 2001 Rolf Hakenes <hakenes@hippomi.de>, under the GNU GPL.
+// (C) 2001-03 Rolf Hakenes <hakenes@hippomi.de>, under the
+// GNU GPL with contribution of Oleg Assovski,
+// www.satmania.com
//
// libsi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -32,12 +34,22 @@
#define BcdTimeToSeconds(x) ((3600 * ((10*((x##_h & 0xF0)>>4)) + (x##_h & 0xF))) + \
(60 * ((10*((x##_m & 0xF0)>>4)) + (x##_m & 0xF))) + \
((10*((x##_s & 0xF0)>>4)) + (x##_s & 0xF)))
+#define BcdTimeToMinutes(x) ((60 * ((10*((x##_h & 0xF0)>>4)) + (x##_h & 0xF))) + \
+ (((10*((x##_m & 0xF0)>>4)) + (x##_m & 0xF))))
+#define BcdCharToInt(x) (10*((x & 0xF0)>>4) + (x & 0xF))
+#define CheckBcdChar(x) ((((x & 0xF0)>>4) <= 9) && \
+ ((x & 0x0F) <= 9))
+#define CheckBcdSignedChar(x) ((((x & 0xF0)>>4) >= 0) && (((x & 0xF0)>>4) <= 9) && \
+ ((x & 0x0F) >= 0) && ((x & 0x0F) <= 9))
#define TableHasMoreSections(x) (((pat_t *)(x))->last_section_number > ((pat_t *)(x))->section_number)
#define GetTableId(x) ((pat_t *)(x))->table_id
#define GetSectionNumber(x) ((pat_t *)(x))->section_number
#define GetLastSectionNumber(x) ((pat_t *)(x))->last_section_number
#define GetServiceId(x) (((eit_t *)(x))->service_id_hi << 8) | ((eit_t *)(x))->service_id_lo
+#define GetSegmentLastSectionNumber(x) ((eit_t *)(x))->segment_last_section_number
+#define GetLastTableId(x) ((eit_t *)(x))->segment_last_table_id
+#define GetSectionLength(x) HILO(((pat_t *)(x))->section_length)
/*
*
@@ -113,7 +125,37 @@ typedef struct {
* applicable.
*
*/
- /* TO BE DONE */
+#define CAT_LEN 8
+
+typedef struct {
+ u_char table_id :8;
+#if BYTE_ORDER == BIG_ENDIAN
+ u_char section_syntax_indicator :1;
+ u_char dummy :1; // has to be 0
+ u_char :2;
+ u_char section_length_hi :4;
+#else
+ u_char section_length_hi :4;
+ u_char :2;
+ u_char dummy :1; // has to be 0
+ u_char section_syntax_indicator :1;
+#endif
+ u_char section_length_lo :8;
+ u_char reserved_1 :8;
+ u_char reserved_2 :8;
+#if BYTE_ORDER == BIG_ENDIAN
+ u_char :2;
+ u_char version_number :5;
+ u_char current_next_indicator :1;
+#else
+ u_char current_next_indicator :1;
+ u_char version_number :5;
+ u_char :2;
+#endif
+ u_char section_number :8;
+ u_char last_section_number :8;
+} cat_t;
+
/*
*
* 3) Program Map Table (PMT):
@@ -297,7 +339,7 @@ typedef struct {
* bouquet.
*
*/
- /* TO BE DONE */
+/* SEE NIT (It has the same structure but has different allowed descriptors) */
/*
*
* 2) Service Description Table (SDT):
@@ -339,6 +381,9 @@ typedef struct {
u_char :8;
} sdt_t;
+#define GetSDTTransportStreamId(x) (HILO(((sdt_t *) x)->transport_stream_id))
+#define GetSDTOriginalNetworkId(x) (HILO(((sdt_t *) x)->original_network_id))
+
#define SDT_DESCR_LEN 5
typedef struct {
@@ -483,7 +528,36 @@ typedef struct {
* to the frequent updating of the time information.
*
*/
- /* TO BE DONE */
+#define TOT_LEN 10
+
+typedef struct {
+ u_char table_id :8;
+#if BYTE_ORDER == BIG_ENDIAN
+ u_char section_syntax_indicator :1;
+ u_char :3;
+ u_char section_length_hi :4;
+#else
+ u_char section_length_hi :4;
+ u_char :3;
+ u_char section_syntax_indicator :1;
+#endif
+ u_char section_length_lo :8;
+ u_char utc_mjd_hi :8;
+ u_char utc_mjd_lo :8;
+ u_char utc_time_h :8;
+ u_char utc_time_m :8;
+ u_char utc_time_s :8;
+#if BYTE_ORDER == BIG_ENDIAN
+ u_char :4;
+ u_char descriptors_loop_length_hi :4;
+#else
+ u_char descriptors_loop_length_hi :4;
+ u_char :4;
+#endif
+ u_char descriptors_loop_length_lo :8;
+} tot_t;
+
+
/*
*
* 7) Stuffing Table (ST):
@@ -545,6 +619,25 @@ typedef struct descr_gen_struct {
#define GetDescriptorLength(x) (((descr_gen_t *) x)->descriptor_length+DESCR_GEN_LEN)
+/* 0x09 ca_descriptor */
+
+#define DESCR_CA_LEN 6
+typedef struct descr_ca_struct {
+ u_char descriptor_tag :8;
+ u_char descriptor_length :8;
+ u_char CA_type_hi :8;
+ u_char CA_type_lo :8;
+#if BYTE_ORDER == BIG_ENDIAN
+ u_char reserved :3;
+ u_char CA_PID_hi :5;
+#else
+ u_char CA_PID_hi :5;
+ u_char reserved :3;
+#endif
+ u_char CA_PID_lo :8;
+} descr_ca_t;
+#define CastCaDescriptor(x) ((descr_ca_t *)(x))
+
/* 0x0A iso_639_language_descriptor */
#define DESCR_ISO_639_LANGUAGE_LEN 5
@@ -560,25 +653,31 @@ typedef struct descr_iso_639_language_struct {
/* 0x40 network_name_descriptor */
-#define DESCR_NETWORK_NAME_LEN XX
+#define DESCR_NETWORK_NAME_LEN 2
typedef struct descr_network_name_struct {
u_char descriptor_tag :8;
u_char descriptor_length :8;
- /* TBD */
} descr_network_name_t;
#define CastNetworkNameDescriptor(x) ((descr_network_name_t *)(x))
/* 0x41 service_list_descriptor */
-#define DESCR_SERVICE_LIST_LEN XX
+#define DESCR_SERVICE_LIST_LEN 2
typedef struct descr_service_list_struct {
u_char descriptor_tag :8;
u_char descriptor_length :8;
- /* TBD */
} descr_service_list_t;
#define CastServiceListDescriptor(x) ((descr_service_list_t *)(x))
+#define DESCR_SERVICE_LIST_LOOP_LEN 3
+typedef struct descr_service_list_loop_struct {
+ u_char service_id_hi :8;
+ u_char service_id_lo :8;
+ u_char service_type :8;
+} descr_service_list_loop_t;
+#define CastServiceListDescriptorLoop(x) ((descr_service_list_loop_t *)(x))
+
/* 0x42 stuffing_descriptor */
@@ -604,13 +703,13 @@ typedef struct descr_satellite_delivery_system_struct {
u_char orbital_position1 :8;
u_char orbital_position2 :8;
#if BYTE_ORDER == BIG_ENDIAN
- u_char modulation :5;
- u_char polarization :2;
- u_char west_east_flag :1;
-#else
u_char west_east_flag :1;
u_char polarization :2;
u_char modulation :5;
+#else
+ u_char modulation :5;
+ u_char polarization :2;
+ u_char west_east_flag :1;
#endif
u_char symbol_rate1 :8;
u_char symbol_rate2 :8;
@@ -964,14 +1063,39 @@ typedef struct descr_telephone_struct {
/* 0x58 local_time_offset_descriptor */
-#define DESCR_LOCAL_TIME_OFFSET_LEN XX
+#define DESCR_LOCAL_TIME_OFFSET_LEN 2
typedef struct descr_local_time_offset_struct {
u_char descriptor_tag :8;
u_char descriptor_length :8;
- /* TBD */
} descr_local_time_offset_t;
#define CastLocalTimeOffsetDescriptor(x) ((descr_local_time_offset_t *)(x))
+#define LOCAL_TIME_OFFSET_ENTRY_LEN 15
+typedef struct local_time_offset_entry_struct {
+ u_char country_code1 :8;
+ u_char country_code2 :8;
+ u_char country_code3 :8;
+#if BYTE_ORDER == BIG_ENDIAN
+ u_char country_region_id :6;
+ u_char :1;
+ u_char local_time_offset_polarity :1;
+#else
+ u_char local_time_offset_polarity :1;
+ u_char :1;
+ u_char country_region_id :6;
+#endif
+ u_char local_time_offset_h :8;
+ u_char local_time_offset_m :8;
+ u_char time_of_change_mjd_hi :8;
+ u_char time_of_change_mjd_lo :8;
+ u_char time_of_change_time_h :8;
+ u_char time_of_change_time_m :8;
+ u_char time_of_change_time_s :8;
+ u_char next_time_offset_h :8;
+ u_char next_time_offset_m :8;
+} local_time_offset_entry_t ;
+#define CastLocalTimeOffsetEntry(x) ((local_time_offset_entry_t *)(x))
+
/* 0x59 subtitling_descriptor */