示例#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);
 }