summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2012-01-11 11:38:00 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2012-01-11 11:38:00 +0100
commited118b079f0cc1f6c88c386ea3c2c9adf529b02e (patch)
tree2a4d45ac1d6dc6bd569c1be11dcd9e2b9b5989be
parent48de95f5d2ed662d724a765ec11aa0eb2ef7dfb9 (diff)
downloadvdr-ed118b079f0cc1f6c88c386ea3c2c9adf529b02e.tar.gz
vdr-ed118b079f0cc1f6c88c386ea3c2c9adf529b02e.tar.bz2
Added support for DVB-T2 to libsi
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY1
-rw-r--r--libsi/descriptor.c48
-rw-r--r--libsi/descriptor.h21
-rw-r--r--libsi/headers.h33
-rw-r--r--libsi/si.h15
6 files changed, 115 insertions, 4 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 08d651e8..c2b28b64 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1121,6 +1121,7 @@ Rolf Ahrenberg <rahrenbe@cc.hut.fi>
for adding file name and line number to LOG_ERROR_STR()
for replacing all calls to sleep() with cCondWait::SleepMs()
for fixing cDvbSubtitleConverter::SetOsdData()
+ for adding support for DVB-T2 to libsi
Ralf Klueber <ralf.klueber@vodafone.com>
for reporting a bug in cutting a recording if there is only a single editing mark
diff --git a/HISTORY b/HISTORY
index 8c53dafd..3e3a896f 100644
--- a/HISTORY
+++ b/HISTORY
@@ -6809,3 +6809,4 @@ Video Disk Recorder Revision History
- Fixed cDvbSubtitleConverter::SetOsdData() (thanks to Rolf Ahrenberg).
- Fixed cListBase::Move() in case From and To are equal (reported by Sundararaj
Reel).
+- Added support for DVB-T2 to libsi (thanks to Rolf Ahrenberg).
diff --git a/libsi/descriptor.c b/libsi/descriptor.c
index 5efa421c..07429b54 100644
--- a/libsi/descriptor.c
+++ b/libsi/descriptor.c
@@ -6,7 +6,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: descriptor.c 2.3 2011/12/10 15:47:15 kls Exp $
+ * $Id: descriptor.c 2.4 2012/01/11 11:35:17 kls Exp $
* *
***************************************************************************/
@@ -876,6 +876,52 @@ int ExtensionDescriptor::getExtensionDescriptorTag() const {
return s->descriptor_tag_extension;
}
+void T2DeliverySystemDescriptor::Parse() {
+ int offset=0;
+ data.setPointerAndOffset<const descr_t2_delivery_system>(s, offset);
+ extended_data_flag = s->descriptor_length > 0x04;
+}
+
+int T2DeliverySystemDescriptor::getExtendedDataFlag() const {
+ return extended_data_flag;
+}
+
+int T2DeliverySystemDescriptor::getExtensionDescriptorTag() const {
+ return s->descriptor_tag_extension;
+}
+
+int T2DeliverySystemDescriptor::getPlpId() const {
+ return s->plp_id;
+}
+
+int T2DeliverySystemDescriptor::getT2SystemId() const {
+ return HILO(s->t2_system_id);
+}
+
+int T2DeliverySystemDescriptor::getSisoMiso() const {
+ return extended_data_flag ? s->siso_miso : -1;
+}
+
+int T2DeliverySystemDescriptor::getBandwidth() const {
+ return extended_data_flag ? s->bandwidth : -1;
+}
+
+int T2DeliverySystemDescriptor::getGuardInterval() const {
+ return extended_data_flag ? s->guard_interval : -1;
+}
+
+int T2DeliverySystemDescriptor::getTransmissionMode() const {
+ return extended_data_flag ? s->transmission_mode : -1;
+}
+
+int T2DeliverySystemDescriptor::getOtherFrequencyFlag() const {
+ return extended_data_flag ? s->other_frequency_flag : -1;
+}
+
+int T2DeliverySystemDescriptor::getTfsFlag() const {
+ return extended_data_flag ? s->tfs_flag : -1;
+}
+
int PremiereContentTransmissionDescriptor::getOriginalNetworkId() const {
return HILO(s->original_network_id);
}
diff --git a/libsi/descriptor.h b/libsi/descriptor.h
index bce6c9e9..3025876e 100644
--- a/libsi/descriptor.h
+++ b/libsi/descriptor.h
@@ -6,7 +6,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: descriptor.h 2.3 2011/12/10 15:47:15 kls Exp $
+ * $Id: descriptor.h 2.4 2012/01/11 11:35:17 kls Exp $
* *
***************************************************************************/
@@ -538,6 +538,25 @@ private:
const descr_extension *s;
};
+class T2DeliverySystemDescriptor : public Descriptor {
+public:
+ int getExtendedDataFlag() const;
+ int getExtensionDescriptorTag() const;
+ int getPlpId() const;
+ int getT2SystemId() const;
+ int getSisoMiso() const;
+ int getBandwidth() const;
+ int getGuardInterval() const;
+ int getTransmissionMode() const;
+ int getOtherFrequencyFlag() const;
+ int getTfsFlag() const;
+protected:
+ virtual void Parse();
+private:
+ const descr_t2_delivery_system *s;
+ int extended_data_flag;
+};
+
// Private DVB Descriptor Premiere.de
// 0xF2 Content Transmission Descriptor
// http://dvbsnoop.sourceforge.net/examples/example-private-section.html
diff --git a/libsi/headers.h b/libsi/headers.h
index d94f053c..daea50e1 100644
--- a/libsi/headers.h
+++ b/libsi/headers.h
@@ -10,7 +10,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: headers.h 2.3 2011/12/10 15:47:15 kls Exp $
+ * $Id: headers.h 2.4 2012/01/11 11:35:17 kls Exp $
* *
***************************************************************************/
@@ -1839,6 +1839,37 @@ struct descr_extension {
u_char descriptor_tag_extension :8;
};
+/* extension 0x04 t2_delivery_system_descriptor */
+
+struct descr_t2_delivery_system {
+ u_char descriptor_tag :8;
+ u_char descriptor_length :8;
+ u_char descriptor_tag_extension :8;
+ u_char plp_id :8;
+ u_char t2_system_id_hi :8;
+ u_char t2_system_id_lo :8;
+#if BYTE_ORDER == BIG_ENDIAN
+ u_char siso_miso :2;
+ u_char bandwidth :4;
+ u_char reserved :2;
+ u_char guard_interval :3;
+ u_char transmission_mode :3;
+ u_char other_frequency_flag :1;
+ u_char tfs_flag :1;
+#else
+ u_char reserved :2;
+ u_char bandwidth :4;
+ u_char siso_miso :2;
+ u_char tfs_flag :1;
+ u_char other_frequency_flag :1;
+ u_char transmission_mode :3;
+ u_char guard_interval :3;
+#endif
+/* now follow cell_id, frequency_loop_length, centre_frequency,
+ subcell_info_loop_length, cell_id_extension, transposer_frequency
+ fields looping to the end */
+};
+
/* MHP 0x00 application_descriptor */
#define DESCR_APPLICATION_LEN 3
diff --git a/libsi/si.h b/libsi/si.h
index f5f0b634..4dccdd80 100644
--- a/libsi/si.h
+++ b/libsi/si.h
@@ -6,7 +6,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: si.h 2.4 2011/12/10 15:47:15 kls Exp $
+ * $Id: si.h 2.5 2012/01/11 11:35:17 kls Exp $
* *
***************************************************************************/
@@ -134,6 +134,19 @@ enum DescriptorTag {
DTSDescriptorTag = 0x7B,
AACDescriptorTag = 0x7C,
ExtensionDescriptorTag = 0x7F,
+ // Extension descriptors
+ ImageIconDescriptorTag = 0x00,
+ CpcmDeliverySignallingDescriptor = 0x01,
+ CPDescriptorTag = 0x02,
+ CPIdentifierDescriptorTag = 0x03,
+ T2DeliverySystemDescriptorTag = 0x04,
+ SHDeliverySystemDescriptorTag = 0x05,
+ SupplementaryAudioDescriptorTag = 0x06,
+ NetworkChangeNotifyDescriptorTag = 0x07,
+ MessageDescriptorTag = 0x08,
+ TargetRegionDescriptorTag = 0x09,
+ TargetRegionNameDescriptorTag = 0x0A,
+ ServiceRelocatedDescriptorTag = 0x0B,
// Defined by ETSI TS 102 812 (MHP)
// They once again start with 0x00 (see page 234, MHP specification)