示例#1
0
        private void BodyFrameReader_FrameArrived(MediaFrameReader sender, MediaFrameArrivedEventArgs args)
        {
            var subscribers = FrameArrived;

            if (subscribers != null)
            {
                var frame = sender.TryAcquireLatestFrame();
                if (frame != null && frame.BufferMediaFrame?.Buffer != null)
                {
                    var coordinateMapper = frame.CoordinateSystem;

                    var bodyArgs = new BodyFrameArrivedEventArgs(this, BodyFrame.Parse(frame));
                    frame.Dispose();
                    subscribers(this, bodyArgs);
                }
            }
        }