Beispiel #1
0
        void ReadFrameHandler(mdwebcam.Frame frame)
        {
            Bitmap old = _state.Image;

            if (frame.Image != null)
            {
                _state.Image     = new Bitmap(frame.Image);
                _state.ImageSize = new Vector2(_state.Image.Size.Width, _state.Image.Size.Height);
                frame.Image.Dispose();
            }
            else
            {
                _state.Image = null;
            }
            _state.LastFrameUpdate = DateTime.UtcNow;


            if (old != null)
            {
                old.Dispose();
            }

            webcam.UpdateFrameRequest request = new webcam.UpdateFrameRequest();
            request.TimeStamp = _state.LastFrameUpdate;

            webcam.UpdateFrame update = new webcam.UpdateFrame();
            update.Body         = request;
            update.ResponsePort = null;
            _fwdPort.Post(update);
        }
Beispiel #2
0
 /// <summary>
 /// Frame update operation
 /// </summary>
 public UpdateFrame(UpdateFrameRequest body, PortSet <DefaultUpdateResponseType, Fault> responsePort)
     :
     base(body, responsePort)
 {
 }
Beispiel #3
0
 /// <summary>
 /// Frame update operation
 /// </summary>
 public UpdateFrame(UpdateFrameRequest body)
     :
     base(body)
 {
 }