public static IEnumerable <TsDescriptor> Parse(this ITsDescriptorFactory factory, byte[] buffer, int offset, int length) { while (length > 0) { if (length < 2) { Debug.WriteLine("Unused buffer " + (object)length); break; } byte code = buffer[offset]; byte descriptorLength = buffer[offset + 1]; offset += 2; length -= 2; if (length < (int)descriptorLength) { Debug.WriteLine(" " + (object)descriptorLength + " exceeds buffer (" + (string)(object)length + " remaining)"); break; } TsDescriptor descriptor = factory.Create(code, buffer, offset, (int)descriptorLength); if (null != descriptor) { yield return(descriptor); } length -= (int)descriptorLength; offset += (int)descriptorLength; } }
public TsProgramMapTableFactory(ITsDescriptorFactory descriptorFactory) { if (null == descriptorFactory) throw new ArgumentNullException(nameof(descriptorFactory)); _descriptorFactory = descriptorFactory; }
public TsProgramMapTableFactory(ITsDescriptorFactory descriptorFactory) { if (null == descriptorFactory) { throw new ArgumentNullException("descriptorFactory"); } this._descriptorFactory = descriptorFactory; }
public TsTransportStreamDescriptionTable(ITsDescriptorFactory descriptorFactory) : base(TsTableId.TS_description_section) { if (null == descriptorFactory) throw new ArgumentNullException(nameof(descriptorFactory)); _descriptorFactory = descriptorFactory; }
public TsTransportStreamDescriptionTable(ITsDescriptorFactory descriptorFactory) : base(TsProgramSpecificInformation.TsTableId.TS_description_section) { if (null == descriptorFactory) { throw new ArgumentNullException("descriptorFactory"); } this._descriptorFactory = descriptorFactory; }
public TsProgramMapTable(ITsDecoder decoder, ITsDescriptorFactory descriptorFactory, int programNumber, uint pid, Action<IProgramStreams> streamFilter) : base(TsTableId.TS_program_map_section) { if (null == decoder) throw new ArgumentNullException(nameof(decoder)); if (null == descriptorFactory) throw new ArgumentNullException(nameof(descriptorFactory)); _decoder = decoder; _descriptorFactory = descriptorFactory; _programNumber = programNumber; _pid = pid; _streamFilter = streamFilter; }
public TsProgramMapTable(ITsDecoder decoder, ITsDescriptorFactory descriptorFactory, int programNumber, uint pid, Action <IProgramStreams> streamFilter) : base(TsProgramSpecificInformation.TsTableId.TS_program_map_section) { if (null == decoder) { throw new ArgumentNullException("decoder"); } if (null == descriptorFactory) { throw new ArgumentNullException("descriptorFactory"); } this._decoder = decoder; this._descriptorFactory = descriptorFactory; this._programNumber = programNumber; this._pid = pid; this._streamFilter = streamFilter; }