/// <summary> /// Reads a MPEG-4 descriptor. /// </summary> /// <remarks>defined in ISO/IEC 14496-1 �2.2</remarks> private static BaseDescriptor ReadDescriptor(QtParser parser) { DescriptorClassTag tag = (DescriptorClassTag)parser.GetByte(); // Expandable length [see ISO/IEC 14496-1 �3.3] int count = 4; uint nextByte = parser.GetByte(); uint sizeOfInstance = (nextByte & 0x7F); while ((nextByte & 0x80) != 0 && --count > 0) { nextByte = parser.GetByte(); sizeOfInstance = (sizeOfInstance << 7) | (nextByte & 0x7F); } return(new BaseDescriptor(tag, sizeOfInstance)); }
public BaseDescriptor(DescriptorClassTag tag, long length) { _tag = tag; _length = length; }