/// <summary> /// Create an instance of the descriptor class for Dish Network descriptors. /// </summary> /// <param name="byteData">The MPEG2 section containing the descriptor.</param> /// <param name="index">The index of the tag byte of the descriptor.</param> /// <param name="table">The table ID containing this descriptor.</param> /// <returns>A descriptor instance.</returns> internal static DescriptorBase DishNetworkInstance(byte[] byteData, int index, int table) { DescriptorBase descriptor; switch ((int)byteData[index]) { case DishNetworkRatingDescriptorTag: descriptor = new DishNetworkRatingDescriptor(); break; case DishNetworkShortEventDescriptorTag: descriptor = new DishNetworkShortEventDescriptor(); break; case DishNetworkExtendedEventDescriptorTag: descriptor = new DishNetworkExtendedEventDescriptor(); break; case DishNetworkSupplementaryDescriptorTag: descriptor = new DishNetworkSupplementaryDescriptor(); break; case DishNetworkVCHIPDescriptorTag: descriptor = new DishNetworkVCHIPDescriptor(); break; case DishNetworkSeriesDescriptorTag: descriptor = new DishNetworkSeriesDescriptor(); break; case ContentDescriptorTag: descriptor = new DVBContentDescriptor(); break; default: descriptor = new DescriptorBase(); break; } descriptor.table = table; descriptor.tag = (int)byteData[index]; index++; descriptor.length = (int)byteData[index]; index++; descriptor.Process(byteData, index); return(descriptor); }
/// <summary> /// Create an instance of the descriptor class for Bell TV descriptors. /// </summary> /// <param name="byteData">The MPEG2 section containing the descriptor.</param> /// <param name="index">The index of the tag byte of the descriptor.</param> /// <param name="table">The table ID containing this descriptor.</param> /// <returns>A descriptor instance.</returns> internal static DescriptorBase BellTVInstance(byte[] byteData, int index, int table) { DescriptorBase descriptor; switch ((int)byteData[index]) { case ShortEventDescriptorTag: descriptor = new BellShortEventDescriptor(); break; case BellTVExtendedEventDescriptorTag: descriptor = new BellTVExtendedEventDescriptor(); break; case BellTVRatingDescriptorTag: descriptor = new BellTVRatingDescriptor(); break; case BellTVSeriesDescriptorTag: descriptor = new BellTVSeriesDescriptor(); break; case ContentDescriptorTag: descriptor = new DVBContentDescriptor(); break; default: descriptor = new DescriptorBase(); break; } descriptor.table = table; descriptor.tag = (int)byteData[index]; index++; descriptor.length = (int)byteData[index]; index++; descriptor.Process(byteData, index); return(descriptor); }
/// <summary> /// Create an instance of the descriptor class. /// </summary> /// <param name="byteData">The MPEG2 section containing the descriptor.</param> /// <param name="index">The index of the tag byte of the descriptor.</param> /// <param name="scope">The current scope.</param> /// <returns>A descriptor instance.</returns> internal static DescriptorBase Instance(byte[] byteData, int index, Scope scope) { DescriptorBase descriptor; switch ((int)byteData[index]) { case NetworkNameDescriptorTag: descriptor = new DVBNetworkNameDescriptor(); break; case SatelliteDeliverySystemDescriptorTag: descriptor = new DVBSatelliteDeliverySystemDescriptor(); break; case ServiceDescriptorTag: descriptor = new DVBServiceDescriptor(); break; case ServiceListDescriptorTag: descriptor = new DVBServiceListDescriptor(); break; case ShortEventDescriptorTag: descriptor = new DVBShortEventDescriptor(); break; case ExtendedEventDescriptorTag: descriptor = new DVBExtendedEventDescriptor(); break; case ComponentDescriptorTag: descriptor = new DVBComponentDescriptor(); break; case ContentDescriptorTag: descriptor = new DVBContentDescriptor(); break; case ParentalRatingDescriptorTag: descriptor = new DVBParentalRatingDescriptor(); break; case BouquetNameDescriptorTag: descriptor = new DVBBouquetNameDescriptor(); break; case LocalTimeOffsetDescriptorTag: descriptor = new DVBLocalTimeOffsetDescriptor(); break; case OpenTVChannelInfoDescriptorTag: descriptor = new OpenTVChannelInfoDescriptor(); break; case GenericChannelInfoDescriptorTag: switch (scope) { case Scope.Bouquet: descriptor = new FreeviewChannelInfoDescriptor(); break; case Scope.ServiceDescripton: descriptor = new ServiceChannelDescriptor(); break; default: descriptor = new DescriptorBase(); break; } break; case FreeviewChannelInfoDescriptorTag: case TurkeyChannelInfoDescriptorTag: case E2ChannelInfoDescriptorTag: if (scope == Scope.Bouquet) { descriptor = new FreeviewChannelInfoDescriptor(); } else { descriptor = new DescriptorBase(); } break; case FreeSatChannelInfoDescriptorTag: descriptor = new FreeSatChannelInfoDescriptor(); break; case ContentIdentifierDescriptorTag: descriptor = new DVBContentIdentifierDescriptor(); break; default: descriptor = new DescriptorBase(); break; } descriptor.tag = (int)byteData[index]; index++; descriptor.length = (int)byteData[index]; index++; if (descriptor.Length != 0) { descriptor.Process(byteData, index); } return(descriptor); }
/// <summary> /// Create an instance of the descriptor class. /// </summary> /// <param name="byteData">The MPEG2 section containing the descriptor.</param> /// <param name="index">The index of the tag byte of the descriptor.</param> /// <param name="scope">The current scope.</param> /// <returns>A descriptor instance.</returns> internal static DescriptorBase Instance(byte[] byteData, int index, Scope scope) { DescriptorBase descriptor; switch ((int)byteData[index]) { case NetworkNameDescriptorTag: descriptor = new DVBNetworkNameDescriptor(); break; case SatelliteDeliverySystemDescriptorTag: descriptor = new DVBSatelliteDeliverySystemDescriptor(); break; case ServiceDescriptorTag: descriptor = new DVBServiceDescriptor(); break; case ServiceListDescriptorTag: descriptor = new DVBServiceListDescriptor(); break; case ShortEventDescriptorTag: descriptor = new DVBShortEventDescriptor(); break; case ExtendedEventDescriptorTag: descriptor = new DVBExtendedEventDescriptor(); break; case ComponentDescriptorTag: descriptor = new DVBComponentDescriptor(); break; case ContentDescriptorTag: descriptor = new DVBContentDescriptor(); break; case ParentalRatingDescriptorTag: descriptor = new DVBParentalRatingDescriptor(); break; case BouquetNameDescriptorTag: descriptor = new DVBBouquetNameDescriptor(); break; case LocalTimeOffsetDescriptorTag: descriptor = new DVBLocalTimeOffsetDescriptor(); break; case OpenTVChannelInfoDescriptorTag: descriptor = new OpenTVChannelInfoDescriptor(); break; case GenericChannelInfoDescriptorTag: switch (scope) { case Scope.Bouquet: descriptor = new FreeviewChannelInfoDescriptor(); break; case Scope.ServiceDescripton: descriptor = new ServiceChannelDescriptor(); break; default: descriptor = new DescriptorBase(); break; } break; case FreeviewChannelInfoDescriptorTag: case TurkeyChannelInfoDescriptorTag: case E2ChannelInfoDescriptorTag: if (scope == Scope.Bouquet) descriptor = new FreeviewChannelInfoDescriptor(); else descriptor = new DescriptorBase(); break; case FreeSatChannelInfoDescriptorTag: descriptor = new FreeSatChannelInfoDescriptor(); break; case ContentIdentifierDescriptorTag: descriptor = new DVBContentIdentifierDescriptor(); break; default: descriptor = new DescriptorBase(); break; } descriptor.tag = (int)byteData[index]; index++; descriptor.length = (int)byteData[index]; index++; if (descriptor.Length != 0) descriptor.Process(byteData, index); return (descriptor); }
/// <summary> /// Create an instance of the descriptor class for Dish Network descriptors. /// </summary> /// <param name="byteData">The MPEG2 section containing the descriptor.</param> /// <param name="index">The index of the tag byte of the descriptor.</param> /// <param name="table">The table ID containing this descriptor.</param> /// <returns>A descriptor instance.</returns> internal static DescriptorBase DishNetworkInstance(byte[] byteData, int index, int table) { DescriptorBase descriptor; switch ((int)byteData[index]) { case DishNetworkRatingDescriptorTag: descriptor = new DishNetworkRatingDescriptor(); break; case DishNetworkShortEventDescriptorTag: descriptor = new DishNetworkShortEventDescriptor(); break; case DishNetworkExtendedEventDescriptorTag: descriptor = new DishNetworkExtendedEventDescriptor(); break; case DishNetworkSupplementaryDescriptorTag: descriptor = new DishNetworkSupplementaryDescriptor(); break; case DishNetworkVCHIPDescriptorTag: descriptor = new DishNetworkVCHIPDescriptor(); break; case DishNetworkSeriesDescriptorTag: descriptor = new DishNetworkSeriesDescriptor(); break; case ContentDescriptorTag: descriptor = new DVBContentDescriptor(); break; default: descriptor = new DescriptorBase(); break; } descriptor.table = table; descriptor.tag = (int)byteData[index]; index++; descriptor.length = (int)byteData[index]; index++; descriptor.Process(byteData, index); return (descriptor); }
/// <summary> /// Create an instance of the descriptor class for Bell TV descriptors. /// </summary> /// <param name="byteData">The MPEG2 section containing the descriptor.</param> /// <param name="index">The index of the tag byte of the descriptor.</param> /// <param name="table">The table ID containing this descriptor.</param> /// <returns>A descriptor instance.</returns> internal static DescriptorBase BellTVInstance(byte[] byteData, int index, int table) { DescriptorBase descriptor; switch ((int)byteData[index]) { case ShortEventDescriptorTag: descriptor = new BellShortEventDescriptor(); break; case BellTVExtendedEventDescriptorTag: descriptor = new BellTVExtendedEventDescriptor(); break; case BellTVRatingDescriptorTag: descriptor = new BellTVRatingDescriptor(); break; case BellTVSeriesDescriptorTag: descriptor = new BellTVSeriesDescriptor(); break; case ContentDescriptorTag: descriptor = new DVBContentDescriptor(); break; default: descriptor = new DescriptorBase(); break; } descriptor.table = table; descriptor.tag = (int)byteData[index]; index++; descriptor.length = (int)byteData[index]; index++; descriptor.Process(byteData, index); return (descriptor); }