diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2004-01-04 18:00:00 +0100 |
---|---|---|
committer | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2004-01-04 18:00:00 +0100 |
commit | 93a94b18b540fbcb9bcdaaea9abd26cdf23d6ee6 (patch) | |
tree | bede17e6cd329d36ec02bc53dfe567b95ec835a5 /libsi/descriptor.h | |
parent | c432905dd60630f906ac89f58592ad835a9063ef (diff) | |
download | vdr-patch-lnbsharing-93a94b18b540fbcb9bcdaaea9abd26cdf23d6ee6.tar.gz vdr-patch-lnbsharing-93a94b18b540fbcb9bcdaaea9abd26cdf23d6ee6.tar.bz2 |
Version 1.3.0vdr-1.3.0
- Changed thread handling to make it work with NPTL ("Native Posix Thread Library").
Thanks to Jon Burgess, Andreas Schultz, Werner Fink and Stefan Huelswitt.
- The cThread class now accepts a 'Description' parameter, which is used to log
the beginning and end of the thread, together with its process and thread id.
For descriptions that need additional parameters you can use the function
cThread::SetDescription(), which accepts 'printf()' like arguments.
Existing plugins that use threads should be changed to use this functionality
instead of explicit 'dsyslog()' calls inside their Action() function in order
to support logging the thread ids.
- Added "Slovak Link" and "Czech Link" to 'ca.conf' (thanks to Emil Petersky).
However, 'ca.conf' is now pretty much obsolete due to the automatic CA handling.
- Mutexes are now created with PTHREAD_MUTEX_ERRORCHECK_NP, which makes the
'lockingTid' stuff obsolete (thanks to Stefan Huelswitt).
- Changed font handling to allow language specific character sets.
- Adopted the small font character set from the "Elchi" patch (originally
provided by Alessio Sangalli).
- Greek language texts now use iso8859-7 character set (thanks to Dimitrios
Dimitrakos).
- Rearranged section data handling, so that the actual data handling can be done
separately, even from within plugins.
- The EPG data structures have been moved from eit.[hc] to epg.[hc] and have been
adapted to the general VDR coding style. Plugins that use these data structures
may need to change some function names (which should be obvious).
The name 'subtitle' has been changed to 'shortText' to avoid clashes with actual
subtitles that are part of a movie. The name 'extendedDescription' has been
shortened to 'description'.
- Replaced 'libdtv' with 'libsi' (thanks to Marcel Wiesweg), which is thread
safe and can be used by multiple section filters simultaneously.
- Added 'cRwLock' to 'thread.[hc]'. Note that all plugin Makefiles need to
define _GNU_SOURCE for this to work (see the example plugin Makefiles and
'newplugin').
- Fixed a problem with crc32 in SI handling on 64bit systems (thanks to Pedro
Miguel Sequeira de Justo Teixeira for reporting this one).
- Fixed an alignment problem in CAM access on 64bit systems (thanks to Pedro
Miguel Sequeira de Justo Teixeira for reporting this one).
- Added 'StreamType' setting to CAM communication, which is important for
Aston/SECA CAMs (thanks to Antonino Sergi).
- Now the CA descriptors are sent to the CAM in the 'program' or 'ES level'
sections, depending on where they are found in the PMT (thanks to Hans-Peter
Raschke for reporting this one). This should make SkyCrypt CAMs work.
- Now using the 'version number' of EPG events to avoid unnecessary work.
- Channel data is now automatically derived from the DVB data stream (inspired
by the 'autopid' patch from Andreas Schultz).
- The current channel is now automatically re-tuned if the PIDs or other settings
change. If a recording is going on on a channel that has a change in its
settings, the recording will be stopped and immediately restarted to use the
new channel settings.
- EPG events now use the complete channel ID with NID, TID and SID.
- Channel names in 'channels.conf' can now have a short form, as provided
by some tv stations (see man vdr(5)). Currently channels that provide short
names in addition to long ones are listed in the OSD as "short,long name",
as in "RTL,RTL Television". The short names will be used explicitly later.
- The Ca parameter in 'channels.conf' has been extended and now contains all the
CA system ids for the given channel. When switching to a channel VDR now tests
for a device that provides one of these CA system ids. The devices automatically
get their supported ids from the CI handler.
- The values in 'ca.conf' are currently without any real meaning. Whether or not
a channel with conditional access can be received is now determined automatically
by evaluating its CA descriptors and comparing them to the CA system ids
provided by the installed CAM. Only the special values 1-16 are used to assign
a channel to a particular device.
- Increased the maximum number of possible OSD colors to 256.
- Limited the line length in the EPG bugfix report, which appears to fix a buffer
overflow that caused a crash when cleaning up the EPG data (at 05:00 in the
morning).
Diffstat (limited to 'libsi/descriptor.h')
-rw-r--r-- | libsi/descriptor.h | 477 |
1 files changed, 477 insertions, 0 deletions
diff --git a/libsi/descriptor.h b/libsi/descriptor.h new file mode 100644 index 0000000..9abe1f0 --- /dev/null +++ b/libsi/descriptor.h @@ -0,0 +1,477 @@ +/*************************************************************************** + * Copyright (c) 2003 by Marcel Wiesweg * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * 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 $ + * * + ***************************************************************************/ + +#ifndef LIBSI_DESCRIPTOR_H +#define LIBSI_DESCRIPTOR_H + +#include "si.h" +#include "headers.h" + +namespace SI { + +class ShortEventDescriptor : public Descriptor { +public: + char languageCode[3]; + String name; //name of the event + String text; //short description +protected: + virtual void Parse(); +}; + +class ExtendedEventDescriptor : public GroupDescriptor { +public: + class Item : public LoopElement { + public: + virtual int getLength() { return sizeof(item_extended_event)+sizeof(item_extended_event_mid)+item.getLength()+itemDescription.getLength(); } + String item; + String itemDescription; + protected: + virtual void Parse(); + }; + char languageCode[3]; + int getDescriptorNumber(); + int getLastDescriptorNumber(); + StructureLoop<Item> itemLoop; + String text; +protected: + virtual void Parse(); +private: + const descr_extended_event *s; +}; + +class ExtendedEventDescriptors : public DescriptorGroup { +public: + //don't use + int getTextLength(); + //really fast + int getMaximumTextLength(); + //same semantics as with SI::String + char *getText(); + //buffer must at least be getTextLength(), getMaximumTextLength() is a good choice + char *getText(char *buffer); +}; + +class TimeShiftedEventDescriptor : public Descriptor { +public: + int getReferenceServiceId() const; + int getReferenceEventId() const; +protected: + virtual void Parse(); +private: + const descr_time_shifted_event *s; +}; + +class ContentDescriptor : public Descriptor { +public: + class Nibble : public LoopElement { + public: + virtual int getLength() { return sizeof(nibble_content); } + int getContentNibbleLevel1() const; + int getContentNibbleLevel2() const; + int getUserNibble1() const; + int getUserNibble2() const; + protected: + virtual void Parse(); + private: + const nibble_content *s; + }; + StructureLoop<Nibble> nibbleLoop; +protected: + virtual void Parse(); +}; + +class ParentalRatingDescriptor : public Descriptor { +public: + class Rating : public LoopElement { + public: + char languageCode[3]; + int getRating() const; + virtual int getLength() { return sizeof(parental_rating); } + protected: + virtual void Parse(); + private: + const parental_rating *s; + }; + StructureLoop<Rating> ratingLoop; +protected: + virtual void Parse(); +}; + +class CaDescriptor : public Descriptor { +public: + int getCaType() const; + int getCaPid() const; + CharArray privateData; +protected: + virtual void Parse(); +private: + const descr_ca *s; +}; + +class StreamIdentifierDescriptor : public Descriptor { +public: + int getComponentTag() const; +protected: + virtual void Parse(); +private: + const descr_stream_identifier *s; +}; + +class NetworkNameDescriptor : public Descriptor { +public: + String name; +protected: + virtual void Parse(); +}; + +class CaIdentifierDescriptor : public Descriptor { +public: + TypeLoop<SixteenBit> identifiers; +protected: + virtual void Parse(); +}; + +class CarouselIdentifierDescriptor : public Descriptor { +public: + int getCarouselId() const; + int getFormatId() const; +protected: + virtual void Parse(); +private: + const descr_carousel_identifier *s; +}; + +class BouquetNameDescriptor : public NetworkNameDescriptor { +}; + +class ServiceListDescriptor : public Descriptor { +public: + class Service : public LoopElement { + public: + int getServiceId() const; + int getServiceType() const; + virtual int getLength() { return sizeof(descr_service_list_loop); } + protected: + virtual void Parse(); + private: + const descr_service_list_loop *s; + }; + StructureLoop<Service> serviceLoop; +protected: + virtual void Parse(); +}; + +class SatelliteDeliverySystemDescriptor : public Descriptor { +public: + int getFrequency() const; + int getOrbitalPosition() const; + int getWestEastFlag() const; + int getPolarization() const; + int getModulation() const; + int getSymbolRate() const; + int getFecInner() const; +protected: + virtual void Parse(); +private: + const descr_satellite_delivery_system *s; +}; + +class CableDeliverySystemDescriptor : public Descriptor { +public: + int getFrequency() const; + int getFecOuter() const; + int getModulation() const; + int getSymbolRate() const; + int getFecInner() const; +protected: + virtual void Parse(); +private: + const descr_cable_delivery_system *s; +}; + +class TerrestrialDeliverySystemDescriptor : public Descriptor { +public: + int getFrequency() const; + int getBandwidth() const; + int getConstellation() const; + int getHierarchy() const; + int getCodeRateHP() const; + int getCodeRateLP() const; + int getGuardInterval() const; + int getTransmissionMode() const; + bool getOtherFrequency() const; +protected: + virtual void Parse(); +private: + const descr_terrestrial_delivery *s; +}; + +class ServiceDescriptor : public Descriptor { +public: + int getServiceType() const; + String serviceName; + String providerName; +protected: + virtual void Parse(); +private: + const descr_service *s; +}; + +class NVODReferenceDescriptor : public Descriptor { +public: + class Service : public LoopElement { + public: + int getTransportStream() const; + int getOriginalNetworkId() const; + int getServiceId() const; + virtual int getLength() { return sizeof(item_nvod_reference); } + protected: + virtual void Parse(); + private: + const item_nvod_reference *s; + }; + StructureLoop<Service> serviceLoop; +protected: + virtual void Parse(); +}; + +class TimeShiftedServiceDescriptor : public Descriptor { +public: + int getReferenceServiceId() const; +protected: + virtual void Parse(); +private: + const descr_time_shifted_service *s; +}; + +class ComponentDescriptor : public Descriptor { +public: + int getStreamContent() const; + int getComponentType() const; + int getComponentTag() const; + char languageCode[3]; + String description; +protected: + virtual void Parse(); +private: + const descr_component *s; +}; + +class SubtitlingDescriptor : public Descriptor { +public: + class Subtitling : public Descriptor { + public: + int getSubtitlingType() const; + int getCompositionPageId() const; + int getAncillaryPageId() const; + virtual int getLength() { return sizeof(item_nvod_reference); } + protected: + virtual void Parse(); + private: + const item_subtitling *s; + }; + StructureLoop<Subtitling> subtitlingLoop; +protected: + virtual void Parse(); +}; + +class ServiceMoveDescriptor : public Descriptor { +public: + int getNewOriginalNetworkId() const; + int getNewTransportStreamId() const; + int getNewServiceId() const; +protected: + virtual void Parse(); +private: + const descr_service_move *s; +}; + +class FrequencyListDescriptor : public Descriptor { +public: + int getCodingType() const; + TypeLoop<ThirtyTwoBit> frequencies; +protected: + virtual void Parse(); +private: + const descr_frequency_list *s; +}; + +class ServiceIdentifierDescriptor : public Descriptor { +public: + String textualServiceIdentifier; +protected: + virtual void Parse(); +}; + +//abstract base class +class MultilingualNameDescriptor : public Descriptor { +public: + class Name : public LoopElement { + public: + char languageCode[3]; + String name; + virtual int getLength() { return sizeof(entry_multilingual_name)+name.getLength(); } + protected: + virtual void Parse(); + }; + StructureLoop<Name> nameLoop; +protected: + virtual void Parse(); +}; + +class MultilingualNetworkNameDescriptor : public MultilingualNameDescriptor { + //inherits nameLoop from MultilingualNameDescriptor +}; + +class MultilingualBouquetNameDescriptor : public MultilingualNameDescriptor { + //inherits nameLoop from MultilingualNameDescriptor +}; + +class MultilingualComponentDescriptor : public MultilingualNameDescriptor { +public: + int getComponentTag() const; + //inherits nameLoop from MultilingualNameDescriptor +protected: + virtual void Parse(); +private: + const descr_multilingual_component *s; +}; + +class MultilingualServiceNameDescriptor : public Descriptor { +public: + class Name : public MultilingualNameDescriptor::Name { + public: + virtual int getLength() { return sizeof(entry_multilingual_name)+providerName.getLength()+sizeof(entry_multilingual_service_name_mid)+name.getLength(); } + String providerName; + //inherits name, meaning: service name; + protected: + virtual void Parse(); + }; + StructureLoop<Name> nameLoop; +protected: + virtual void Parse(); +}; + +//a descriptor currently unimplemented in this library +class UnimplementedDescriptor : public Descriptor { +protected: + virtual void Parse() {} +}; + +class ApplicationSignallingDescriptor : public Descriptor { +public: + class ApplicationEntryDescriptor : public LoopElement { + public: + virtual int getLength() { return sizeof(application_signalling_entry); } + int getApplicationType() const; + int getAITVersionNumber() const; + protected: + virtual void Parse(); + private: + const application_signalling_entry *s; + }; + StructureLoop<ApplicationEntryDescriptor> entryLoop; +protected: + virtual void Parse(); +}; + +class MHP_ApplicationDescriptor : public Descriptor { +public: + class Profile : public LoopElement { + public: + virtual int getLength() { return sizeof(application_profile_entry); } + int getApplicationProfile() const; + int getVersionMajor() const; + int getVersionMinor() const; + int getVersionMicro() const; + private: + const application_profile_entry *s; + protected: + virtual void Parse(); + }; + StructureLoop<Profile> profileLoop; + bool isServiceBound() const; + int getVisibility() const; + int getApplicationPriority() const; + TypeLoop<EightBit> transportProtocolLabels; +private: + const descr_application_end *s; +protected: + virtual void Parse(); +}; + +class MHP_ApplicationNameDescriptor : public Descriptor { +public: + class NameEntry : public LoopElement { + public: + virtual int getLength() { return sizeof(descr_application_name_entry)+name.getLength(); } + char languageCode[3]; + String name; + protected: + virtual void Parse(); + }; + StructureLoop<NameEntry> nameLoop; +protected: + virtual void Parse(); +}; + +class MHP_TransportProtocolDescriptor : public Descriptor { +public: + enum Protocol { ObjectCarousel = 0x01, IPviaDVB = 0x02, HTTPoverInteractionChannel = 0x03 }; + int getProtocolId() const; + int getProtocolLabel() const; + bool isRemote() const; + int getComponentTag() const; +protected: + virtual void Parse(); +private: + const descr_transport_protocol *s; + bool remote; + int componentTag; +}; + +class MHP_DVBJApplicationDescriptor : public Descriptor { +public: + class ApplicationEntry : public LoopElement { + public: + virtual int getLength() { return sizeof(descr_dvbj_application_entry)+parameter.getLength(); } + String parameter; + protected: + virtual void Parse(); + }; + StructureLoop<ApplicationEntry> applicationLoop; +protected: + virtual void Parse(); +}; + +class MHP_DVBJApplicationLocationDescriptor : public Descriptor { +public: + String baseDirectory; + String classPath; + String initialClass; +protected: + virtual void Parse(); +}; + +class MHP_ApplicationIconsDescriptor : public Descriptor { +public: + String iconLocator; + int getIconFlags() const; +protected: + virtual void Parse(); +private: + const descr_application_icons_descriptor_end *s; +}; + +} //end of namespace + +#endif //LIBSI_TABLE_H |