Пример #1
0
        void HandleFrameArrived(MediaFrameReader sender, MediaFrameArrivedEventArgs args)
        {
            if (FrameSampleAcquired == null)
            {
                return;
            }

            using (var frameReference = _frameReader.TryAcquireLatestFrame()) //frameReference is a MediaFrameReference
            {
                if (frameReference != null)
                {
                    var sample = new VideoCaptureSample(frameReference, worldOrigin);
                    FrameSampleAcquired?.Invoke(sample);
                }
            }
        }
Пример #2
0
 private void OnFrameSampleAcquiredPolling(VideoCaptureSample sample)
 {
     FrameSampleAcquired?.Invoke(sample);
     VideoCapture.RequestNextFrameSample(OnFrameSampleAcquiredPolling);
 }
Пример #3
0
 private void OnFrameSampleAcquiredListener(VideoCaptureSample sample)
 {
     FrameSampleAcquired?.Invoke(sample);
 }