bool VideoFrameObserver.OnPreEncodeVideFrame(VideoFrame frame) { var result = OnPreEncodeVideFrame == null ? true : OnPreEncodeVideFrame(frame); localVideo?.Render(frame); if (firstLocalVideoFrameElapsed.HasValue && localVideo != null) { TimeSpan elapsed = new TimeSpan(DateTime.Now.Ticks - firstLocalVideoFrameElapsed.Value.Ticks); OnFirstLocalVideoFrame?.Invoke(frame.width, frame.height, (uint)elapsed.TotalMilliseconds); firstLocalVideoFrameElapsed = null; } return(result); }
void AgoraRtcEventHandler.OnFirstLocalVideoFrame(uint width, uint height, uint elapsed) { OnFirstLocalVideoFrame?.Invoke(width, height, elapsed); }