PeekUInt16() public method

Peeks an Unsigned int16.
public PeekUInt16 ( ) : ushort
return ushort
Exemplo n.º 1
0
        /// <summary>
        /// Read and parse VideoFrameTag, into inner tags and raw byte-array header data
        /// </summary>
        private static VideoFrameTag ReadVideoFrameTag(BufferedBinaryReader binaryReader, BaseTagCollection tagList)
        {
            VideoFrameTag video = new VideoFrameTag();
            ushort streamId = binaryReader.PeekUInt16();

            IEnumerator tags = tagList.GetEnumerator();
            while (tags.MoveNext())
            {
                BaseTag tag = (BaseTag)tags.Current;
                if (tag is DefineVideoStreamTag)
                {
                    if (((DefineVideoStreamTag)tag).CharacterId == streamId)
                        video.CodecId = ((DefineVideoStreamTag)tag).CodecId;
                }
            }
            return video;
        }