예제 #1
0
 private void OnPerformanceTimer(object source, ElapsedEventArgs e)
 {
     if (_NdiReceiver != null)
     {
         NDI.FramesReceived fr = _NdiReceiver.GetPerformance();
         _Log.Info($"Frame metrics ~ Audio - Total: {fr.AudioTotal} Dropped: {fr.AudioDropped} | Video - Total: {fr.VideoTotal} Dropped: {fr.VideoDropped}");
     }
 }
예제 #2
0
        public FramesReceived GetPerformance()
        {
            FramesReceived fr = new FramesReceived();

            if (_recvInstancePtr != IntPtr.Zero)
            {
                NDIlib.recv_performance_t totalFrames   = new NDIlib.recv_performance_t();
                NDIlib.recv_performance_t droppedFrames = new NDIlib.recv_performance_t();

                NDIlib.recv_get_performance(_recvInstancePtr, ref totalFrames, ref droppedFrames);

                fr.AudioTotal   = totalFrames.audio_frames;
                fr.VideoTotal   = totalFrames.video_frames;
                fr.AudioDropped = droppedFrames.audio_frames;
                fr.VideoDropped = droppedFrames.video_frames;
            }

            return(fr);
        }