summaryrefslogtreecommitdiff
path: root/libsi
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2004-02-29 18:00:00 +0100
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2004-02-29 18:00:00 +0100
commit5a4eb3f1041b8a53826cebe570f9d201f3d35826 (patch)
tree4444f7bec812600713430e7f0570dfdd0bf9136e /libsi
parent3fc29659759abb10154b78f9e3568407e523e1fc (diff)
downloadvdr-patch-lnbsharing-5a4eb3f1041b8a53826cebe570f9d201f3d35826.tar.gz
vdr-patch-lnbsharing-5a4eb3f1041b8a53826cebe570f9d201f3d35826.tar.bz2
Version 1.3.5vdr-1.3.5
- Fixed reading the EPG preferred language parameter from 'setup.conf'. - Fixed switching to a visible programme in case the current channel has neither a video nor an audio PID. - Fixed editing channels (SID now range checked) and creating new channels (NID, TID and RID are now set to 0). - Fixed transponder handling to make it work with satellites that provide two transponders on the same frequency, with different polarization, like Hispasat at S30.0W (thanks to Thomas Bergwinkl for pointing this out). See man vdr(5) for details about the enhanced channel ID format. - Since there appears to be no general solution for the UPT error yet, a recording now initiates an "emergency exit" if the number of UPT errors during one recording exceeds 10 (suggested by Gregoire Favre). Since the UPT error doesn't happen on my system, this has not been explicitly tested. The "preliminary fix" for the UPT error in VDR/dvbdevice.c has been disabled by default, since it makes channel switching unpleasently slow. If you want to have that workaround back, you can uncomment the line //#define WAIT_FOR_LOCK_AFTER_TUNING 1 in VDR/dvbdevice.c. - Adapted the 'sky' plugin to use the actual channel IDs, and to fetch EPG data from www.bleb.org. - Limited automatic retuning to devices that actually provide the transponder (necessary for the 'sky' plugin). - Fixed handling receivers in the 'sky' plugin, so that a recording on the same channel won't interrupt an ongoing Transfer Mode. - Added subtable ID and TSDT handling to 'libsi' (thanks to Marcel Wiesweg). - Fixed some Russian OSD texts (thanks to Vyacheslav Dikonov). - Added the 'running status' to the EPG events. This is necessary for implementing the VPS function for recording. - Removed the obsolete 'present' and 'following' handling from the EPG data. - The EPG data is now always kept sorted chronologically in the internal data structures. This also means that any EPG data retrieved through the SVRDP command LSTE is guaranteed to be sorted by start time. - Now using the 'running status' in the channel display, so that a programme that has an end time that is before the current time, but is still running, will still be shown in the display (provided the broadcasters handle the 'running status' flag correctly). This also applies to programmes that have a start time that is in the future, but are already running. - Implemented an "EPG linger time", which can be set to have older EPG information still displayed in the "Schedule" menu (thanks to Jaakko Hyvätti). - Added PDCDescriptor handling to 'libsi'. - Implemented handling the VPS timestamps (aka "Programme Identification Label") for full VPS support for timers (provided the tv stations actually broadcast this information). The VPS time is displayed in the event info page if it exists and is different than the event's start time. - Extended the SVDRP command LSTE to allow limiting the listed data to a given channel, the present or following events, or events at a given time (thanks to Thomas Heiligenmann). - Fixed a typo in libsi/si.h (thanks to Stéphane Esté-Gracias). - Timers can now be set to use the VPS information to control recording a programme. The new setup options "Recording/Use VPS" and "Recording/VPS margin", as well as the "VPS" option in the individual timers, can be used to control this feature (see MANUAL for details). Note that this feature will certainly need a lot of testing before it can be called "safe"! - The "Schedule" and "What's on now/next?" menus now have an additional column which displays information on whether there is a timer defined for an event, whether an event has a VPS time that's different than its start time, and whether an event is currently running (see MANUAL under "The "Schedule" Menu" for details).
Diffstat (limited to 'libsi')
-rw-r--r--libsi/descriptor.c23
-rw-r--r--libsi/descriptor.h14
-rw-r--r--libsi/headers.h59
-rw-r--r--libsi/section.c18
-rw-r--r--libsi/section.h15
-rw-r--r--libsi/si.c14
-rw-r--r--libsi/si.h7
7 files changed, 137 insertions, 13 deletions
diff --git a/libsi/descriptor.c b/libsi/descriptor.c
index 55a6a9c..0b0019f 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.5 2004/01/24 14:52:41 kls Exp $
+ * $Id: descriptor.c 1.6 2004/02/22 11:11:36 kls Exp $
* *
***************************************************************************/
@@ -529,6 +529,27 @@ void ISO639LanguageDescriptor::Parse() {
languageCode[3]=0;
}
+void PDCDescriptor::Parse() {
+ unsigned int offset=0;
+ data.setPointerAndOffset<const descr_pdc>(s, offset);
+}
+
+int PDCDescriptor::getDay() const {
+ return ((s->pil0 & 0x0F) << 1) | ((s->pil1 & 0x80) >> 7);
+}
+
+int PDCDescriptor::getMonth() const {
+ return (s->pil1 >> 3) & 0x0F;
+}
+
+int PDCDescriptor::getHour() const {
+ return ((s->pil1 & 0x07) << 2) | ((s->pil2 & 0xC0) >> 6);
+}
+
+int PDCDescriptor::getMinute() const {
+ return s->pil2 & 0x3F;
+}
+
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 5541cc4..17c81eb 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.5 2004/01/24 14:52:05 kls Exp $
+ * $Id: descriptor.h 1.6 2004/02/22 10:16:47 kls Exp $
* *
***************************************************************************/
@@ -383,6 +383,18 @@ private:
const descr_iso_639_language *s;
};
+class PDCDescriptor : public Descriptor {
+public:
+ int getDay() const;
+ int getMonth() const;
+ int getHour() const;
+ int getMinute() const;
+protected:
+ virtual void Parse();
+private:
+ const descr_pdc *s;
+};
+
//a descriptor currently unimplemented in this library
class UnimplementedDescriptor : public Descriptor {
protected:
diff --git a/libsi/headers.h b/libsi/headers.h
index d5c1199..ff3e0f9 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.2 2003/12/13 10:43:26 kls Exp $
+ * $Id: headers.h 1.4 2004/02/22 11:12:46 kls Exp $
* *
***************************************************************************/
@@ -257,7 +257,48 @@ struct pmt_info {
/*
*
- * 4) Network Information Table (NIT):
+ * 4) Transport Stream Description Table (TSDT):
+ *
+ * - The TSDT carries a loop of descriptors that apply to
+ * the whole transport stream. The syntax and semantics
+ * of the TSDT are defined in newer versions of ISO/IEC 13818-1.
+ *
+ */
+
+#define TSDT_LEN 8
+
+struct tsdt {
+ u_char table_id :8;
+#if BYTE_ORDER == BIG_ENDIAN
+ u_char section_syntax_indicator :1;
+ u_char dummy :1; // has to be 0
+ u_char :2;
+ u_char section_length_hi :4;
+#else
+ u_char section_length_hi :4;
+ u_char :2;
+ u_char dummy :1; // has to be 0
+ u_char section_syntax_indicator :1;
+#endif
+ u_char section_length_lo :8;
+ u_char :8;
+ u_char :8;
+#if BYTE_ORDER == BIG_ENDIAN
+ u_char :2;
+ u_char version_number :5;
+ u_char current_next_indicator :1;
+#else
+ u_char current_next_indicator :1;
+ u_char version_number :5;
+ u_char :2;
+#endif
+ u_char section_number :8;
+ u_char last_section_number :8;
+};
+
+/*
+ *
+ * 5) Network Information Table (NIT):
*
* - the NIT is intended to provide information about the physical
* network. The syntax and semantics of the NIT are defined in
@@ -468,7 +509,7 @@ struct eit {
u_char original_network_id_hi :8;
u_char original_network_id_lo :8;
u_char segment_last_section_number :8;
- u_char segment_last_table_id :8;
+ u_char last_table_id :8;
};
#define EIT_EVENT_LEN 12
@@ -1416,11 +1457,19 @@ struct descr_dsng {
/* 0x69 pdc_descriptor */
-#define DESCR_PDC_LEN XX
+#define DESCR_PDC_LEN 5
struct descr_pdc {
u_char descriptor_tag :8;
u_char descriptor_length :8;
- /* TBD */
+#if BYTE_ORDER == BIG_ENDIAN
+ u_char pil2 :8;
+ u_char pil1 :8;
+ u_char pil0 :8;
+#else
+ u_char pil0 :8;
+ u_char pil1 :8;
+ u_char pil2 :8;
+#endif
};
/* 0x6A ac3_descriptor */
diff --git a/libsi/section.c b/libsi/section.c
index 0de2a57..2cac809 100644
--- a/libsi/section.c
+++ b/libsi/section.c
@@ -6,7 +6,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: section.c 1.2 2003/12/13 10:42:14 kls Exp $
+ * $Id: section.c 1.3 2004/02/20 13:44:59 kls Exp $
* *
***************************************************************************/
@@ -76,6 +76,14 @@ void PMT::Stream::Parse() {
streamDescriptors.setData(data+offset, HILO(s->ES_info_length));
}
+/*********************** TSDT ***********************/
+
+void TSDT::Parse() {
+ unsigned int offset=0;
+ data.setPointerAndOffset<const tsdt>(s, offset);
+ transportStreamDescriptors.setDataAndOffset(data+offset, getLength()-offset-4, offset);
+}
+
/*********************** NIT ***********************/
int NIT::getNetworkId() const {
@@ -161,6 +169,14 @@ int EIT::getOriginalNetworkId() const {
return HILO(s->original_network_id);
}
+int EIT::getSegmentLastSectionNumber() const {
+ return s->segment_last_section_number;
+}
+
+int EIT::getLastTableId() const {
+ return s->last_table_id;
+}
+
bool EIT::isPresentFollowing() const {
return getTableId() == TableIdEIT_presentFollowing || getTableId() == TableIdEIT_presentFollowing_other;
}
diff --git a/libsi/section.h b/libsi/section.h
index efca9bb..5b43f05 100644
--- a/libsi/section.h
+++ b/libsi/section.h
@@ -6,7 +6,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: section.h 1.2 2003/12/13 10:42:15 kls Exp $
+ * $Id: section.h 1.3 2004/02/20 13:45:45 kls Exp $
* *
***************************************************************************/
@@ -77,6 +77,17 @@ private:
const pmt *s;
};
+class TSDT : public NumberedSection {
+public:
+ TSDT(const unsigned char *data, bool doCopy=true) : NumberedSection(data, doCopy) {}
+ TSDT() {}
+ DescriptorLoop transportStreamDescriptors;
+protected:
+ virtual void Parse();
+private:
+ const tsdt *s;
+};
+
class NIT : public NumberedSection {
public:
NIT(const unsigned char *data, bool doCopy=true) : NumberedSection(data, doCopy) {}
@@ -166,6 +177,8 @@ public:
int getServiceId() const;
int getTransportStreamId() const;
int getOriginalNetworkId() const;
+ int getSegmentLastSectionNumber() const;
+ int getLastTableId() const;
StructureLoop<Event> eventLoop;
//true if table conveys present/following information, false if it conveys schedule information
diff --git a/libsi/si.c b/libsi/si.c
index 4264feb..ee64802 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.6 2004/01/23 14:27:45 kls Exp $
+ * $Id: si.c 1.8 2004/02/22 10:14:12 kls Exp $
* *
***************************************************************************/
@@ -61,6 +61,14 @@ bool CRCSection::CheckCRCAndParse() {
return true;
}
+int NumberedSection::getTableIdExtension() const {
+ return getTableIdExtension(data.getData());
+}
+
+int NumberedSection::getTableIdExtension(const unsigned char *d) {
+ return HILO(((const ExtendedSectionHeader *)d)->table_id_extension);
+}
+
bool NumberedSection::getCurrentNextIndicator() const {
return data.getData<ExtendedSectionHeader>()->current_next_indicator;
}
@@ -326,6 +334,9 @@ Descriptor *Descriptor::getDescriptor(CharArray da, DescriptorTagDomain domain)
case ISO639LanguageDescriptorTag:
d=new ISO639LanguageDescriptor();
break;
+ case PDCDescriptorTag:
+ d=new PDCDescriptor();
+ break;
//note that it is no problem to implement one
//of the unimplemented descriptors.
@@ -367,7 +378,6 @@ Descriptor *Descriptor::getDescriptor(CharArray da, DescriptorTagDomain domain)
case CaSystemDescriptorTag:
case AC3DescriptorTag:
case DSNGDescriptorTag:
- case PDCDescriptorTag:
case AncillaryDataDescriptorTag:
case AnnouncementSupportDescriptorTag:
case AdaptationFieldDataDescriptorTag:
diff --git a/libsi/si.h b/libsi/si.h
index 4666c2d..befff85 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.6 2004/01/12 16:19:11 kls Exp $
+ * $Id: si.h 1.8 2004/02/23 17:02:33 kls Exp $
* *
***************************************************************************/
@@ -36,7 +36,7 @@ enum TableId { TableIdPAT = 0x00, //program association section
TableIdEIT_schedule_last = 0x5F,
//range from 0x60 to 0x6F
TableIdEIT_schedule_Other_first = 0x60,
- TableIdEIT_schedule_Other_fast = 0x6F,
+ TableIdEIT_schedule_Other_last = 0x6F,
TableIdTDT = 0x70, //time date section
TableIdRST = 0x71, //running status section
TableIdST = 0x72, //stuffing section
@@ -216,11 +216,14 @@ class NumberedSection : public CRCSection {
public:
NumberedSection(const unsigned char *data, bool doCopy=true) : CRCSection(data, doCopy) {}
NumberedSection() {}
+ int getTableIdExtension() const;
bool getCurrentNextIndicator() const;
int getVersionNumber() const;
int getSectionNumber() const;
int getLastSectionNumber() const;
bool moreThanOneSection() const { return getLastSectionNumber()>0; }
+
+ static int getTableIdExtension(const unsigned char *d);
};
class VariableLengthPart : public Object {