summaryrefslogtreecommitdiff
path: root/libsi
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2010-11-01 15:47:59 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2010-11-01 15:47:59 +0100
commitcfb37a7edf8caafb0f07594b080837231ba9c575 (patch)
treed92e4c39377e735feec619205d1642730ac0ff62 /libsi
parent4f50c34824f0c717dd52e0ce32497b7f421c1c66 (diff)
downloadvdr-cfb37a7edf8caafb0f07594b080837231ba9c575.tar.gz
vdr-cfb37a7edf8caafb0f07594b080837231ba9c575.tar.bz2
Added support for "registration descriptor"
Diffstat (limited to 'libsi')
-rw-r--r--libsi/descriptor.c13
-rw-r--r--libsi/descriptor.h12
-rw-r--r--libsi/headers.h14
-rw-r--r--libsi/si.c6
-rw-r--r--libsi/util.h3
5 files changed, 42 insertions, 6 deletions
diff --git a/libsi/descriptor.c b/libsi/descriptor.c
index f3bb3442..59f636a3 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 1.22 2007/02/03 11:45:58 kls Exp $
+ * $Id: descriptor.c 2.1 2010/11/01 15:24:31 kls Exp $
* *
***************************************************************************/
@@ -1032,4 +1032,15 @@ void MHP_ApplicationIconsDescriptor::Parse() {
data.setPointerAndOffset<const descr_application_icons_descriptor_end>(s, offset);
}
+int RegistrationDescriptor::getFormatIdentifier() const {
+ return HILOHILO(s->format_identifier);
+}
+
+void RegistrationDescriptor::Parse() {
+ int offset=0;
+ data.setPointerAndOffset<const descr_registration>(s, offset);
+ if (checkSize(getLength()-offset))
+ privateData.assign(data.getData(offset), getLength()-offset);
+}
+
} //end of namespace
diff --git a/libsi/descriptor.h b/libsi/descriptor.h
index 161793e5..4f2e41b6 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 1.16 2007/02/03 11:45:58 kls Exp $
+ * $Id: descriptor.h 2.1 2010/11/01 15:24:32 kls Exp $
* *
***************************************************************************/
@@ -660,6 +660,16 @@ private:
const descr_application_icons_descriptor_end *s;
};
+class RegistrationDescriptor : public Descriptor {
+public:
+ int getFormatIdentifier() const;
+ CharArray privateData;
+protected:
+ virtual void Parse();
+private:
+ const descr_registration *s;
+};
+
} //end of namespace
#endif //LIBSI_TABLE_H
diff --git a/libsi/headers.h b/libsi/headers.h
index db1e261e..3ec35def 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 1.9 2007/02/03 11:45:58 kls Exp $
+ * $Id: headers.h 2.1 2010/11/01 15:24:32 kls Exp $
* *
***************************************************************************/
@@ -2006,6 +2006,18 @@ struct item_premiere_content_transmission_time {
u_char start_time_s :8;
};
+/* 0x05 registration_descriptor */
+
+#define DESCR_REGISTRATION_LEN 6
+struct descr_registration {
+ u_char descriptor_tag :8;
+ u_char descriptor_length :8;
+ u_char format_identifier_hi_hi :8;
+ u_char format_identifier_hi_lo :8;
+ u_char format_identifier_lo_hi :8;
+ u_char format_identifier_lo_lo :8;
+};
+
} //end of namespace
#endif //LIBSI_HEADERS_H
diff --git a/libsi/si.c b/libsi/si.c
index 0fd832d8..39911786 100644
--- a/libsi/si.c
+++ b/libsi/si.c
@@ -6,7 +6,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: si.c 2.2 2010/02/13 10:31:52 kls Exp $
+ * $Id: si.c 2.3 2010/11/01 15:24:32 kls Exp $
* *
***************************************************************************/
@@ -606,6 +606,9 @@ Descriptor *Descriptor::getDescriptor(CharArray da, DescriptorTagDomain domain,
case ExtensionDescriptorTag:
d=new ExtensionDescriptor();
break;
+ case RegistrationDescriptorTag:
+ d=new RegistrationDescriptor();
+ break;
//note that it is no problem to implement one
//of the unimplemented descriptors.
@@ -614,7 +617,6 @@ Descriptor *Descriptor::getDescriptor(CharArray da, DescriptorTagDomain domain,
case VideoStreamDescriptorTag:
case AudioStreamDescriptorTag:
case HierarchyDescriptorTag:
- case RegistrationDescriptorTag:
case DataStreamAlignmentDescriptorTag:
case TargetBackgroundGridDescriptorTag:
case VideoWindowDescriptorTag:
diff --git a/libsi/util.h b/libsi/util.h
index 48626723..e9134cd4 100644
--- a/libsi/util.h
+++ b/libsi/util.h
@@ -6,7 +6,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: util.h 2.1 2008/05/22 10:49:08 kls Exp $
+ * $Id: util.h 2.2 2010/11/01 15:24:32 kls Exp $
* *
***************************************************************************/
@@ -19,6 +19,7 @@
#include <time.h>
#define HILO(x) (x##_hi << 8 | x##_lo)
+#define HILOHILO(x) (x##_hi_hi << 24 | x##_hi_lo << 16 | x##_lo_hi << 8 | x##_lo_lo)
#define BCD_TIME_TO_SECONDS(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)))