public void ConsumeVideoData(object sender, VideoDataEventArgs args) { var frame = _videoAssembler.AssembleVideoFrame(args.VideoData); if (frame == null) { return; } _video.FeedVideoData(frame); }
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; } }