public DescriptionTable(byte[] buffer, int offset, int length) : base(buffer, offset, length) { Descriptors = Portability.CreateList <TsDescriptor>(); while (_position < _sectionLengthStartOffset + SectionLength - 4 && _position < offset + length - 4) { var descriptor = new UnknownDescriptor(buffer, _position); Descriptors.Add(descriptor); _position += descriptor.Length; } }
public ProgramMap(byte[] buffer, int offset) { var position = offset; StreamType = (StreamType)buffer[position++]; PacketIdentifier = (ushort)(((buffer[position++] << 8) | buffer[position++]) & 0x1FFF); var streamInfoLength = (ushort)(((buffer[position++] << 8) | buffer[position++]) & 0x0FFF); StreamInfo = Portability.CreateList <TsDescriptor>(); var descriptorEndPosition = position + streamInfoLength; while (position < descriptorEndPosition) { var descriptor = new UnknownDescriptor(buffer, position); StreamInfo.Add(descriptor); position += descriptor.Length; } }
public ProgramMapTable(byte[] buffer, int offset, int length) : base(buffer, offset, length) { _programClockReferencePid = (ushort)((buffer[_position++] << 8) | buffer[_position++]); _programInfoLength = (ushort)((buffer[_position++] << 8) | buffer[_position++]); ProgramInfo = Portability.CreateList <TsDescriptor>(); var descriptorEndPosition = _position + ProgramInfoLength; while (_position < descriptorEndPosition) { var descriptor = new UnknownDescriptor(buffer, _position); ProgramInfo.Add(descriptor); _position += descriptor.Length; } while (_position < _sectionLengthStartOffset + SectionLength - 4 && _position < offset + length - 4) { var row = new ProgramMap(buffer, _position); _position += row.Length; Rows.Add(row); } }