summaryrefslogtreecommitdiff
path: root/libsi
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2006-04-17 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2006-04-17 18:00:00 +0200
commit293ed4027ed3c3c8fd6ef1e8bdd79bfe69193957 (patch)
tree6b0fc24aa178bef32e1c47f5f5ac3845fe439e3d /libsi
parent396d0ad36712d8c07d91b36283a14838900ca5a2 (diff)
downloadvdr-patch-lnbsharing-293ed4027ed3c3c8fd6ef1e8bdd79bfe69193957.tar.gz
vdr-patch-lnbsharing-293ed4027ed3c3c8fd6ef1e8bdd79bfe69193957.tar.bz2
Version 1.3.47vdr-1.3.47
- Updated the Finnish OSD texts (thanks to Rolf Ahrenberg). - Fixed a crash when setting the time transponder in the Setup menu, caused by the new 'noneString' in cMenuEditChanItem (reported by Thomas Günther). - Added NULL checks to some strdup() calls in menuitems.c (suggested by Darren Salt). - Removed the unnecessary 'value' member from cMenuEditItem. - Fixed the initial setting of the time transponder setup parameter (reported by Thomas Günther). - Fixed unnecessary Set() calls in cMenuEditIntItem::ProcessKey(). - Allowing a tolerance for symbol rate values that are off by one (thanks to Richard Lithvall). - Added VBITeletextDescriptorTag, TeletextDescriptorTag, LocalTimeOffsetDescriptorTag and PremiereContentTransmissionDescriptor to 'libsi' (thanks to Marco Schlüßler). - Using geteuid() to check whether VDR is running as user 'root' (suggested by Tobias Grimm). - Added a missing "Key$" in skincurses.c (reported by Darren Salt). - Reintroduced the log message "deleting plugin: ..." when shutting down VDR (upon request by Ville Skyttä, as in the initial patch from Christoph Haubrich). - Fixed the vdr.1 man page (a single DVB card can record and do live tv). - The preferred audio language is now automatically selected when starting replay. - Updated the Danish OSD texts (thanks to Mogens Elneff). - The new function cPlugin::Active() can be used by a plugin to indicate that it is still busy and the system should not shut down or restart (based on a patch from Sascha Volkenandt). See PLUGINS.html for details. - Fixed setting the 'Delta' parameter when calling the shutdown script with no active timer (reported by Helge Lenz). - In order to make sure that plugins are compiled with the same DVB driver header files as VDR itself, the definition of DVBDIR has been removed from the VDR Makefile. If you are using a driver version that has its header files at a location other than /usr/include/linux/dvb, you can define DVBDIR in the Make.config file (see also INSTALL). Note that if you already have a Make.config file of your own, you should add the lines ifdef DVBDIR INCLUDES += -I$(DVBDIR)/include endif to its end, as in the new Make.config.template. Any reference to DVBDIR should be removed from all plugins' Makefiles, like this: ------------------------------------------------------------ --- PLUGINS/src/hello/Makefile 2005/11/11 13:20:14 1.10 +++ PLUGINS/src/hello/Makefile 2006/04/15 11:58:46 1.11 @@ -20,7 +20,6 @@ ### The directory environment: -DVBDIR = ../../../../DVB VDRDIR = ../../.. LIBDIR = ../../lib TMPDIR = /tmp @@ -40,7 +39,7 @@ ### Includes and Defines (add further entries here): -INCLUDES += -I$(VDRDIR)/include -I$(DVBDIR)/include +INCLUDES += -I$(VDRDIR)/include DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' ------------------------------------------------------------ Thanks to Marco Schlüßler for pointing out this problem. - Implemented kNext and kPrev keys (based on a patch from Peter Juszack). See MANUAL for details. - Implemented kChanPrev (from a patch from Darren Salt). - The "Update channels" parameter in the "Setup/DVB" menu has been extended to allow updating only the PIDs (see MANUAL for details). When updating to this version of VDR, please verify that the setting is as you want it to be, because the values have been shifted. - The new APIVERSION (see config.h) now allows existing compiled plugins to be used with newer versions of VDR, as long as there have been no changes to the VDR header files since the last APIVERSION. Existing plugins' Makefiles should have all references to VDRVERSION changed to APIVERSION, like this: ------------------------------------------------------------ --- PLUGINS/src/hello/Makefile 2006/04/15 11:58:46 1.11 +++ PLUGINS/src/hello/Makefile 2006/04/16 09:03:50 1.12 @@ -28,9 +28,9 @@ -include $(VDRDIR)/Make.config -### The version number of VDR (taken from VDR's "config.h"): +### The version number of VDR's plugin API (taken from VDR's "config.h"): -VDRVERSION = $(shell grep 'define VDRVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g') +APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h) ### The name of the distribution archive: @@ -67,7 +67,7 @@ libvdr-$(PLUGIN).so: $(OBJS) $(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@ - @cp $@ $(LIBDIR)/$@.$(VDRVERSION) + @cp $@ $(LIBDIR)/$@.$(APIVERSION) dist: clean @-rm -rf $(TMPDIR)/$(ARCHIVE) ------------------------------------------------------------ - If a timer is newly created from within the "Schedule" menu, and its event is already running or has its start time within the next two minutes, it now goes directly into the "Edit timer" menu in order to allow the user to make further changes to timer parameters before the actual recording starts (inspired by Christian Wieninger's "epgsearch" plugin). - Added format check to syslog_with_tid(). - Updated the INSTALL file's section about non-VDR files in the video directory (since version 1.3.38 disk access is done in a separate thread, so the watchdog timer won't hit). - Changed the behaviour of the "Use small font" setup option to *always* use the small font if set to '2' - even if it would have been a fixed font (suggested by Ronny Kornexl). - No longer using characters 0x01 and 0x02 for mapping single quote and slash in recording names (thanks to Patrick Fischer for reporting that this was a problem with XML). The single quote is not mapped at all, and the slash is interchanged with the tilde. Existing recordings will be handled like before, so there is no need to actually rename them. - The cRemote::CallPlugin() function now has a boolean return value that tells the caller whether initiating the plugin call was successful (suggested by Reinhard Nissl). If it returns false, another plugin call is currently pending and the caller should try again later. This also means that the SVDRP command PLUG can now return an error code is the call fails. - The new function cPlugin::MainThreadHook() can be used by plugins to perform actions in the context of the main program thread. Use this function with great care and only of you absolutely have to! See also PLUGINS.html.
Diffstat (limited to 'libsi')
-rw-r--r--libsi/descriptor.c125
-rw-r--r--libsi/descriptor.h90
-rw-r--r--libsi/headers.h101
-rw-r--r--libsi/section.c18
-rw-r--r--libsi/section.h17
-rw-r--r--libsi/si.c41
-rw-r--r--libsi/si.h15
7 files changed, 390 insertions, 17 deletions
diff --git a/libsi/descriptor.c b/libsi/descriptor.c
index b84e2c4..57a9248 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.18 2006/02/25 10:06:05 kls Exp $
+ * $Id: descriptor.c 1.20 2006/04/17 12:19:15 kls Exp $
* *
***************************************************************************/
@@ -318,6 +318,31 @@ void ParentalRatingDescriptor::Rating::Parse() {
languageCode[3]=0;
}
+void TeletextDescriptor::Parse() {
+ //this descriptor is only a header and a loop
+ teletextLoop.setData(data+sizeof(descr_teletext), getLength()-sizeof(descr_teletext));
+}
+
+void TeletextDescriptor::Teletext::Parse() {
+ s=data.getData<const item_teletext>();
+ languageCode[0]=s->lang_code1;
+ languageCode[1]=s->lang_code2;
+ languageCode[2]=s->lang_code3;
+ languageCode[3]=0;
+}
+
+int TeletextDescriptor::Teletext::getTeletextType() const {
+ return s->type;
+}
+
+int TeletextDescriptor::Teletext::getTeletextMagazineNumber() const {
+ return s->magazine_number;
+}
+
+int TeletextDescriptor::Teletext::getTeletextPageNumber() const {
+ return s->page_number;
+}
+
int CaDescriptor::getCaType() const {
return HILO(s->CA_type);
}
@@ -536,6 +561,14 @@ void ComponentDescriptor::Parse() {
description.setData(data+offset, getLength()-offset);
}
+void PrivateDataSpecifierDescriptor::Parse() {
+ s=data.getData<const descr_private_data_specifier>();
+}
+
+int PrivateDataSpecifierDescriptor::getPrivateDataSpecifier() const {
+ return (HILO(s->private_data_specifier_hi) << 16) | HILO(s->private_data_specifier_lo);
+}
+
void SubtitlingDescriptor::Parse() {
subtitlingLoop.setData(data+sizeof(descr_subtitling), getLength()-sizeof(descr_subtitling));
}
@@ -633,11 +666,47 @@ void MultilingualServiceNameDescriptor::Name::Parse() {
name.setData(data+offset, mid->service_name_length);
}
+void LocalTimeOffsetDescriptor::Parse() {
+ localTimeOffsetLoop.setData(data+sizeof(descr_local_time_offset), getLength()-sizeof(descr_local_time_offset));
+}
+
+int LocalTimeOffsetDescriptor::LocalTimeOffset::getCountryId() const {
+ return s->country_region_id;
+}
+
+int LocalTimeOffsetDescriptor::LocalTimeOffset::getLocalTimeOffsetPolarity() const {
+ return s->local_time_offset_polarity;
+}
+
+int LocalTimeOffsetDescriptor::LocalTimeOffset::getLocalTimeOffset() const {
+ return (s->local_time_offset_h << 8) | s->local_time_offset_m;
+}
+
+time_t LocalTimeOffsetDescriptor::LocalTimeOffset::getTimeOfChange() const {
+ return DVBTime::getTime(s->time_of_change_mjd_hi, s->time_of_change_mjd_lo, s->time_of_change_time_h, s->time_of_change_time_m, s->time_of_change_time_s);
+}
+
+int LocalTimeOffsetDescriptor::LocalTimeOffset::getNextTimeOffset() const {
+ return (s->next_time_offset_h << 8) | s->next_time_offset_m;
+}
+
+void LocalTimeOffsetDescriptor::LocalTimeOffset::Parse() {
+ s=data.getData<const local_time_offset_entry>();
+ countryCode[0]=s->country_code1;
+ countryCode[1]=s->country_code2;
+ countryCode[2]=s->country_code3;
+ countryCode[3]=0;
+}
+
void LinkageDescriptor::Parse() {
int offset=0;
+ s1 = NULL;
data.setPointerAndOffset<const descr_linkage>(s, offset);
- if (checkSize(getLength()-offset))
+ if (checkSize(getLength()-offset)) {
+ if (getLinkageType() == LinkageTypeMobileHandover)
+ data.setPointerAndOffset<const descr_linkage_8>(s1, offset);
privateData.assign(data.getData(offset), getLength()-offset);
+ }
}
int LinkageDescriptor::getTransportStreamId() const {
@@ -656,9 +725,21 @@ LinkageType LinkageDescriptor::getLinkageType() const {
return (LinkageType)s->linkage_type;
}
+int LinkageDescriptor::getHandOverType() const {
+ return s1 == NULL ? 0 : s1->hand_over_type;
+}
+
+int LinkageDescriptor::getOriginType() const {
+ return s1 == NULL ? 0 : s1->origin_type;
+}
+
+int LinkageDescriptor::getId() const {
+ return s1 == NULL ? 0 : HILO(s1->id);
+}
+
void ISO639LanguageDescriptor::Parse() {
languageLoop.setData(data+sizeof(descr_iso_639_language), getLength()-sizeof(descr_iso_639_language));
-
+
//all this is for backwards compatibility only
Loop::Iterator it;
Language first;
@@ -704,6 +785,44 @@ int PDCDescriptor::getMinute() const {
return s->pil2 & 0x3F;
}
+void AncillaryDataDescriptor::Parse() {
+ int offset=0;
+ data.setPointerAndOffset<const descr_ancillary_data>(s, offset);
+}
+
+int AncillaryDataDescriptor::getAncillaryDataIdentifier() const {
+ return s->ancillary_data_identifier;
+}
+
+int PremiereContentTransmissionDescriptor::getOriginalNetworkId() const {
+ return HILO(s->original_network_id);
+}
+
+int PremiereContentTransmissionDescriptor::getTransportStreamId() const {
+ return HILO(s->transport_stream_id);
+}
+
+int PremiereContentTransmissionDescriptor::getServiceId() const {
+ return HILO(s->service_id);
+}
+
+int PremiereContentTransmissionDescriptor::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));
+}
+
+time_t PremiereContentTransmissionDescriptor::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 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 476da3f..338a1fd 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.13 2005/09/03 15:17:35 kls Exp $
+ * $Id: descriptor.h 1.14 2006/04/14 10:53:44 kls Exp $
* *
***************************************************************************/
@@ -121,6 +121,25 @@ protected:
virtual void Parse();
};
+class TeletextDescriptor : public Descriptor {
+public:
+ class Teletext : public LoopElement {
+ public:
+ char languageCode[4];
+ int getTeletextType() const;
+ int getTeletextMagazineNumber() const;
+ int getTeletextPageNumber() const;
+ virtual int getLength() { return sizeof(item_teletext); }
+ protected:
+ virtual void Parse();
+ private:
+ const item_teletext *s;
+ };
+ StructureLoop<Teletext> teletextLoop;
+protected:
+ virtual void Parse();
+};
+
class CaDescriptor : public Descriptor {
public:
int getCaType() const;
@@ -281,6 +300,15 @@ private:
const descr_component *s;
};
+class PrivateDataSpecifierDescriptor : public Descriptor {
+public:
+ int getPrivateDataSpecifier() const;
+protected:
+ virtual void Parse();
+private:
+ const descr_private_data_specifier *s;
+};
+
class SubtitlingDescriptor : public Descriptor {
public:
class Subtitling : public LoopElement {
@@ -377,17 +405,42 @@ protected:
virtual void Parse();
};
+class LocalTimeOffsetDescriptor : public Descriptor {
+public:
+ class LocalTimeOffset : public LoopElement {
+ public:
+ char countryCode[4];
+ virtual int getLength() { return sizeof(local_time_offset_entry); }
+ int getCountryId() const;
+ int getLocalTimeOffsetPolarity() const;
+ int getLocalTimeOffset() const;
+ time_t getTimeOfChange() const;
+ int getNextTimeOffset() const;
+ protected:
+ virtual void Parse();
+ private:
+ const local_time_offset_entry *s;
+ };
+ StructureLoop<LocalTimeOffset> localTimeOffsetLoop;
+protected:
+ virtual void Parse();
+};
+
class LinkageDescriptor : public Descriptor {
public:
int getTransportStreamId() const;
int getOriginalNetworkId() const;
int getServiceId() const;
LinkageType getLinkageType() const;
+ int getHandOverType() const;
+ int getOriginType() const;
+ int getId() const;
CharArray privateData;
protected:
virtual void Parse();
private:
const descr_linkage *s;
+ const descr_linkage_8 *s1;
};
class ISO639LanguageDescriptor : public Descriptor {
@@ -422,6 +475,41 @@ private:
const descr_pdc *s;
};
+class AncillaryDataDescriptor : public Descriptor {
+public:
+ int getAncillaryDataIdentifier() const;
+protected:
+ virtual void Parse();
+private:
+ const descr_ancillary_data *s;
+};
+
+// Private DVB Descriptor Premiere.de
+// 0xF2 Content Transmission Descriptor
+// http://dvbsnoop.sourceforge.net/examples/example-private-section.html
+
+class PremiereContentTransmissionDescriptor : public Descriptor {
+public:
+ class StartTimeEntry : public LoopElement {
+ public:
+ virtual int getLength() { return sizeof(item_premiere_content_transmission_reference); }
+ time_t getStartTime(int mjd) const; //UTC
+ protected:
+ virtual void Parse();
+ private:
+ const item_premiere_content_transmission_reference *s;
+ };
+ StructureLoop<StartTimeEntry> startTimeLoop;
+ int getOriginalNetworkId() const;
+ int getTransportStreamId() const;
+ int getServiceId() const;
+ int getMJD() const;
+protected:
+ virtual void Parse();
+private:
+ const descr_premiere_content_transmission *s;
+};
+
//a descriptor currently unimplemented in this library
class UnimplementedDescriptor : public Descriptor {
protected:
diff --git a/libsi/headers.h b/libsi/headers.h
index 69350cd..a238ca6 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.5 2005/09/03 15:18:16 kls Exp $
+ * $Id: headers.h 1.6 2006/04/14 10:53:44 kls Exp $
* *
***************************************************************************/
@@ -769,6 +769,57 @@ struct ait_app {
/* descriptors */
};
+/* Premiere Content Information Table */
+
+#define PCIT_LEN 17
+
+struct pcit {
+ 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;
+
+ u_char contentId_hi_hi :8;
+ u_char contentId_hi_lo :8;
+ u_char contentId_lo_hi :8;
+ u_char contentId_lo_lo :8;
+
+ u_char duration_h :8;
+ u_char duration_m :8;
+ u_char duration_s :8;
+
+#if BYTE_ORDER == BIG_ENDIAN
+ u_char :4;
+ u_char descriptors_loop_length_hi :4;
+#else
+ u_char descriptors_loop_length_hi :4;
+ u_char :4;
+#endif
+ u_char descriptors_loop_length_lo :8;
+};
+
/*
*
* The following describes the different descriptors that can be used within
@@ -1010,6 +1061,21 @@ struct descr_linkage {
u_char linkage_type :8;
};
+#define DESCR_LINKAGE_8_LEN 3
+struct descr_linkage_8 {
+#if BYTE_ORDER == BIG_ENDIAN
+ u_char hand_over_type :4;
+ u_char reserved :3;
+ u_char origin_type :1;
+#else
+ u_char origin_type :1;
+ u_char reserved :3;
+ u_char hand_over_type :4;
+#endif
+ u_char id_hi :8;
+ u_char id_lo :8;
+};
+
/* 0x4B nvod_reference_descriptor */
#define DESCR_NVOD_REFERENCE_LEN 2
@@ -1364,7 +1430,10 @@ struct descr_multilingual_component {
struct descr_private_data_specifier {
u_char descriptor_tag :8;
u_char descriptor_length :8;
- /* TBD */
+ u_char private_data_specifier_hi_hi :8;
+ u_char private_data_specifier_hi_lo :8;
+ u_char private_data_specifier_lo_hi :8;
+ u_char private_data_specifier_lo_lo :8;
};
/* 0x60 service_move_descriptor */
@@ -1717,6 +1786,34 @@ struct descr_application_icons_descriptor_end {
u_char icon_flags_lo :8;
};
+// Private DVB Descriptor Premiere.de
+// 0xF2 Content Transmission Descriptor
+// http://dvbsnoop.sourceforge.net/examples/example-private-section.html
+
+#define DESCR_PREMIERE_CONTENT_TRANSMISSION_LEN 11
+
+struct descr_premiere_content_transmission {
+ u_char descriptor_tag :8;
+ u_char descriptor_length :8;
+ u_char transport_stream_id_hi :8;
+ u_char transport_stream_id_lo :8;
+ u_char original_network_id_hi :8;
+ u_char original_network_id_lo :8;
+ u_char service_id_hi :8;
+ u_char service_id_lo :8;
+ u_char mjd_hi :8;
+ u_char mjd_lo :8;
+ u_char start_time_loop :8;
+};
+
+#define ITEM_PREMIERE_CONTENT_TRANSMISSION_LEN 3
+
+struct item_premiere_content_transmission_reference {
+ u_char start_time_h :8;
+ u_char start_time_m :8;
+ u_char start_time_s :8;
+};
+
} //end of namespace
#endif //LIBSI_HEADERS_H
diff --git a/libsi/section.c b/libsi/section.c
index 68af991..6dd43df 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.4 2006/02/18 10:38:20 kls Exp $
+ * $Id: section.c 1.5 2006/04/14 10:53:44 kls Exp $
* *
***************************************************************************/
@@ -341,4 +341,20 @@ void AIT::Application::Parse() {
applicationDescriptors.setData(data+offset, HILO(s->application_descriptors_length));
}
+/******************* PremiereCIT *******************/
+
+void PremiereCIT::Parse() {
+ int offset=0;
+ data.setPointerAndOffset<const pcit>(s, offset);
+ eventDescriptors.setData(data+offset, HILO(s->descriptors_loop_length));
+}
+
+int PremiereCIT::getContentId() const {
+ return (HILO(s->contentId_hi) << 16) | HILO(s->contentId_lo);
+}
+
+time_t PremiereCIT::getDuration() const {
+ return DVBTime::getDuration(s->duration_h, s->duration_m, s->duration_s);
+}
+
} //end of namespace
diff --git a/libsi/section.h b/libsi/section.h
index 5b43f05..29af7f4 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.3 2004/02/20 13:45:45 kls Exp $
+ * $Id: section.h 1.4 2006/04/14 10:53:44 kls Exp $
* *
***************************************************************************/
@@ -260,6 +260,21 @@ protected:
virtual void Parse();
};
+/* Premiere Content Information Table */
+
+class PremiereCIT : public NumberedSection {
+public:
+ PremiereCIT(const unsigned char *data, bool doCopy=true) : NumberedSection(data, doCopy) {}
+ PremiereCIT() {}
+ int getContentId() const;
+ time_t getDuration() const;
+ PCIT_DescriptorLoop eventDescriptors;
+protected:
+ virtual void Parse();
+private:
+ const pcit *s;
+};
+
} //end of namespace
#endif //LIBSI_TABLE_H
diff --git a/libsi/si.c b/libsi/si.c
index bbd3f1a..c7f23e8 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.15 2006/02/18 10:38:20 kls Exp $
+ * $Id: si.c 1.16 2006/04/14 10:53:44 kls Exp $
* *
***************************************************************************/
@@ -373,6 +373,9 @@ Descriptor *Descriptor::getDescriptor(CharArray da, DescriptorTagDomain domain,
case MultilingualComponentDescriptorTag:
d=new MultilingualComponentDescriptor();
break;
+ case PrivateDataSpecifierDescriptorTag:
+ d=new PrivateDataSpecifierDescriptor();
+ break;
case ServiceMoveDescriptorTag:
d=new ServiceMoveDescriptor();
break;
@@ -400,9 +403,16 @@ Descriptor *Descriptor::getDescriptor(CharArray da, DescriptorTagDomain domain,
case ParentalRatingDescriptorTag:
d=new ParentalRatingDescriptor();
break;
+ case TeletextDescriptorTag:
+ case VBITeletextDescriptorTag:
+ d=new TeletextDescriptor();
+ break;
case ApplicationSignallingDescriptorTag:
d=new ApplicationSignallingDescriptor();
break;
+ case LocalTimeOffsetDescriptorTag:
+ d=new LocalTimeOffsetDescriptor();
+ break;
case LinkageDescriptorTag:
d=new LinkageDescriptor();
break;
@@ -412,6 +422,9 @@ Descriptor *Descriptor::getDescriptor(CharArray da, DescriptorTagDomain domain,
case PDCDescriptorTag:
d=new PDCDescriptor();
break;
+ case AncillaryDataDescriptorTag:
+ d=new AncillaryDataDescriptor();
+ break;
//note that it is no problem to implement one
//of the unimplemented descriptors.
@@ -436,13 +449,9 @@ Descriptor *Descriptor::getDescriptor(CharArray da, DescriptorTagDomain domain,
//defined in ETSI EN 300 468
case StuffingDescriptorTag:
case VBIDataDescriptorTag:
- case VBITeletextDescriptorTag:
case CountryAvailabilityDescriptorTag:
case MocaicDescriptorTag:
- case TeletextDescriptorTag:
case TelephoneDescriptorTag:
- case LocalTimeOffsetDescriptorTag:
- case PrivateDataSpecifierDescriptorTag:
case CellListDescriptorTag:
case CellFrequencyLinkDescriptorTag:
case ServiceAvailabilityDescriptorTag:
@@ -453,7 +462,6 @@ Descriptor *Descriptor::getDescriptor(CharArray da, DescriptorTagDomain domain,
case CaSystemDescriptorTag:
case AC3DescriptorTag:
case DSNGDescriptorTag:
- case AncillaryDataDescriptorTag:
case AnnouncementSupportDescriptorTag:
case AdaptationFieldDataDescriptorTag:
case TransportStreamDescriptorTag:
@@ -500,6 +508,27 @@ Descriptor *Descriptor::getDescriptor(CharArray da, DescriptorTagDomain domain,
break;
}
break;
+ case PCIT:
+ switch ((DescriptorTag)da.getData<DescriptorHeader>()->descriptor_tag) {
+ case ContentDescriptorTag:
+ d=new ContentDescriptor();
+ break;
+ case ShortEventDescriptorTag:
+ d=new ShortEventDescriptor();
+ break;
+ case ExtendedEventDescriptorTag:
+ d=new ExtendedEventDescriptor();
+ break;
+ case PremiereContentTransmissionDescriptorTag:
+ d=new PremiereContentTransmissionDescriptor();
+ break;
+ default:
+ if (!returnUnimplemetedDescriptor)
+ return 0;
+ d=new UnimplementedDescriptor();
+ break;
+ }
+ break;
}
d->setData(da);
return d;
diff --git a/libsi/si.h b/libsi/si.h
index c8910ff..6922cdc 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.13 2006/02/18 10:38:20 kls Exp $
+ * $Id: si.h 1.14 2006/04/14 10:53:44 kls Exp $
* *
***************************************************************************/
@@ -43,7 +43,8 @@ enum TableId { TableIdPAT = 0x00, //program association section
TableIdTOT = 0x73, //time offset section
TableIdDIT = 0x7E, //discontinuity information section
TableIdSIT = 0x7F, //service information section
- TableIdAIT = 0x74 //application information section
+ TableIdAIT = 0x74, //application information section
+ TableIdPremiereCIT = 0xA0 //premiere content information section
};
@@ -139,13 +140,15 @@ enum DescriptorTag {
MHP_PrefetchDescriptorTag = 0x0C,
MHP_DelegatedApplicationDescriptorTag = 0x0E,
MHP_ApplicationStorageDescriptorTag = 0x10,
+ // Premiere private Descriptor Tags
+ PremiereContentTransmissionDescriptorTag = 0xF2,
//a descriptor currently unimplemented in this library
//the actual value 0xFF is "forbidden" according to the spec.
UnimplementedDescriptorTag = 0xFF
};
-enum DescriptorTagDomain { SI, MHP };
+enum DescriptorTagDomain { SI, MHP, PCIT };
enum RunningStatus { RunningStatusUndefined = 0,
RunningStatusNotRunning = 1,
@@ -411,6 +414,12 @@ public:
MHP_DescriptorLoop() { domain=MHP; }
};
+//Premiere Content Information Table
+class PCIT_DescriptorLoop : public DescriptorLoop {
+public:
+ PCIT_DescriptorLoop() { domain=PCIT; }
+};
+
//The content of the ExtendedEventDescriptor may be split over several
//descriptors if the text is longer than 256 bytes.
//The following classes provide base functionality to handle this case.