public static Parse ( ExtendedBinaryReader br ) : |
||
br | ExtendedBinaryReader | |
return |
public static FLVTag Parse(ExtendedBinaryReader br)
{
var b = br.ReadByte();
var tag = new FLVTag
{
Reserved = (byte)(b & 0xc0),
Filter = (b & 0x20) == 0,
TagType = (TagType)(b & 0x1f),
DataSize = br.ReadUInt24(),
TimeStamp = br.ReadUInt24(),
TimestampExtended = br.ReadByte(),
StreamID = br.ReadUInt24()
};
tag.HeaderAndBody = br.ReadBytes((tag.TimestampExtended << 24) + (int)tag.TimeStamp);
return tag;
}