예제 #1
0
        public void ConsumeVideoData(object sender, VideoDataEventArgs args)
        {
            var frame = _videoAssembler.AssembleVideoFrame(args.VideoData);

            if (frame == null)
            {
                return;
            }

            _video.FeedVideoData(frame);
        }
예제 #2
0
        public void ConsumeVideoData(object sender, VideoDataEventArgs args)
        {
            // TODO: Sorting
            var frame = _videoAssembler.AssembleVideoFrame(args.VideoData);

            if (frame == null)
            {
                return;
            }

            // Enqueue encoded video data in decoder
            if (_videoContextInitialized)
            {
                _videoHandler.PushData(frame);
            }
            else if (frame.PrimaryType == NalUnitType.SEQUENCE_PARAMETER_SET)
            {
                _videoHandler.UpdateCodecParameters(frame.GetCodecSpecificDataAvcc());
                _videoContextInitialized = true;
            }
        }