/// <summary> /// Reads the data. /// </summary> /// <param name="version">Version.</param> /// <param name="binaryReader">Binary reader.</param> public override void ReadData(byte version, BufferedBinaryReader binaryReader) { base.ReadData(version, binaryReader); this.codec = (FlvCodec)binaryReader.ReadUBits(4); this.frameType = (FlvFrameType)binaryReader.ReadUBits(4); if (this.codec == FlvCodec.SorensonH263) { videoData = new H263VideoPacket(); videoData.ReadData(binaryReader); } else { videoData = new ScreenVideoPacket(); videoData.ReadData(binaryReader); } }
/// <summary> /// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see> /// </summary> public override void ReadData(byte version, BufferedBinaryReader binaryReader) { RecordHeader rh = new RecordHeader(); rh.ReadData(binaryReader); streamId = binaryReader.ReadUInt16(); frameNum = binaryReader.ReadUInt16(); if (codecId == 2) { video = new H263VideoPacket(); video.ReadData(binaryReader); } else if (codecId == 3) { video = new ScreenVideoPacket(); video.ReadData(binaryReader); } }