summaryrefslogtreecommitdiff
path: root/libsi
diff options
context:
space:
mode:
Diffstat (limited to 'libsi')
-rw-r--r--libsi/descriptor.c24
-rw-r--r--libsi/descriptor.h15
-rw-r--r--libsi/si.c6
-rw-r--r--libsi/si.h18
4 files changed, 55 insertions, 8 deletions
diff --git a/libsi/descriptor.c b/libsi/descriptor.c
index 433d680..4f4ef34 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.2 2003/12/13 10:42:05 kls Exp $
+ * $Id: descriptor.c 1.3 2004/01/12 16:17:20 kls Exp $
* *
***************************************************************************/
@@ -492,6 +492,28 @@ void MultilingualServiceNameDescriptor::Name::Parse() {
name.setData(data+offset, mid->service_name_length);
}
+void LinkageDescriptor::Parse() {
+ unsigned int offset=0;
+ data.setPointerAndOffset<const descr_linkage>(s, offset);
+ privateData.assign(data.getData(offset), getLength()-offset);
+}
+
+int LinkageDescriptor::getTransportStreamId() const {
+ return HILO(s->transport_stream_id);
+}
+
+int LinkageDescriptor::getOriginalNetworkId() const {
+ return HILO(s->original_network_id);
+}
+
+int LinkageDescriptor::getServiceId() const {
+ return HILO(s->service_id);
+}
+
+LinkageType LinkageDescriptor::getLinkageType() const {
+ return (LinkageType)s->linkage_type;
+}
+
void ApplicationSignallingDescriptor::Parse() {
entryLoop.setData(data+sizeof(descr_application_signalling), getLength()-sizeof(descr_application_signalling));
}
diff --git a/libsi/descriptor.h b/libsi/descriptor.h
index 9abe1f0..3eb90fa 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.2 2003/12/13 10:42:08 kls Exp $
+ * $Id: descriptor.h 1.3 2004/01/12 16:17:47 kls Exp $
* *
***************************************************************************/
@@ -361,6 +361,19 @@ protected:
virtual void Parse();
};
+class LinkageDescriptor : public Descriptor {
+public:
+ int getTransportStreamId() const;
+ int getOriginalNetworkId() const;
+ int getServiceId() const;
+ LinkageType getLinkageType() const;
+ CharArray privateData;
+protected:
+ virtual void Parse();
+private:
+ const descr_linkage *s;
+};
+
//a descriptor currently unimplemented in this library
class UnimplementedDescriptor : public Descriptor {
protected:
diff --git a/libsi/si.c b/libsi/si.c
index ac2e26f..4342097 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 1.4 2004/01/05 11:04:17 kls Exp $
+ * $Id: si.c 1.5 2004/01/12 22:19:34 kls Exp $
* *
***************************************************************************/
@@ -320,6 +320,9 @@ Descriptor *Descriptor::getDescriptor(CharArray da, DescriptorTagDomain domain)
case ApplicationSignallingDescriptorTag:
d=new ApplicationSignallingDescriptor();
break;
+ case LinkageDescriptorTag:
+ d=new LinkageDescriptor();
+ break;
//note that it is no problem to implement one
//of the unimplemented descriptors.
@@ -348,7 +351,6 @@ Descriptor *Descriptor::getDescriptor(CharArray da, DescriptorTagDomain domain)
case VBITeletextDescriptorTag:
case CountryAvailabilityDescriptorTag:
case MocaicDescriptorTag:
- case LinkageDescriptorTag:
case TeletextDescriptorTag:
case TelephoneDescriptorTag:
case LocalTimeOffsetDescriptorTag:
diff --git a/libsi/si.h b/libsi/si.h
index d2ac417..4666c2d 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 1.5 2004/01/09 15:59:53 kls Exp $
+ * $Id: si.h 1.6 2004/01/12 16:19:11 kls Exp $
* *
***************************************************************************/
@@ -154,6 +154,18 @@ enum RunningStatus { RunningStatusUndefined = 0,
RunningStatusRunning = 4
};
+enum LinkageType { LinkageTypeInformationService = 0x01,
+ LinkageTypeEPGService = 0x02,
+ LinkageTypeCaReplacementService = 0x03,
+ LinkageTypeTSContainingCompleteNetworkBouquetSi = 0x04,
+ LinkageTypeServiceReplacementService = 0x05,
+ LinkageTypeDataBroadcastService = 0x06,
+ LinkageTypeRCSMap = 0x07,
+ LinkageTypeMobileHandover = 0x08,
+ LinkageTypeSystemSoftwareUpdateService = 0x09,
+ LinkageTypeTSContainingSsuBatOrNit = 0x0A
+ };
+
/* Some principles:
- Objects that return references to other objects contained in their data must make sure
that the returned objects have been parsed.
@@ -167,6 +179,7 @@ public:
Object(CharArray &d);
//can only be called once since data is immutable
void setData(const unsigned char*data, unsigned int size, bool doCopy=true);
+ CharArray getData() { return data; }
virtual int getLength() = 0;
protected:
CharArray data;
@@ -224,9 +237,6 @@ private:
class LoopElement : public Object {
};
-class SubStructure : public LoopElement {
-};
-
class Descriptor : public LoopElement {
public:
virtual int getLength();