CSharpRTMP.Core.Protocols.Rtmfp.Listener.PushVideoPacket C# (CSharp) Метод

PushVideoPacket() публичный Метод

public PushVideoPacket ( uint time, N2HBinaryReader packet ) : void
time uint
packet CSharpRTMP.Common.N2HBinaryReader
Результат void
        public void PushVideoPacket(uint time, N2HBinaryReader packet)
        {
            if (!ReceiveVideo)
            {
                //_firstKeyFrame = false;
                _firstVideo = true;
                return;
            }
            if (_videoWriter == null)
            {
                Logger.FATAL("Listener {0} must be initialized before to be used", Id);
                return;
            }
            //var temp = packet.ReadByte();
            //packet.BaseStream.Position--;
            //if ((temp & 0xF0) == 0x10) _firstKeyFrame = true;
            //if (!_firstKeyFrame)
            //{
            //    _videoWriter.QOS.DroppedFrames++;
            //    return;
            //}
            if (_videoWriter.Reseted)
            {
                _videoWriter.Reseted = false;
                WriteBounds();
            }
            time = ComputeTime(time);
            if (_firstVideo)
            {
                _firstVideo = false;
                var size = Publication.VideoCodecBuffer.GetAvaliableByteCounts();
                if (size > 0)
                {
                    _videoWriter.Write(time, Publication.VideoCodecBuffer, false);
                }
            }
            _videoWriter.Write(time, packet.BaseStream, _unbuffered);
        }