The FLV tag contains metadata for audio, video, or scripts, optional encryption metadata, and the payload.
Example #1
0
 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;
 }