public CapturePreview(MediaCapture capture) { var props = (VideoEncodingProperties)capture.VideoDeviceController.GetMediaStreamProperties(MediaStreamType.VideoPreview); m_width = props.Width; m_height = props.Height; m_preview = new CapturePreviewNative(this, m_width, m_height); m_capture = capture; }
public PreviewImage(MediaCapture capture) { var properties = (VideoEncodingProperties)capture.VideoDeviceController.GetMediaStreamProperties(MediaStreamType.VideoPreview); this._Width = properties.Width; this._Height = properties.Height; this._Preview = new CapturePreviewNative(this, _Width, _Height); this._Capture = capture; }
public CapturePreview(MediaCapture capture, VideoRotation rotation = VideoRotation.None) { capture.SetPreviewRotation(rotation); var props = (VideoEncodingProperties)capture.VideoDeviceController.GetMediaStreamProperties(MediaStreamType.VideoPreview); if (rotation == VideoRotation.None || rotation == VideoRotation.Clockwise180Degrees) { m_width = props.Width; m_height = props.Height; } else { m_width = props.Height; m_height = props.Width; } m_preview = new CapturePreviewNative(this, m_width, m_height); m_capture = capture; }