コード例 #1
0
 /// <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);
     }
 }
コード例 #2
0
        /// <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);
            }
        }