summaryrefslogtreecommitdiff
path: root/libsi/descriptor.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2011-06-15 21:29:03 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2011-06-15 21:29:03 +0200
commitb2812b7e71b4b5ef038045f48a5697a4dd063192 (patch)
tree45c010b361471355f873974cb60960f64d7906d8 /libsi/descriptor.c
parent263dc295089a2accc385c87c23b177314d65acea (diff)
downloadvdr-b2812b7e71b4b5ef038045f48a5697a4dd063192.tar.gz
vdr-b2812b7e71b4b5ef038045f48a5697a4dd063192.tar.bz2
Added support for "content identifier descriptor" and "default authority descriptor" to 'libsi'
Diffstat (limited to 'libsi/descriptor.c')
-rw-r--r--libsi/descriptor.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/libsi/descriptor.c b/libsi/descriptor.c
index 59f636a3..06a58c0a 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.1 2010/11/01 15:24:31 kls Exp $
+ * $Id: descriptor.c 2.2 2011/06/15 21:26:00 kls Exp $
* *
***************************************************************************/
@@ -643,6 +643,33 @@ void ServiceIdentifierDescriptor::Parse() {
textualServiceIdentifier.setData(data+sizeof(descr_service_identifier), getLength()-sizeof(descr_service_identifier));
}
+void ContentIdentifierDescriptor::Parse() {
+ identifierLoop.setData(data+sizeof(descr_content_identifier), getLength()-sizeof(descr_content_identifier));
+}
+
+void ContentIdentifierDescriptor::Identifier::Parse() {
+ int offset=0;
+ data.setPointerAndOffset<const content_identifier_entry>(s, offset);
+ if (s->crid_location == 0) {
+ identifier.setData(data+(offset-1), s->crid_length);
+ }
+ else {
+ identifier.setData(data+(offset-1), 2);
+ }
+}
+
+int ContentIdentifierDescriptor::Identifier::getCridType() const {
+ return s->crid_type;
+}
+
+int ContentIdentifierDescriptor::Identifier::getCridLocation() const {
+ return s->crid_location;
+}
+
+void DefaultAuthorityDescriptor::Parse() {
+ DefaultAuthority.setData(data+sizeof(descr_default_authority), getLength()-sizeof(descr_default_authority));
+}
+
void MultilingualNameDescriptor::Parse() {
nameLoop.setData(data+sizeof(descr_multilingual_network_name), getLength()-sizeof(descr_multilingual_network_name));
}