SASC
DVBSoftCAM

SI::Descriptor Class Reference

#include <si.h>

Inheritance diagram for SI::Descriptor:

List of all members.

Public Member Functions

virtual int getLength ()
DescriptorTag getDescriptorTag () const

Static Public Member Functions

static int getLength (const unsigned char *d)
static DescriptorTag getDescriptorTag (const unsigned char *d)

Static Protected Member Functions

static Descriptor * getDescriptor (CharArray d, DescriptorTagDomain domain, bool returnUnimplemetedDescriptor)

Friends

class DescriptorLoop

Detailed Description

Definition at line 257 of file si.h.


Member Function Documentation

Descriptor * SI::Descriptor::getDescriptor ( CharArray  d,
DescriptorTagDomain  domain,
bool  returnUnimplemetedDescriptor 
) [static, protected]

Definition at line 317 of file si.c.

References SI::AC3DescriptorTag, SI::AdaptationFieldDataDescriptorTag, SI::AncillaryDataDescriptorTag, SI::AnnouncementSupportDescriptorTag, SI::ApplicationSignallingDescriptorTag, SI::AudioStreamDescriptorTag, SI::BouquetNameDescriptorTag, SI::CableDeliverySystemDescriptorTag, SI::CaDescriptorTag, SI::CaIdentifierDescriptorTag, SI::CarouselIdentifierDescriptorTag, SI::CaSystemDescriptorTag, SI::CellFrequencyLinkDescriptorTag, SI::CellListDescriptorTag, SI::ComponentDescriptorTag, SI::ContentDescriptorTag, SI::CopyrightDescriptorTag, SI::CountryAvailabilityDescriptorTag, SI::DataBroadcastDescriptorTag, SI::DataBroadcastIdDescriptorTag, SI::DataStreamAlignmentDescriptorTag, SI::DescriptorHeader::descriptor_tag, SI::DSNGDescriptorTag, SI::ExtendedEventDescriptorTag, SI::FrequencyListDescriptorTag, SI::CharArray::getData(), SI::HierarchyDescriptorTag, SI::IBPDescriptorTag, SI::ISO639LanguageDescriptorTag, SI::LinkageDescriptorTag, SI::LocalTimeOffsetDescriptorTag, SI::MaximumBitrateDescriptorTag, SI::MHP, SI::MHP_ApplicationDescriptorTag, SI::MHP_ApplicationIconsDescriptorTag, SI::MHP_ApplicationNameDescriptorTag, SI::MHP_ApplicationStorageDescriptorTag, SI::MHP_DelegatedApplicationDescriptorTag, SI::MHP_DVBHTMLApplicationBoundaryDescriptorTag, SI::MHP_DVBHTMLApplicationDescriptorTag, SI::MHP_DVBHTMLApplicationLocationDescriptorTag, SI::MHP_DVBJApplicationDescriptorTag, SI::MHP_DVBJApplicationLocationDescriptorTag, SI::MHP_ExternalApplicationAuthorisationDescriptorTag, SI::MHP_IPv4RoutingDescriptorTag, SI::MHP_IPv6RoutingDescriptorTag, SI::MHP_PrefetchDescriptorTag, SI::MHP_TransportProtocolDescriptorTag, SI::MocaicDescriptorTag, SI::MultilingualBouquetNameDescriptorTag, SI::MultilingualComponentDescriptorTag, SI::MultilingualNetworkNameDescriptorTag, SI::MultilingualServiceNameDescriptorTag, SI::MultiplexBufferUtilizationDescriptorTag, SI::NetworkNameDescriptorTag, SI::NVODReferenceDescriptorTag, SI::ParentalRatingDescriptorTag, SI::PartialTransportStreamDescriptorTag, SI::PCIT, SI::PDCDescriptorTag, SI::PremiereContentTransmissionDescriptorTag, SI::PrivateDataIndicatorDescriptorTag, SI::PrivateDataSpecifierDescriptorTag, SI::RegistrationDescriptorTag, SI::SatelliteDeliverySystemDescriptorTag, SI::ServiceAvailabilityDescriptorTag, SI::ServiceDescriptorTag, SI::ServiceIdentifierDescriptorTag, SI::ServiceListDescriptorTag, SI::ServiceMoveDescriptorTag, SI::Object::setData(), SI::ShortEventDescriptorTag, SI::ShortSmoothingBufferDescriptorTag, SI::SI, SI::SmoothingBufferDescriptorTag, SI::STDDescriptorTag, SI::StreamIdentifierDescriptorTag, SI::StuffingDescriptorTag, SI::SubtitlingDescriptorTag, SI::SystemClockDescriptorTag, SI::TargetBackgroundGridDescriptorTag, SI::TelephoneDescriptorTag, SI::TeletextDescriptorTag, SI::TerrestrialDeliverySystemDescriptorTag, SI::TimeShiftedEventDescriptorTag, SI::TimeShiftedServiceDescriptorTag, SI::TransportStreamDescriptorTag, SI::VBIDataDescriptorTag, SI::VBITeletextDescriptorTag, SI::VideoStreamDescriptorTag, and SI::VideoWindowDescriptorTag.

