summaryrefslogtreecommitdiff
path: root/libsi
diff options
context:
space:
mode:
Diffstat (limited to 'libsi')
-rw-r--r--libsi/descriptor.c29
-rw-r--r--libsi/descriptor.h24
-rw-r--r--libsi/headers.h13
3 files changed, 47 insertions, 19 deletions
diff --git a/libsi/descriptor.c b/libsi/descriptor.c
index 57a92488..1654a33b 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.20 2006/04/17 12:19:15 kls Exp $
+ * $Id: descriptor.c 1.21 2006/05/28 14:25:30 kls Exp $
* *
***************************************************************************/
@@ -806,21 +806,34 @@ int PremiereContentTransmissionDescriptor::getServiceId() const {
return HILO(s->service_id);
}
-int PremiereContentTransmissionDescriptor::getMJD() const {
+void PremiereContentTransmissionDescriptor::Parse() {
+ s=data.getData<const descr_premiere_content_transmission>();
+ startDayLoop.setData(data+sizeof(descr_premiere_content_transmission), getLength()-sizeof(descr_premiere_content_transmission));
+}
+
+int PremiereContentTransmissionDescriptor::StartDayEntry::getMJD() const {
return HILO(s->mjd);
}
-void PremiereContentTransmissionDescriptor::Parse() {
- s=data.getData<const descr_premiere_content_transmission>();
- startTimeLoop.setData(data+sizeof(descr_premiere_content_transmission), getLength()-sizeof(descr_premiere_content_transmission));
+int PremiereContentTransmissionDescriptor::StartDayEntry::getLoopLength() const {
+ return s->start_time_loop;
+}
+
+int PremiereContentTransmissionDescriptor::StartDayEntry::getLength() {
+ return sizeof(item_premiere_content_transmission_day)+getLoopLength();
+}
+
+void PremiereContentTransmissionDescriptor::StartDayEntry::Parse() {
+ s=data.getData<const item_premiere_content_transmission_day>();
+ startTimeLoop.setData(data+sizeof(item_premiere_content_transmission_day), getLoopLength());
}
-time_t PremiereContentTransmissionDescriptor::StartTimeEntry::getStartTime(int mjd) const {
+time_t PremiereContentTransmissionDescriptor::StartDayEntry::StartTimeEntry::getStartTime(int mjd) const {
return DVBTime::getTime(mjd >> 8, mjd & 0xff, s->start_time_h, s->start_time_m, s->start_time_s);
}
-void PremiereContentTransmissionDescriptor::StartTimeEntry::Parse() {
- s=data.getData<const item_premiere_content_transmission_reference>();
+void PremiereContentTransmissionDescriptor::StartDayEntry::StartTimeEntry::Parse() {
+ s=data.getData<const item_premiere_content_transmission_time>();
}
void ApplicationSignallingDescriptor::Parse() {
diff --git a/libsi/descriptor.h b/libsi/descriptor.h
index 338a1fd5..c0c884fd 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.14 2006/04/14 10:53:44 kls Exp $
+ * $Id: descriptor.h 1.15 2006/05/28 14:25:30 kls Exp $
* *
***************************************************************************/
@@ -490,20 +490,30 @@ private:
class PremiereContentTransmissionDescriptor : public Descriptor {
public:
- class StartTimeEntry : public LoopElement {
+ class StartDayEntry : public LoopElement {
public:
- virtual int getLength() { return sizeof(item_premiere_content_transmission_reference); }
- time_t getStartTime(int mjd) const; //UTC
+ class StartTimeEntry : public LoopElement {
+ public:
+ virtual int getLength() { return sizeof(item_premiere_content_transmission_time); }
+ time_t getStartTime(int mjd) const; //UTC
+ protected:
+ virtual void Parse();
+ private:
+ const item_premiere_content_transmission_time *s;
+ };
+ StructureLoop<StartTimeEntry> startTimeLoop;
+ virtual int getLength();
+ int getMJD() const;
+ int getLoopLength() const;
protected:
virtual void Parse();
private:
- const item_premiere_content_transmission_reference *s;
+ const item_premiere_content_transmission_day *s;
};
- StructureLoop<StartTimeEntry> startTimeLoop;
+ StructureLoop<StartDayEntry> startDayLoop;
int getOriginalNetworkId() const;
int getTransportStreamId() const;
int getServiceId() const;
- int getMJD() const;
protected:
virtual void Parse();
private:
diff --git a/libsi/headers.h b/libsi/headers.h
index a238ca67..afa3106d 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.6 2006/04/14 10:53:44 kls Exp $
+ * $Id: headers.h 1.7 2006/05/28 14:25:30 kls Exp $
* *
***************************************************************************/
@@ -1790,7 +1790,7 @@ struct descr_application_icons_descriptor_end {
// 0xF2 Content Transmission Descriptor
// http://dvbsnoop.sourceforge.net/examples/example-private-section.html
-#define DESCR_PREMIERE_CONTENT_TRANSMISSION_LEN 11
+#define DESCR_PREMIERE_CONTENT_TRANSMISSION_LEN 8
struct descr_premiere_content_transmission {
u_char descriptor_tag :8;
@@ -1801,14 +1801,19 @@ struct descr_premiere_content_transmission {
u_char original_network_id_lo :8;
u_char service_id_hi :8;
u_char service_id_lo :8;
+};
+
+#define ITEM_PREMIERE_CONTENT_TRANSMISSION_DAY_LEN 3
+
+struct item_premiere_content_transmission_day {
u_char mjd_hi :8;
u_char mjd_lo :8;
u_char start_time_loop :8;
};
-#define ITEM_PREMIERE_CONTENT_TRANSMISSION_LEN 3
+#define ITEM_PREMIERE_CONTENT_TRANSMISSION_TIME_LEN 3
-struct item_premiere_content_transmission_reference {
+struct item_premiere_content_transmission_time {
u_char start_time_h :8;
u_char start_time_m :8;
u_char start_time_s :8;