private void PropertyChanged(VideoControlFlags videoControlFlagsProperty, int value) { if (OnVideoControlFlagsChanged != null) { OnVideoControlFlagsChanged(videoControlFlagsProperty, value); } }
private void SendControl(VideoControlFlags flags) { var payload = new Streamer((uint)VideoPayloadType.Control) { Data = new VideoControl(flags) }; SendStreamerOnControlSocket(payload); }
public VideoControl(VideoControlFlags flags, uint lastDisplayedFrameId = 0, long timestamp = 0, uint queueDepth = 0, uint firstLostFrame = 0, uint lastLostFrame = 0) { Flags = flags; LastDisplayedFrameId = lastDisplayedFrameId; Timestamp = timestamp; QueueDepth = queueDepth; FirstLostFrame = firstLostFrame; LastLostFrame = lastLostFrame; }
/// <summary> /// The event handler for the <see cref="OnVideoControlFlagsChanged"/> event. /// Updates the video capture device with new video control properties. /// </summary> /// <remarks> This method has been disabled, because it was easier to flip the incoming image /// with the CV image flip in ImageProcessing.cs. /// The direct show flipping didn't work with some webcams, e.g. the PlayStationEye3 cam or an HP Laptop Webcam</remarks> /// <param name="property">The <see cref="VideoControlFlags"/> to be changed</param> /// <param name="value">The new value for the property</param> private void OnVideoControlFlagsChanged(VideoControlFlags property, int value) { ////if (this.graphBuilder == null) ////{ //// return; ////} ////if (videoControl == null) //// return; ////VideoControlFlags pCapsFlags; ////IPin pPin = DsFindPin.ByCategory(capFilter, PinCategory.Capture, 0); ////int hr = videoControl.GetCaps(pPin, out pCapsFlags); ////if (hr != 0) //// ErrorLogger.WriteLine("Error: videoControl.GetCaps in Camera.Capture. Message: " + DsError.GetErrorText(hr)); ////hr = videoControl.GetMode(pPin, out pCapsFlags); ////if (hr != 0) //// ErrorLogger.WriteLine("Error while getting mode in videoControl.GetMode in Camera.Capture. Message: " + DsError.GetErrorText(hr)); ////if (value == 0) ////{ //// if ((pCapsFlags&VideoControlFlags.FlipVertical)==VideoControlFlags.FlipVertical) //// { //// pCapsFlags |= ~VideoControlFlags.FlipVertical; //// } ////} ////else ////{ //// pCapsFlags |= VideoControlFlags.FlipVertical; ////} ////hr = videoControl.SetMode(pPin, pCapsFlags); ////if (hr != 0) //// ErrorLogger.WriteLine("Error while getting mode in videoControl.SetMode in Camera.Capture. Message: " + DsError.GetErrorText(hr)); }
/// <summary> /// The event handler for the <see cref="OnVideoControlFlagsChanged"/> event. /// Updates the video capture device with new video control properties. /// </summary> /// <remarks> This method has been disabled, because it was easier to flip the incoming image /// with the CV image flip in ImageProcessing.cs. /// The direct show flipping didn't work with some webcams, e.g. the PlayStationEye3 cam or an HP Laptop Webcam</remarks> /// <param name="property">The <see cref="VideoControlFlags"/> to be changed</param> /// <param name="value">The new value for the property</param> private void OnVideoControlFlagsChanged(VideoControlFlags property, int value) { ////if (this.graphBuilder == null) ////{ //// return; ////} ////if (videoControl == null) //// return; ////VideoControlFlags pCapsFlags; ////IPin pPin = DsFindPin.ByCategory(capFilter, PinCategory.Capture, 0); ////int hr = videoControl.GetCaps(pPin, out pCapsFlags); ////if (hr != 0) //// ErrorLogger.WriteLine("Error: videoControl.GetCaps in Camera.Capture. Message: " + DsError.GetErrorText(hr)); ////hr = videoControl.GetMode(pPin, out pCapsFlags); ////if (hr != 0) //// ErrorLogger.WriteLine("Error while getting mode in videoControl.GetMode in Camera.Capture. Message: " + DsError.GetErrorText(hr)); ////if (value == 0) ////{ //// if ((pCapsFlags&VideoControlFlags.FlipVertical)==VideoControlFlags.FlipVertical) //// { //// pCapsFlags |= ~VideoControlFlags.FlipVertical; //// } ////} ////else ////{ //// pCapsFlags |= VideoControlFlags.FlipVertical; ////} ////hr = videoControl.SetMode(pPin, pCapsFlags); ////if (hr != 0) //// ErrorLogger.WriteLine("Error while getting mode in videoControl.SetMode in Camera.Capture. Message: " + DsError.GetErrorText(hr)); }
private void PropertyChanged(VideoControlFlags videoControlFlagsProperty, int value) { if (OnVideoControlFlagsChanged != null) { OnVideoControlFlagsChanged(videoControlFlagsProperty, value); } }