Referenced by SI::DescriptorLoop::createDescriptor().

                                                                                                                 {
   Descriptor *d=0;
   switch (domain) {
   case SI:
      switch ((DescriptorTag)da.getData<DescriptorHeader>()->descriptor_tag) {
         case CaDescriptorTag:
            d=new CaDescriptor();
            break;
         case CarouselIdentifierDescriptorTag:
            d=new CarouselIdentifierDescriptor();
            break;
         case NetworkNameDescriptorTag:
            d=new NetworkNameDescriptor();
            break;
         case ServiceListDescriptorTag:
            d=new ServiceListDescriptor();
            break;
         case SatelliteDeliverySystemDescriptorTag:
            d=new SatelliteDeliverySystemDescriptor();
            break;
         case CableDeliverySystemDescriptorTag:
            d=new CableDeliverySystemDescriptor();
            break;
         case TerrestrialDeliverySystemDescriptorTag:
            d=new TerrestrialDeliverySystemDescriptor();
            break;
         case BouquetNameDescriptorTag:
            d=new BouquetNameDescriptor();
            break;
         case ServiceDescriptorTag:
            d=new ServiceDescriptor();
            break;
         case NVODReferenceDescriptorTag:
            d=new NVODReferenceDescriptor();
            break;
         case TimeShiftedServiceDescriptorTag:
            d=new TimeShiftedServiceDescriptor();
            break;
         case ComponentDescriptorTag:
            d=new ComponentDescriptor();
            break;
         case StreamIdentifierDescriptorTag:
            d=new StreamIdentifierDescriptor();
            break;
         case SubtitlingDescriptorTag:
            d=new SubtitlingDescriptor();
            break;
         case MultilingualNetworkNameDescriptorTag:
            d=new MultilingualNetworkNameDescriptor();
            break;
         case MultilingualBouquetNameDescriptorTag:
            d=new MultilingualBouquetNameDescriptor();
            break;
         case MultilingualServiceNameDescriptorTag:
            d=new MultilingualServiceNameDescriptor();
            break;
         case MultilingualComponentDescriptorTag:
            d=new MultilingualComponentDescriptor();
            break;
         case PrivateDataSpecifierDescriptorTag:
            d=new PrivateDataSpecifierDescriptor();
            break;
         case ServiceMoveDescriptorTag:
            d=new ServiceMoveDescriptor();
            break;
         case FrequencyListDescriptorTag:
            d=new FrequencyListDescriptor();
            break;
         case ServiceIdentifierDescriptorTag:
            d=new ServiceIdentifierDescriptor();
            break;
         case CaIdentifierDescriptorTag:
            d=new CaIdentifierDescriptor();
            break;
         case ShortEventDescriptorTag:
            d=new ShortEventDescriptor();
            break;
         case ExtendedEventDescriptorTag:
            d=new ExtendedEventDescriptor();
            break;
         case TimeShiftedEventDescriptorTag:
            d=new TimeShiftedEventDescriptor();
            break;
         case ContentDescriptorTag:
            d=new ContentDescriptor();
            break;
         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;
         case ISO639LanguageDescriptorTag:
            d=new ISO639LanguageDescriptor();
            break;
         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.

         //defined in ISO-13818-1
         case VideoStreamDescriptorTag:
         case AudioStreamDescriptorTag:
         case HierarchyDescriptorTag:
         case RegistrationDescriptorTag:
         case DataStreamAlignmentDescriptorTag:
         case TargetBackgroundGridDescriptorTag:
         case VideoWindowDescriptorTag:
         case SystemClockDescriptorTag:
         case MultiplexBufferUtilizationDescriptorTag:
         case CopyrightDescriptorTag:
         case MaximumBitrateDescriptorTag:
         case PrivateDataIndicatorDescriptorTag:
         case SmoothingBufferDescriptorTag:
         case STDDescriptorTag:
         case IBPDescriptorTag:

         //defined in ETSI EN 300 468
         case StuffingDescriptorTag:
         case VBIDataDescriptorTag:
         case CountryAvailabilityDescriptorTag:
         case MocaicDescriptorTag:
         case TelephoneDescriptorTag:
         case CellListDescriptorTag:
         case CellFrequencyLinkDescriptorTag:
         case ServiceAvailabilityDescriptorTag:
         case ShortSmoothingBufferDescriptorTag:
         case PartialTransportStreamDescriptorTag:
         case DataBroadcastDescriptorTag:
         case DataBroadcastIdDescriptorTag:
         case CaSystemDescriptorTag:
         case AC3DescriptorTag:
         case DSNGDescriptorTag:
         case AnnouncementSupportDescriptorTag:
         case AdaptationFieldDataDescriptorTag:
         case TransportStreamDescriptorTag:
         default:
            if (!returnUnimplemetedDescriptor)
               return 0;
            d=new UnimplementedDescriptor();
            break;
      }
      break;
   case MHP:
      switch ((DescriptorTag)da.getData<DescriptorHeader>()->descriptor_tag) {
      // They once again start with 0x00 (see page 234, MHP specification)
         case MHP_ApplicationDescriptorTag:
            d=new MHP_ApplicationDescriptor();
            break;
         case MHP_ApplicationNameDescriptorTag:
            d=new MHP_ApplicationNameDescriptor();
            break;
         case MHP_TransportProtocolDescriptorTag:
            d=new MHP_TransportProtocolDescriptor();
            break;
         case MHP_DVBJApplicationDescriptorTag:
            d=new MHP_DVBJApplicationDescriptor();
            break;
         case MHP_DVBJApplicationLocationDescriptorTag:
            d=new MHP_DVBJApplicationLocationDescriptor();
            break;
      // 0x05 - 0x0A is unimplemented this library
         case MHP_ExternalApplicationAuthorisationDescriptorTag:
         case MHP_IPv4RoutingDescriptorTag:
         case MHP_IPv6RoutingDescriptorTag:
         case MHP_DVBHTMLApplicationDescriptorTag:
         case MHP_DVBHTMLApplicationLocationDescriptorTag:
         case MHP_DVBHTMLApplicationBoundaryDescriptorTag:
         case MHP_ApplicationIconsDescriptorTag:
         case MHP_PrefetchDescriptorTag:
         case MHP_DelegatedApplicationDescriptorTag:
         case MHP_ApplicationStorageDescriptorTag:
         default:
            if (!returnUnimplemetedDescriptor)
               return 0;
            d=new UnimplementedDescriptor();
            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;
}
DescriptorTag SI::Descriptor::getDescriptorTag ( const unsigned char *  d) [static]

Definition at line 104 of file si.c.

                                                                 {
   return (DescriptorTag)((const DescriptorHeader*)d)->descriptor_tag;
}
DescriptorTag SI::Descriptor::getDescriptorTag ( ) const

Definition at line 96 of file si.c.

References SI::Object::data, and SI::CharArray::getData().

Referenced by SI::DescriptorLoop::getDescriptorTags(), and SI::DescriptorLoop::getNext().

                                                 {
   return getDescriptorTag(data.getData());
}
int SI::Descriptor::getLength ( const unsigned char *  d) [static]

Definition at line 100 of file si.c.

                                                {
   return ((const DescriptorHeader*)d)->descriptor_length+sizeof(DescriptorHeader);
}

Friends And Related Function Documentation

friend class DescriptorLoop [friend]

Definition at line 265 of file si.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines