mirror of
				https://github.com/vdr-projects/vdr.git
				synced 2025-03-01 10:50:46 +00:00 
			
		
		
		
	Removed superfluous white space; added RCS Id
This commit is contained in:
		| @@ -6,16 +6,15 @@ | ||||
|  *   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 $ | ||||
|  *                                                                         * | ||||
|  ***************************************************************************/ | ||||
|  | ||||
|   | ||||
| #include <string.h> | ||||
| #include "descriptor.h" | ||||
|  | ||||
| namespace SI { | ||||
|  | ||||
|  | ||||
|  | ||||
| void ShortEventDescriptor::Parse() { | ||||
|    unsigned int offset=0; | ||||
|    const descr_short_event *s; | ||||
| @@ -29,9 +28,6 @@ void ShortEventDescriptor::Parse() { | ||||
|    text.setData(data+offset, mid->text_length); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| int ExtendedEventDescriptor::getDescriptorNumber() { | ||||
|    return s->descriptor_number; | ||||
| } | ||||
| @@ -52,9 +48,6 @@ void ExtendedEventDescriptor::Parse() { | ||||
|    text.setData(data+offset, mid->text_length); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| void ExtendedEventDescriptor::Item::Parse() { | ||||
|    unsigned int offset=0; | ||||
|    const item_extended_event *first; | ||||
| @@ -65,7 +58,6 @@ void ExtendedEventDescriptor::Item::Parse() { | ||||
|    item.setData(data+offset, mid->item_length); | ||||
| } | ||||
|  | ||||
|  | ||||
| int ExtendedEventDescriptors::getTextLength() { | ||||
|    int ret=0; | ||||
|    for (int i=0;i<length;i++) { | ||||
| @@ -140,9 +132,6 @@ char *ExtendedEventDescriptors::getText(char *buffer) { | ||||
|    return buffer; | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| int TimeShiftedEventDescriptor::getReferenceServiceId() const { | ||||
|    return HILO(s->reference_service_id); | ||||
| } | ||||
| @@ -155,17 +144,11 @@ void TimeShiftedEventDescriptor::Parse() { | ||||
|    s=data.getData<const descr_time_shifted_event>(); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| void ContentDescriptor::Parse() { | ||||
|    //this descriptor is only a header and a loop | ||||
|    nibbleLoop.setData(data+sizeof(SectionHeader), getLength()-sizeof(SectionHeader)); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| int ContentDescriptor::Nibble::getContentNibbleLevel1() const { | ||||
|    return s->content_nibble_level_1; | ||||
| } | ||||
| @@ -186,15 +169,11 @@ void ContentDescriptor::Nibble::Parse() { | ||||
|    s=data.getData<const nibble_content>(); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| void ParentalRatingDescriptor::Parse() { | ||||
|    //this descriptor is only a header and a loop | ||||
|    ratingLoop.setData(data+sizeof(SectionHeader), getLength()-sizeof(SectionHeader)); | ||||
| } | ||||
|  | ||||
|  | ||||
| int ParentalRatingDescriptor::Rating::getRating() const { | ||||
|    return s->rating; | ||||
| } | ||||
| @@ -206,9 +185,6 @@ void ParentalRatingDescriptor::Rating::Parse() { | ||||
|    languageCode[2]=s->lang_code3; | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| int CaDescriptor::getCaType() const { | ||||
|    return HILO(s->CA_type); | ||||
| } | ||||
| @@ -223,8 +199,6 @@ void CaDescriptor::Parse() { | ||||
|    privateData.assign(data.getData(offset), getLength()-offset); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
| int StreamIdentifierDescriptor::getComponentTag() const { | ||||
|    return s->component_tag; | ||||
| } | ||||
| @@ -233,25 +207,14 @@ void StreamIdentifierDescriptor::Parse() { | ||||
|    s=data.getData<const descr_stream_identifier>(); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| void NetworkNameDescriptor::Parse() { | ||||
|    name.setData(data+sizeof(descr_network_name), getLength()-sizeof(descr_network_name)); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| void CaIdentifierDescriptor::Parse() { | ||||
|    identifiers.setData(data+sizeof(descr_ca_identifier), getLength()-sizeof(descr_ca_identifier)); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| int CarouselIdentifierDescriptor::getCarouselId() const { | ||||
|    return (HILO(s->carousel_id_hi) << 16) | HILO(s->carousel_id_lo); | ||||
| } | ||||
| @@ -264,16 +227,10 @@ void CarouselIdentifierDescriptor::Parse() { | ||||
|    s=data.getData<const descr_carousel_identifier>(); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| void ServiceListDescriptor::Parse() { | ||||
|    serviceLoop.setData(data+sizeof(descr_service_list), getLength()-sizeof(descr_service_list)); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| int ServiceListDescriptor::Service::getServiceId() const { | ||||
|    return HILO(s->service_id); | ||||
| } | ||||
| @@ -286,9 +243,6 @@ void ServiceListDescriptor::Service::Parse() { | ||||
|    s=data.getData<const descr_service_list_loop>(); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| int SatelliteDeliverySystemDescriptor::getFrequency() const { | ||||
|    return (HILO(s->frequency_hi) << 16) | HILO(s->frequency_lo); | ||||
| } | ||||
| @@ -321,9 +275,6 @@ void SatelliteDeliverySystemDescriptor::Parse() { | ||||
|    s=data.getData<const descr_satellite_delivery_system>(); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| int CableDeliverySystemDescriptor::getFrequency() const { | ||||
|    return (HILO(s->frequency_hi) << 16) | HILO(s->frequency_lo); | ||||
| } | ||||
| @@ -348,9 +299,6 @@ void CableDeliverySystemDescriptor::Parse() { | ||||
|    s=data.getData<const descr_cable_delivery_system>(); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| int TerrestrialDeliverySystemDescriptor::getFrequency() const { | ||||
|    return (HILO(s->frequency_hi) << 16) | HILO(s->frequency_lo); | ||||
| } | ||||
| @@ -391,9 +339,6 @@ void TerrestrialDeliverySystemDescriptor::Parse() { | ||||
|    s=data.getData<const descr_terrestrial_delivery>(); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| int ServiceDescriptor::getServiceType() const { | ||||
|    return s->service_type; | ||||
| } | ||||
| @@ -411,9 +356,6 @@ void NVODReferenceDescriptor::Parse() { | ||||
|    serviceLoop.setData(data+sizeof(descr_nvod_reference), getLength()-sizeof(descr_nvod_reference)); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| int NVODReferenceDescriptor::Service::getTransportStream() const { | ||||
|    return HILO(s->transport_stream_id); | ||||
| } | ||||
| @@ -430,9 +372,6 @@ void NVODReferenceDescriptor::Service::Parse() { | ||||
|    s=data.getData<const item_nvod_reference>(); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| int TimeShiftedServiceDescriptor::getReferenceServiceId() const { | ||||
|    return HILO(s->reference_service_id); | ||||
| } | ||||
| @@ -441,9 +380,6 @@ void TimeShiftedServiceDescriptor::Parse() { | ||||
|    s=data.getData<const descr_time_shifted_service>(); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| int ComponentDescriptor::getStreamContent() const { | ||||
|    return s->stream_content; | ||||
| } | ||||
| @@ -465,16 +401,10 @@ void ComponentDescriptor::Parse() { | ||||
|    description.setData(data+offset, getLength()-offset); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| void SubtitlingDescriptor::Parse() { | ||||
|    subtitlingLoop.setData(data+sizeof(descr_subtitling), getLength()-sizeof(descr_subtitling)); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| int SubtitlingDescriptor::Subtitling::getSubtitlingType() const { | ||||
|    return s->subtitling_type; | ||||
| } | ||||
| @@ -491,9 +421,6 @@ void SubtitlingDescriptor::Subtitling::Parse() { | ||||
|    s=data.getData<const item_subtitling>(); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| int ServiceMoveDescriptor::getNewOriginalNetworkId() const { | ||||
|    return HILO(s->new_original_network_id); | ||||
| } | ||||
| @@ -510,9 +437,6 @@ void ServiceMoveDescriptor::Parse() { | ||||
|    s=data.getData<const descr_service_move>(); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| int FrequencyListDescriptor::getCodingType() const { | ||||
|    return s->coding_type; | ||||
| } | ||||
| @@ -523,19 +447,14 @@ void FrequencyListDescriptor::Parse() { | ||||
|    frequencies.setData(data+offset, getLength()-offset); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| void ServiceIdentifierDescriptor::Parse() { | ||||
|    textualServiceIdentifier.setData(data+sizeof(descr_service_identifier), getLength()-sizeof(descr_service_identifier)); | ||||
| } | ||||
|  | ||||
|  | ||||
| void MultilingualNameDescriptor::Parse() { | ||||
|    nameLoop.setData(data+sizeof(descr_multilingual_network_name), getLength()-sizeof(descr_multilingual_network_name)); | ||||
| } | ||||
|  | ||||
|  | ||||
| void MultilingualNameDescriptor::Name::Parse() { | ||||
|    unsigned int offset=0; | ||||
|    const entry_multilingual_name *s; | ||||
| @@ -546,7 +465,6 @@ void MultilingualNameDescriptor::Name::Parse() { | ||||
|    name.setData(data+offset, s->text_length); | ||||
| } | ||||
|  | ||||
|  | ||||
| int MultilingualComponentDescriptor::getComponentTag() const { | ||||
|    return s->component_tag; | ||||
| } | ||||
| @@ -557,16 +475,10 @@ void MultilingualComponentDescriptor::Parse() { | ||||
|    nameLoop.setData(data+sizeof(descr_multilingual_component), getLength()-sizeof(descr_multilingual_component)); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| void MultilingualServiceNameDescriptor::Parse() { | ||||
|    nameLoop.setData(data+sizeof(descr_multilingual_network_name), getLength()-sizeof(descr_multilingual_network_name)); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| void MultilingualServiceNameDescriptor::Name::Parse() { | ||||
|    unsigned int offset=0; | ||||
|    const entry_multilingual_name *s; | ||||
| @@ -580,9 +492,6 @@ void MultilingualServiceNameDescriptor::Name::Parse() { | ||||
|    name.setData(data+offset, mid->service_name_length); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| void ApplicationSignallingDescriptor::Parse() { | ||||
|    entryLoop.setData(data+sizeof(descr_application_signalling), getLength()-sizeof(descr_application_signalling)); | ||||
| } | ||||
| @@ -599,10 +508,6 @@ void ApplicationSignallingDescriptor::ApplicationEntryDescriptor::Parse() { | ||||
|    s=data.getData<const application_signalling_entry>(); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| bool MHP_ApplicationDescriptor::isServiceBound() const { | ||||
|    return s->service_bound_flag; | ||||
| } | ||||
| @@ -615,7 +520,6 @@ int MHP_ApplicationDescriptor::getApplicationPriority() const { | ||||
|    return s->application_priority; | ||||
| } | ||||
|  | ||||
|  | ||||
| void MHP_ApplicationDescriptor::Parse() { | ||||
|    unsigned int offset=0; | ||||
|    const descr_application *dapp; | ||||
| @@ -625,7 +529,6 @@ void MHP_ApplicationDescriptor::Parse() { | ||||
|    transportProtocolLabels.setData(data+offset, getLength()-offset); | ||||
| } | ||||
|  | ||||
|  | ||||
| int MHP_ApplicationDescriptor::Profile::getApplicationProfile() const { | ||||
|       return HILO(s->application_profile); | ||||
| } | ||||
| @@ -646,8 +549,6 @@ void MHP_ApplicationDescriptor::Profile::Parse() { | ||||
|    s=data.getData<application_profile_entry>(); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
| void MHP_ApplicationNameDescriptor::Parse() { | ||||
|    nameLoop.setData(data+sizeof(descr_application_name), getLength()-sizeof(descr_application_name)); | ||||
| } | ||||
| @@ -661,8 +562,6 @@ void MHP_ApplicationNameDescriptor::NameEntry::Parse() { | ||||
|    languageCode[2]=s->lang_code3; | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
| int MHP_TransportProtocolDescriptor::getProtocolId() const { | ||||
|    return HILO(s->protocol_id); | ||||
| } | ||||
| @@ -701,8 +600,6 @@ void MHP_TransportProtocolDescriptor::Parse() { | ||||
|    } | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
| void MHP_DVBJApplicationDescriptor::Parse() { | ||||
|    applicationLoop.setData(data+sizeof(descr_dvbj_application), getLength()-sizeof(descr_dvbj_application)); | ||||
| } | ||||
| @@ -712,7 +609,6 @@ void MHP_DVBJApplicationDescriptor::ApplicationEntry::Parse() { | ||||
|    parameter.setData(data+sizeof(descr_dvbj_application_entry), entry->parameter_length); | ||||
| } | ||||
|  | ||||
|  | ||||
| void MHP_DVBJApplicationLocationDescriptor::Parse() { | ||||
|    unsigned int offset=0; | ||||
|    const descr_dvbj_application_location *first; | ||||
| @@ -724,7 +620,6 @@ void MHP_DVBJApplicationLocationDescriptor::Parse() { | ||||
|    initialClass.setData(data+offset, getLength()-offset); | ||||
| } | ||||
|  | ||||
|  | ||||
| int MHP_ApplicationIconsDescriptor::getIconFlags() const { | ||||
|    return HILO(s->icon_flags); | ||||
| } | ||||
| @@ -738,5 +633,3 @@ void MHP_ApplicationIconsDescriptor::Parse() { | ||||
| } | ||||
|  | ||||
| } //end of namespace | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -6,6 +6,8 @@ | ||||
|  *   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 | ||||
| @@ -16,7 +18,6 @@ | ||||
|  | ||||
| namespace SI { | ||||
|  | ||||
|  | ||||
| class ShortEventDescriptor : public Descriptor { | ||||
| public: | ||||
|    char languageCode[3]; | ||||
| @@ -59,7 +60,6 @@ public: | ||||
|    char *getText(char *buffer); | ||||
| }; | ||||
|  | ||||
|  | ||||
| class TimeShiftedEventDescriptor : public Descriptor { | ||||
| public: | ||||
|    int getReferenceServiceId() const; | ||||
| @@ -89,7 +89,6 @@ protected: | ||||
|    virtual void Parse(); | ||||
| }; | ||||
|  | ||||
|  | ||||
| class ParentalRatingDescriptor : public Descriptor { | ||||
| public: | ||||
|    class Rating : public LoopElement { | ||||
| @@ -107,7 +106,6 @@ protected: | ||||
|    virtual void Parse(); | ||||
| }; | ||||
|  | ||||
|  | ||||
| class CaDescriptor : public Descriptor { | ||||
| public: | ||||
|    int getCaType() const; | ||||
| @@ -172,7 +170,6 @@ protected: | ||||
|    virtual void Parse(); | ||||
| }; | ||||
|  | ||||
|  | ||||
| class SatelliteDeliverySystemDescriptor : public Descriptor { | ||||
| public: | ||||
|    int getFrequency() const; | ||||
| @@ -247,7 +244,6 @@ protected: | ||||
|    virtual void Parse(); | ||||
| }; | ||||
|  | ||||
|  | ||||
| class TimeShiftedServiceDescriptor : public Descriptor { | ||||
| public: | ||||
|    int getReferenceServiceId() const; | ||||
| @@ -288,7 +284,6 @@ protected: | ||||
|    virtual void Parse(); | ||||
| }; | ||||
|  | ||||
|  | ||||
| class ServiceMoveDescriptor : public Descriptor { | ||||
| public: | ||||
|    int getNewOriginalNetworkId() const; | ||||
| @@ -366,10 +361,6 @@ protected: | ||||
|    virtual void Parse(); | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| //a descriptor currently unimplemented in this library | ||||
| class UnimplementedDescriptor : public Descriptor { | ||||
| protected: | ||||
| @@ -418,7 +409,6 @@ protected: | ||||
|    virtual void Parse(); | ||||
| }; | ||||
|  | ||||
|  | ||||
| class MHP_ApplicationNameDescriptor : public Descriptor { | ||||
| public: | ||||
|    class NameEntry : public LoopElement { | ||||
| @@ -434,7 +424,6 @@ protected: | ||||
|    virtual void Parse(); | ||||
| }; | ||||
|  | ||||
|  | ||||
| class MHP_TransportProtocolDescriptor : public Descriptor { | ||||
| public: | ||||
|    enum Protocol { ObjectCarousel = 0x01, IPviaDVB = 0x02, HTTPoverInteractionChannel = 0x03 }; | ||||
| @@ -464,7 +453,6 @@ protected: | ||||
|    virtual void Parse(); | ||||
| }; | ||||
|  | ||||
|  | ||||
| class MHP_DVBJApplicationLocationDescriptor : public Descriptor { | ||||
| public: | ||||
|    String baseDirectory; | ||||
| @@ -484,9 +472,6 @@ private: | ||||
|    const descr_application_icons_descriptor_end *s; | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| } //end of namespace | ||||
|  | ||||
| #endif //LIBSI_TABLE_H | ||||
|  | ||||
|   | ||||
| @@ -1,5 +1,7 @@ | ||||
| #!/usr/bin/perl | ||||
|  | ||||
| # $Id: gendescr.pl 1.2 2003/12/13 10:42:05 kls Exp $ | ||||
|  | ||||
| print "Name (ohne ...Descriptor):"; | ||||
| $name=<STDIN>; | ||||
| $name =~ s/\n$//; | ||||
| @@ -10,7 +12,6 @@ print "Struct:"; | ||||
| $struct=<STDIN>; | ||||
| $struct =~ s/\n$//; | ||||
|  | ||||
|  | ||||
| mm: | ||||
| $index=0; | ||||
| $which=1; | ||||
|   | ||||
							
								
								
									
										137
									
								
								libsi/headers.h
									
									
									
									
									
								
							
							
						
						
									
										137
									
								
								libsi/headers.h
									
									
									
									
									
								
							| @@ -10,6 +10,8 @@ | ||||
|  *   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 $ | ||||
|  *                                                                         * | ||||
|  ***************************************************************************/ | ||||
|  | ||||
| #ifndef LIBSI_HEADERS_H | ||||
| @@ -605,7 +607,6 @@ struct tot { | ||||
|    u_char descriptors_loop_length_lo             :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
| /* | ||||
|  * | ||||
|  *    7) Stuffing Table (ST): | ||||
| @@ -727,8 +728,6 @@ struct ait_app { | ||||
|    /* descriptors  */ | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* | ||||
|  * | ||||
|  *    The following describes the different descriptors that can be used within | ||||
| @@ -754,11 +753,9 @@ struct descr_gen { | ||||
|    u_char descriptor_length                      :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
| #define GetDescriptorTag(x) (((descr_gen_t *) x)->descriptor_tag) | ||||
| #define GetDescriptorLength(x) (((descr_gen_t *) x)->descriptor_length+DESCR_GEN_LEN) | ||||
|  | ||||
|  | ||||
| /* 0x09 ca_descriptor */ | ||||
|  | ||||
| #define DESCR_CA_LEN 6 | ||||
| @@ -777,7 +774,6 @@ struct descr_ca { | ||||
|    u_char CA_PID_lo                              :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
| /* 0x0A iso_639_language_descriptor */ | ||||
|  | ||||
| #define DESCR_ISO_639_LANGUAGE_LEN 5 | ||||
| @@ -789,8 +785,6 @@ struct descr_iso_639_language { | ||||
|    u_char lang_code3                             :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x13 carousel_identifier_descriptor */ | ||||
|  | ||||
| #define DESCR_CAROUSEL_IDENTIFIER_LEN 7 | ||||
| @@ -805,8 +799,6 @@ struct descr_carousel_identifier { | ||||
|    /* FormatSpecifier follows */ | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x40 network_name_descriptor */ | ||||
|  | ||||
| #define DESCR_NETWORK_NAME_LEN 2 | ||||
| @@ -815,8 +807,6 @@ struct descr_network_name { | ||||
|    u_char descriptor_length                      :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x41 service_list_descriptor */ | ||||
|  | ||||
| #define DESCR_SERVICE_LIST_LEN 2 | ||||
| @@ -825,7 +815,6 @@ struct descr_service_list { | ||||
|    u_char descriptor_length                      :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
| #define DESCR_SERVICE_LIST_LOOP_LEN 3 | ||||
| struct descr_service_list_loop { | ||||
|    u_char service_id_hi                          :8; | ||||
| @@ -833,8 +822,6 @@ struct descr_service_list_loop { | ||||
|    u_char service_type                           :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x42 stuffing_descriptor */ | ||||
|  | ||||
| #define DESCR_STUFFING_LEN XX | ||||
| @@ -844,8 +831,6 @@ struct descr_stuffing { | ||||
|    /* TBD */ | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x43 satellite_delivery_system_descriptor */ | ||||
|  | ||||
| #define DESCR_SATELLITE_DELIVERY_SYSTEM_LEN 13 | ||||
| @@ -879,8 +864,6 @@ struct descr_satellite_delivery_system { | ||||
| #endif | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x44 cable_delivery_system_descriptor */ | ||||
|  | ||||
| #define DESCR_CABLE_DELIVERY_SYSTEM_LEN 13 | ||||
| @@ -912,8 +895,6 @@ struct descr_cable_delivery_system { | ||||
| #endif | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x45 vbi_data_descriptor */ | ||||
|  | ||||
| #define DESCR_VBI_DATA_LEN XX | ||||
| @@ -923,8 +904,6 @@ struct descr_vbi_data { | ||||
|    /* TBD */ | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x46 vbi_teletext_descriptor */ | ||||
|  | ||||
| #define DESCR_VBI_TELETEXT_LEN XX | ||||
| @@ -934,8 +913,6 @@ struct descr_vbi_teletext { | ||||
|    /* TBD */ | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x47 bouquet_name_descriptor */ | ||||
|  | ||||
| #define DESCR_BOUQUET_NAME_LEN 2 | ||||
| @@ -944,8 +921,6 @@ struct descr_bouquet_name { | ||||
|    u_char descriptor_length                      :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x48 service_descriptor */ | ||||
|  | ||||
| #define DESCR_SERVICE_LEN  4 | ||||
| @@ -960,8 +935,6 @@ struct descr_service_mid { | ||||
|    u_char service_name_length                   :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x49 country_availability_descriptor */ | ||||
|  | ||||
| #define DESCR_COUNTRY_AVAILABILITY_LEN 3 | ||||
| @@ -977,8 +950,6 @@ struct descr_country_availability { | ||||
| #endif | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x4A linkage_descriptor */ | ||||
|  | ||||
| #define DESCR_LINKAGE_LEN 9 | ||||
| @@ -994,8 +965,6 @@ struct descr_linkage { | ||||
|    u_char linkage_type                           :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x4B nvod_reference_descriptor */ | ||||
|  | ||||
| #define DESCR_NVOD_REFERENCE_LEN 2 | ||||
| @@ -1004,7 +973,6 @@ struct descr_nvod_reference { | ||||
|    u_char descriptor_length                      :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
| #define ITEM_NVOD_REFERENCE_LEN 6 | ||||
| struct item_nvod_reference { | ||||
|    u_char transport_stream_id_hi                 :8; | ||||
| @@ -1015,9 +983,6 @@ struct item_nvod_reference { | ||||
|    u_char service_id_lo                          :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x4C time_shifted_service_descriptor */ | ||||
|  | ||||
| #define DESCR_TIME_SHIFTED_SERVICE_LEN 4 | ||||
| @@ -1028,8 +993,6 @@ struct descr_time_shifted_service { | ||||
|    u_char reference_service_id_lo                :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x4D short_event_descriptor */ | ||||
|  | ||||
| #define DESCR_SHORT_EVENT_LEN 6 | ||||
| @@ -1046,8 +1009,6 @@ struct descr_short_event_mid { | ||||
|    u_char text_length                      :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x4E extended_event_descriptor */ | ||||
|  | ||||
| #define DESCR_EXTENDED_EVENT_LEN 7 | ||||
| @@ -1072,7 +1033,6 @@ struct descr_extended_event_mid { | ||||
|    u_char text_length                            :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
| #define ITEM_EXTENDED_EVENT_LEN 1 | ||||
| struct item_extended_event { | ||||
|    u_char item_description_length                :8; | ||||
| @@ -1082,8 +1042,6 @@ struct item_extended_event_mid { | ||||
|    u_char item_length                            :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x4F time_shifted_event_descriptor */ | ||||
|  | ||||
| #define DESCR_TIME_SHIFTED_EVENT_LEN 6 | ||||
| @@ -1096,8 +1054,6 @@ struct descr_time_shifted_event { | ||||
|    u_char reference_event_id_lo                  :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x50 component_descriptor */ | ||||
|  | ||||
| #define DESCR_COMPONENT_LEN  8 | ||||
| @@ -1118,8 +1074,6 @@ struct descr_component { | ||||
|    u_char lang_code3                             :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x51 mosaic_descriptor */ | ||||
|  | ||||
| #define DESCR_MOSAIC_LEN XX | ||||
| @@ -1129,8 +1083,6 @@ struct descr_mosaic { | ||||
|    /* TBD */ | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x52 stream_identifier_descriptor */ | ||||
|  | ||||
| #define DESCR_STREAM_IDENTIFIER_LEN 3 | ||||
| @@ -1140,8 +1092,6 @@ struct descr_stream_identifier { | ||||
|    u_char component_tag                          :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x53 ca_identifier_descriptor */ | ||||
|  | ||||
| #define DESCR_CA_IDENTIFIER_LEN 2 | ||||
| @@ -1150,8 +1100,6 @@ struct descr_ca_identifier { | ||||
|    u_char descriptor_length                      :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x54 content_descriptor */ | ||||
|  | ||||
| #define DESCR_CONTENT_LEN 2 | ||||
| @@ -1160,7 +1108,6 @@ struct descr_content { | ||||
|    u_char descriptor_length                      :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
| struct nibble_content { | ||||
| #if BYTE_ORDER == BIG_ENDIAN | ||||
|    u_char content_nibble_level_1                 :4; | ||||
| @@ -1178,8 +1125,6 @@ struct nibble_content { | ||||
| #endif | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x55 parental_rating_descriptor */ | ||||
|  | ||||
| #define DESCR_PARENTAL_RATING_LEN 2 | ||||
| @@ -1188,7 +1133,6 @@ struct descr_parental_rating { | ||||
|    u_char descriptor_length                      :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
| #define PARENTAL_RATING_LEN 4 | ||||
| struct parental_rating { | ||||
|    u_char lang_code1                             :8; | ||||
| @@ -1197,8 +1141,6 @@ struct parental_rating { | ||||
|    u_char rating                                 :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x56 teletext_descriptor */ | ||||
|  | ||||
| #define DESCR_TELETEXT_LEN 2 | ||||
| @@ -1207,7 +1149,6 @@ struct descr_teletext { | ||||
|    u_char descriptor_length                      :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
| #define ITEM_TELETEXT_LEN 5 | ||||
| struct item_teletext { | ||||
|    u_char lang_code1                             :8; | ||||
| @@ -1223,8 +1164,6 @@ struct item_teletext { | ||||
|    u_char page_number                            :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x57 telephone_descriptor */ | ||||
|  | ||||
| #define DESCR_TELEPHONE_LEN XX | ||||
| @@ -1234,8 +1173,6 @@ struct descr_telephone { | ||||
|    /* TBD */ | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x58 local_time_offset_descriptor */ | ||||
|  | ||||
| #define DESCR_LOCAL_TIME_OFFSET_LEN 2 | ||||
| @@ -1244,7 +1181,6 @@ struct descr_local_time_offset { | ||||
|    u_char descriptor_length                      :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
| #define LOCAL_TIME_OFFSET_ENTRY_LEN 15 | ||||
| struct local_time_offset_entry { | ||||
|    u_char country_code1                          :8; | ||||
| @@ -1270,8 +1206,6 @@ struct local_time_offset_entry { | ||||
|    u_char next_time_offset_m                     :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x59 subtitling_descriptor */ | ||||
|  | ||||
| #define DESCR_SUBTITLING_LEN 2 | ||||
| @@ -1280,7 +1214,6 @@ struct descr_subtitling { | ||||
|    u_char descriptor_length                      :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
| #define ITEM_SUBTITLING_LEN 8 | ||||
| struct item_subtitling { | ||||
|    u_char lang_code1                             :8; | ||||
| @@ -1293,8 +1226,6 @@ struct item_subtitling { | ||||
|    u_char ancillary_page_id_lo                   :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x5A terrestrial_delivery_system_descriptor */ | ||||
|  | ||||
| #define DESCR_TERRESTRIAL_DELIVERY_SYSTEM_LEN XX | ||||
| @@ -1338,8 +1269,6 @@ struct descr_terrestrial_delivery { | ||||
|    u_char reserver5                              :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x5B multilingual_network_name_descriptor */ | ||||
|  | ||||
| #define DESCR_MULTILINGUAL_NETWORK_NAME_LEN XX | ||||
| @@ -1355,8 +1284,6 @@ struct entry_multilingual_name { | ||||
|    u_char text_length                            :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x5C multilingual_bouquet_name_descriptor */ | ||||
|  | ||||
| #define DESCR_MULTILINGUAL_BOUQUET_NAME_LEN XX | ||||
| @@ -1365,8 +1292,6 @@ struct descr_multilingual_bouquet_name { | ||||
|    u_char descriptor_length                      :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x5D multilingual_service_name_descriptor */ | ||||
|  | ||||
| #define DESCR_MULTILINGUAL_SERVICE_NAME_LEN XX | ||||
| @@ -1379,7 +1304,6 @@ struct entry_multilingual_service_name_mid { | ||||
|    u_char service_name_length                    :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
| /* 0x5E multilingual_component_descriptor */ | ||||
|  | ||||
| #define DESCR_MULTILINGUAL_COMPONENT_LEN XX | ||||
| @@ -1389,8 +1313,6 @@ struct descr_multilingual_component { | ||||
|    u_char component_tag                          :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x5F private_data_specifier_descriptor */ | ||||
|  | ||||
| #define DESCR_PRIVATE_DATA_SPECIFIER_LEN XX | ||||
| @@ -1400,8 +1322,6 @@ struct descr_private_data_specifier { | ||||
|    /* TBD */ | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x60 service_move_descriptor */ | ||||
|  | ||||
| #define DESCR_SERVICE_MOVE_LEN XX | ||||
| @@ -1416,8 +1336,6 @@ struct descr_service_move { | ||||
|    u_char new_service_id_lo                      :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x61 short_smoothing_buffer_descriptor */ | ||||
|  | ||||
| #define DESCR_SHORT_SMOOTHING_BUFFER_LEN XX | ||||
| @@ -1427,8 +1345,6 @@ struct descr_short_smoothing_buffer { | ||||
|    /* TBD */ | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x62 frequency_list_descriptor */ | ||||
|  | ||||
| #define DESCR_FREQUENCY_LIST_LEN XX | ||||
| @@ -1444,8 +1360,6 @@ struct descr_frequency_list { | ||||
| #endif | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x63 partial_transport_stream_descriptor */ | ||||
|  | ||||
| #define DESCR_PARTIAL_TRANSPORT_STREAM_LEN XX | ||||
| @@ -1455,8 +1369,6 @@ struct descr_partial_transport_stream { | ||||
|    /* TBD */ | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x64 data_broadcast_descriptor */ | ||||
|  | ||||
| #define DESCR_DATA_BROADCAST_LEN XX | ||||
| @@ -1466,8 +1378,6 @@ struct descr_data_broadcast { | ||||
|    /* TBD */ | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x65 ca_system_descriptor */ | ||||
|  | ||||
| #define DESCR_CA_SYSTEM_LEN XX | ||||
| @@ -1477,8 +1387,6 @@ struct descr_ca_system { | ||||
|    /* TBD */ | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x66 data_broadcast_id_descriptor */ | ||||
|  | ||||
| #define DESCR_DATA_BROADCAST_ID_LEN XX | ||||
| @@ -1488,8 +1396,6 @@ struct descr_data_broadcast_id { | ||||
|    /* TBD */ | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x67 transport_stream_descriptor */ | ||||
|  | ||||
| #define DESCR_TRANSPORT_STREAM_LEN XX | ||||
| @@ -1499,8 +1405,6 @@ struct descr_transport_stream { | ||||
|    /* TBD */ | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x68 dsng_descriptor */ | ||||
|  | ||||
| #define DESCR_DSNG_LEN XX | ||||
| @@ -1510,8 +1414,6 @@ struct descr_dsng { | ||||
|    /* TBD */ | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x69 pdc_descriptor */ | ||||
|  | ||||
| #define DESCR_PDC_LEN XX | ||||
| @@ -1521,8 +1423,6 @@ struct descr_pdc { | ||||
|    /* TBD */ | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x6A ac3_descriptor */ | ||||
|  | ||||
| #define DESCR_AC3_LEN 3 | ||||
| @@ -1548,8 +1448,6 @@ struct descr_ac3 { | ||||
|    u_char asvc                                   :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x6B ancillary_data_descriptor */ | ||||
|  | ||||
| #define DESCR_ANCILLARY_DATA_LEN 3 | ||||
| @@ -1559,8 +1457,6 @@ struct descr_ancillary_data { | ||||
|    u_char ancillary_data_identifier              :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x6C cell_list_descriptor */ | ||||
|  | ||||
| #define DESCR_CELL_LIST_LEN XX | ||||
| @@ -1570,8 +1466,6 @@ struct descr_cell_list { | ||||
|    /* TBD */ | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x6D cell_frequency_link_descriptor */ | ||||
|  | ||||
| #define DESCR_CELL_FREQUENCY_LINK_LEN XX | ||||
| @@ -1581,8 +1475,6 @@ struct descr_cell_frequency_link { | ||||
|    /* TBD */ | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x6E announcement_support_descriptor */ | ||||
|  | ||||
| #define DESCR_ANNOUNCEMENT_SUPPORT_LEN XX | ||||
| @@ -1592,8 +1484,6 @@ struct descr_announcement_support { | ||||
|    /* TBD */ | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x6F application_signalling_descriptor */ | ||||
|  | ||||
| #define DESCR_APPLICATION_SIGNALLING_LEN 2 | ||||
| @@ -1602,7 +1492,6 @@ struct descr_application_signalling { | ||||
|    u_char descriptor_length                      :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
| #define APPLICATION_SIGNALLING_ENTRY_LEN 3 | ||||
| struct application_signalling_entry { | ||||
|    u_char application_type_hi                    :8; | ||||
| @@ -1616,8 +1505,6 @@ struct application_signalling_entry { | ||||
| #endif | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| /* 0x71 service_identifier_descriptor (ETSI TS 102 812, MHP) */ | ||||
|  | ||||
| struct descr_service_identifier { | ||||
| @@ -1625,7 +1512,6 @@ struct descr_service_identifier { | ||||
|    u_char descriptor_length                      :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
| /* MHP 0x00 application_descriptor */ | ||||
|  | ||||
| #define DESCR_APPLICATION_LEN 3 | ||||
| @@ -1636,7 +1522,6 @@ struct descr_application { | ||||
|    u_char application_profiles_length            :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
| #define DESCR_APPLICATION_END_LEN 2 | ||||
|  | ||||
| struct descr_application_end { | ||||
| @@ -1653,7 +1538,6 @@ struct descr_application_end { | ||||
| /*now follow 8bit transport_protocol_label fields to the end */ | ||||
| }; | ||||
|  | ||||
|  | ||||
| #define APPLICATION_PROFILE_ENTRY_LEN 5 | ||||
|  | ||||
| struct application_profile_entry { | ||||
| @@ -1664,7 +1548,6 @@ struct application_profile_entry { | ||||
|    u_char version_micro                          :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
| /* MHP 0x01 application_name_desriptor */ | ||||
|  | ||||
| #define DESCR_APPLICATION_NAME_LEN 2 | ||||
| @@ -1674,7 +1557,6 @@ struct descr_application_name { | ||||
|    u_char descriptor_length                      :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
| #define APPLICATION_NAME_ENTRY_LEN 4 | ||||
|  | ||||
| struct descr_application_name_entry { | ||||
| @@ -1685,7 +1567,6 @@ struct descr_application_name_entry { | ||||
|    /* application name string */ | ||||
| }; | ||||
|  | ||||
|  | ||||
| /* MHP 0x02 transport_protocol_descriptor */ | ||||
|  | ||||
| #define DESCR_TRANSPORT_PROTOCOL_LEN 5 | ||||
| @@ -1699,7 +1580,6 @@ struct descr_transport_protocol { | ||||
|    /* protocol_id-specific selector bytes follow */ | ||||
| }; | ||||
|  | ||||
|  | ||||
| #define TRANSPORT_VIA_OC_LEN 1 | ||||
|  | ||||
| struct transport_via_oc { | ||||
| @@ -1712,7 +1592,6 @@ struct transport_via_oc { | ||||
| #endif | ||||
| }; | ||||
|  | ||||
|  | ||||
| //if remote is true, transport_via_oc_remote_end_t follows, | ||||
| // else transport_via_oc_end_t. | ||||
|  | ||||
| @@ -1728,14 +1607,12 @@ struct transport_via_oc_remote_end { | ||||
|    u_char component_tag                          :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
| #define TRANSPORT_VIA_OC_END_LEN 1 | ||||
|  | ||||
| struct transport_via_oc_end { | ||||
|    u_char component_tag                          :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
| /* 0x03 dvb_j_application_descriptor() */ | ||||
|  | ||||
| #define DESCR_DVBJ_APPLICATION_LEN 2 | ||||
| @@ -1745,7 +1622,6 @@ struct descr_dvbj_application { | ||||
|    u_char descriptor_length                      :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
| #define DESCR_DVBJ_APPLICATION_ENTRY_LEN 1 | ||||
|  | ||||
| struct descr_dvbj_application_entry { | ||||
| @@ -1753,7 +1629,6 @@ struct descr_dvbj_application_entry { | ||||
|    /* parameter string */ | ||||
| }; | ||||
|  | ||||
|  | ||||
| /* 0x04 dvb_j_application_location_descriptor */ | ||||
|  | ||||
| #define DESCR_DVBJ_APPLICATION_LOCATION_LEN 3 | ||||
| @@ -1765,14 +1640,12 @@ struct descr_dvbj_application_location { | ||||
|    /* base directory string */ | ||||
| }; | ||||
|  | ||||
|  | ||||
| #define DESCR_DVBJ_APPLICATION_LOCATION_MID_LEN 1 | ||||
|  | ||||
| struct descr_dvbj_application_location_mid { | ||||
|    u_char classpath_extension_length                  :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
| /* 0x0B application_icons_descriptor */ | ||||
|  | ||||
| #define DESCR_APPLICATION_ICONS_LEN 3 | ||||
| @@ -1784,7 +1657,6 @@ struct descr_application_icons_descriptor { | ||||
|    /* icon locator */ | ||||
| }; | ||||
|  | ||||
|  | ||||
| #define DESCR_APPLICATION_ICONS_END_LEN 2 | ||||
|  | ||||
| struct descr_application_icons_descriptor_end { | ||||
| @@ -1792,11 +1664,6 @@ struct descr_application_icons_descriptor_end { | ||||
|    u_char icon_flags_lo                          :8; | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| } //end of namespace | ||||
|  | ||||
| #endif //LIBSI_HEADERS_H | ||||
|  | ||||
|   | ||||
| @@ -6,6 +6,8 @@ | ||||
|  *   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 $ | ||||
|  *                                                                         * | ||||
|  ***************************************************************************/ | ||||
|  | ||||
| #include "section.h" | ||||
| @@ -74,8 +76,6 @@ void PMT::Stream::Parse() { | ||||
|    streamDescriptors.setData(data+offset, HILO(s->ES_info_length)); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
| /*********************** NIT ***********************/ | ||||
|  | ||||
| int NIT::getNetworkId() const { | ||||
| @@ -105,11 +105,8 @@ void NIT::TransportStream::Parse() { | ||||
|    transportStreamDescriptors.setData(data+offset, HILO(s->transport_descriptors_length)); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
| /*********************** SDT ***********************/ | ||||
|  | ||||
|  | ||||
| void SDT::Parse() { | ||||
|    unsigned int offset=0; | ||||
|    data.setPointerAndOffset<const sdt>(s, offset); | ||||
| @@ -150,8 +147,6 @@ void SDT::Service::Parse() { | ||||
|    serviceDescriptors.setData(data+offset, HILO(s->descriptors_loop_length)); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
| /*********************** EIT ***********************/ | ||||
|  | ||||
| int EIT::getServiceId() const { | ||||
| @@ -183,7 +178,6 @@ void EIT::Parse() { | ||||
|    eventLoop.setData(data+offset, getLength()-offset-4); //4 is for CRC | ||||
| } | ||||
|  | ||||
|  | ||||
| time_t EIT::Event::getStartTime() const { | ||||
|    return DVBTime::getTime(s->mjd_hi, s->mjd_lo, s->start_time_h, s->start_time_m, s->start_time_s); | ||||
| } | ||||
| @@ -239,7 +233,6 @@ void EIT::Event::Parse() { | ||||
|    eventDescriptors.setData(data+offset, HILO(s->descriptors_loop_length)); | ||||
| } | ||||
|  | ||||
|  | ||||
| /*********************** TDT ***********************/ | ||||
|  | ||||
| time_t TDT::getTime() const { | ||||
| @@ -250,7 +243,6 @@ void TDT::Parse() { | ||||
|    s=data.getData<const tdt>(); | ||||
| } | ||||
|  | ||||
|  | ||||
| /*********************** TOT ***********************/ | ||||
|  | ||||
| time_t TOT::getTime() const { | ||||
| @@ -263,9 +255,6 @@ void TOT::Parse() { | ||||
|    descriptorLoop.setData(data+offset, getLength()-offset-4); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| /*********************** RST ***********************/ | ||||
|  | ||||
| void RST::Parse() { | ||||
| @@ -299,11 +288,8 @@ void RST::RunningInfo::Parse() { | ||||
|    s=data.getData<const rst_info>(); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
| /*********************** AIT ***********************/ | ||||
|  | ||||
|  | ||||
| int AIT::getApplicationType() const { | ||||
|    return HILO(first->application_type); | ||||
| } | ||||
| @@ -321,7 +307,6 @@ void AIT::Parse() { | ||||
|    applicationLoop.setData(data+offset, HILO(mid->application_loop_length)); | ||||
| } | ||||
|  | ||||
|  | ||||
| long AIT::Application::getOrganisationId() const { | ||||
|    return data.FourBytes(0); | ||||
| } | ||||
| @@ -340,7 +325,4 @@ void AIT::Application::Parse() { | ||||
|    applicationDescriptors.setData(data+offset, HILO(s->application_descriptors_length)); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
| } //end of namespace | ||||
|  | ||||
|   | ||||
| @@ -6,6 +6,8 @@ | ||||
|  *   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 $ | ||||
|  *                                                                         * | ||||
|  ***************************************************************************/ | ||||
|  | ||||
| #ifndef LIBSI_SECTION_H | ||||
| @@ -50,7 +52,6 @@ protected: | ||||
|    virtual void Parse(); | ||||
| }; | ||||
|  | ||||
|  | ||||
| class PMT : public NumberedSection { | ||||
| public: | ||||
|    PMT(const unsigned char *data, bool doCopy=true) : NumberedSection(data, doCopy) {} | ||||
| @@ -108,7 +109,6 @@ public: | ||||
|    int getBouquetId() const { return getNetworkId(); } | ||||
| }; | ||||
|  | ||||
|  | ||||
| class SDT : public NumberedSection { | ||||
| public: | ||||
|    SDT(const unsigned char *data, bool doCopy=true) : NumberedSection(data, doCopy) {} | ||||
| @@ -136,7 +136,6 @@ private: | ||||
|    const sdt *s; | ||||
| }; | ||||
|  | ||||
|  | ||||
| class EIT : public NumberedSection { | ||||
| public: | ||||
|    EIT(const unsigned char *data, bool doCopy=true) : NumberedSection(data, doCopy) {} | ||||
| @@ -179,7 +178,6 @@ private: | ||||
|    const eit *s; | ||||
| }; | ||||
|  | ||||
|  | ||||
| class TDT : public Section { | ||||
| public: | ||||
|    TDT(const unsigned char *data, bool doCopy=true) : Section(data, doCopy) {} | ||||
| @@ -191,7 +189,6 @@ private: | ||||
|    const tdt *s; | ||||
| }; | ||||
|  | ||||
|  | ||||
| class TOT : public CRCSection { | ||||
| public: | ||||
|    TOT(const unsigned char *data, bool doCopy=true) : CRCSection(data, doCopy) {} | ||||
| @@ -204,7 +201,6 @@ private: | ||||
|    const tot *s; | ||||
| }; | ||||
|  | ||||
|  | ||||
| class RST : public Section { | ||||
| public: | ||||
|    RST(const unsigned char *data, bool doCopy=true) : Section(data, doCopy) {} | ||||
| @@ -227,7 +223,6 @@ protected: | ||||
|    virtual void Parse(); | ||||
| }; | ||||
|  | ||||
|  | ||||
| class AIT : public NumberedSection { | ||||
| public: | ||||
|    AIT(const unsigned char *data, bool doCopy=true) : NumberedSection(data, doCopy) {} | ||||
| @@ -252,8 +247,6 @@ protected: | ||||
|    virtual void Parse(); | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| } //end of namespace | ||||
|  | ||||
| #endif //LIBSI_TABLE_H | ||||
|   | ||||
							
								
								
									
										20
									
								
								libsi/si.c
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								libsi/si.c
									
									
									
									
									
								
							| @@ -6,6 +6,8 @@ | ||||
|  *   the Free Software Foundation; either version 2 of the License, or     * | ||||
|  *   (at your option) any later version.                                   * | ||||
|  *                                                                         * | ||||
|  *   $Id: si.c 1.2 2003/12/13 10:42:16 kls Exp $ | ||||
|  *                                                                         * | ||||
|  ***************************************************************************/ | ||||
|  | ||||
| #include <string.h> | ||||
| @@ -28,8 +30,6 @@ void Object::setData(CharArray &d) { | ||||
|    data=d; | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
| Section::Section(const unsigned char *data, bool doCopy) { | ||||
|    setData(data, getLength(data), doCopy); | ||||
| } | ||||
| @@ -61,8 +61,6 @@ bool CRCSection::CheckCRCAndParse() { | ||||
|    return true; | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
| bool NumberedSection::getCurrentNextIndicator() const { | ||||
|    return data.getData<ExtendedSectionHeader>()->current_next_indicator; | ||||
| } | ||||
| @@ -79,10 +77,6 @@ int NumberedSection::getLastSectionNumber() const { | ||||
|    return data.getData<ExtendedSectionHeader>()->last_section_number; | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| int Descriptor::getLength() { | ||||
|    return getLength(data.getData()); | ||||
| } | ||||
| @@ -99,7 +93,6 @@ DescriptorTag Descriptor::getDescriptorTag(const unsigned char *d) { | ||||
|    return (DescriptorTag)((const DescriptorHeader*)d)->descriptor_tag; | ||||
| } | ||||
|  | ||||
|  | ||||
| Descriptor *DescriptorLoop::getNext(Iterator &it) { | ||||
|    if (it.i<getLength()) { | ||||
|       return createDescriptor(it.i); | ||||
| @@ -193,8 +186,6 @@ bool DescriptorGroup::isComplete() { | ||||
|    return true; | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
| char *String::getText() { | ||||
|    if (getLength() < 0 || getLength() >4095) | ||||
|       return "text error"; | ||||
| @@ -421,11 +412,4 @@ Descriptor *Descriptor::getDescriptor(CharArray da, DescriptorTagDomain domain) | ||||
|    return d; | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| } //end of namespace | ||||
|  | ||||
|  | ||||
|   | ||||
							
								
								
									
										18
									
								
								libsi/si.h
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								libsi/si.h
									
									
									
									
									
								
							| @@ -6,9 +6,10 @@ | ||||
|  *   the Free Software Foundation; either version 2 of the License, or     * | ||||
|  *   (at your option) any later version.                                   * | ||||
|  *                                                                         * | ||||
|  *   $Id: si.h 1.2 2003/12/13 10:42:17 kls Exp $ | ||||
|  *                                                                         * | ||||
|  ***************************************************************************/ | ||||
|  | ||||
|  | ||||
| #ifndef LIBSI_SI_H | ||||
| #define LIBSI_SI_H | ||||
|  | ||||
| @@ -153,7 +154,6 @@ enum RunningStatus { RunningStatusUndefined = 0, | ||||
|                      RunningStatusRunning = 4 | ||||
|                    }; | ||||
|  | ||||
|  | ||||
| /* Some principles: | ||||
|    - Objects that return references to other objects contained in their data must make sure | ||||
|      that the returned objects have been parsed. | ||||
| @@ -161,7 +161,6 @@ enum RunningStatus { RunningStatusUndefined = 0, | ||||
|      Note that this does not apply to Loops and Strings (their are never returned by reference, BTW). | ||||
| */ | ||||
|  | ||||
|  | ||||
| class Object : public Parsable { | ||||
| public: | ||||
|    Object(); | ||||
| @@ -211,9 +210,6 @@ public: | ||||
|    bool moreThanOneSection()  const { return getLastSectionNumber()>1; } | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| class VariableLengthPart : public Object { | ||||
| public: | ||||
|    //never forget to call this | ||||
| @@ -225,12 +221,9 @@ private: | ||||
|    int length; | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| class LoopElement : public Object { | ||||
| }; | ||||
|  | ||||
|  | ||||
| class SubStructure : public LoopElement { | ||||
| }; | ||||
|  | ||||
| @@ -250,8 +243,6 @@ protected: | ||||
|    static Descriptor *getDescriptor(CharArray d, DescriptorTagDomain domain); | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| class Loop : public VariableLengthPart { | ||||
| public: | ||||
|    class Iterator { | ||||
| @@ -352,7 +343,6 @@ public: | ||||
|    MHP_DescriptorLoop() { domain=MHP; } | ||||
| }; | ||||
|  | ||||
|  | ||||
| //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. | ||||
| @@ -377,8 +367,6 @@ protected: | ||||
|    bool deleteOnDesctruction; | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| class String : public VariableLengthPart { | ||||
| public: | ||||
|    //A note to the length: getLength() returns the length of the raw data. | ||||
| @@ -398,8 +386,6 @@ protected: | ||||
|    void decodeText(char *buffer); | ||||
| }; | ||||
|  | ||||
|  | ||||
| } //end of namespace | ||||
|  | ||||
| #endif //LIBSI_SI_H | ||||
|  | ||||
|   | ||||
							
								
								
									
										13
									
								
								libsi/util.c
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								libsi/util.c
									
									
									
									
									
								
							| @@ -6,6 +6,8 @@ | ||||
|  *   the Free Software Foundation; either version 2 of the License, or     * | ||||
|  *   (at your option) any later version.                                   * | ||||
|  *                                                                         * | ||||
|  *   $Id: util.c 1.2 2003/12/13 10:42:18 kls Exp $ | ||||
|  *                                                                         * | ||||
|  ***************************************************************************/ | ||||
|  | ||||
| #include <string.h> | ||||
| @@ -13,7 +15,6 @@ | ||||
|  | ||||
| namespace SI { | ||||
|  | ||||
|  | ||||
| /*---------------------------- CharArray ----------------------------*/ | ||||
|  | ||||
| CharArray::CharArray() : data_(0), off(0) { | ||||
| @@ -143,7 +144,6 @@ void CharArray::DataForeignData::Delete() { | ||||
|    //do not delete! | ||||
| } | ||||
|  | ||||
|  | ||||
| /* | ||||
| void CharArray::Data::assign(unsigned int s) { | ||||
|    if (data) | ||||
| @@ -184,7 +184,6 @@ void Parsable::CheckParse() { | ||||
|    } | ||||
| } | ||||
|  | ||||
|  | ||||
| //taken and adapted from libdtv, (c) Rolf Hakenes and VDR, (c) Klaus Schmidinger | ||||
| time_t DVBTime::getTime(unsigned char date_hi, unsigned char date_lo, unsigned char time_hour, unsigned char time_minute, unsigned char time_second) { | ||||
|    unsigned short mjd = date_hi << 8 | date_lo; | ||||
| @@ -279,12 +278,4 @@ CRC32::CRC32(const char *d, int len, unsigned long CRCvalue) { | ||||
|    value=CRCvalue; | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| } //end of namespace | ||||
|  | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -6,9 +6,10 @@ | ||||
|  *   the Free Software Foundation; either version 2 of the License, or     * | ||||
|  *   (at your option) any later version.                                   * | ||||
|  *                                                                         * | ||||
|  *   $Id: util.h 1.2 2003/12/13 10:42:20 kls Exp $ | ||||
|  *                                                                         * | ||||
|  ***************************************************************************/ | ||||
|  | ||||
|  | ||||
| #ifndef LIBSI_UTIL_H | ||||
| #define LIBSI_UTIL_H | ||||
|  | ||||
| @@ -23,7 +24,6 @@ | ||||
|  | ||||
| namespace SI { | ||||
|  | ||||
|  | ||||
| //Holds an array of unsigned char which is deleted | ||||
| //when the last object pointing to it is deleted. | ||||
| //Optimized for use in libsi. | ||||
| @@ -151,10 +151,6 @@ protected: | ||||
|    unsigned long value; | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| } //end of namespace | ||||
|  | ||||
|  | ||||
| #endif | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user