Search code examples
c#uwpwindows-10-universal

VideoDeviceController: ExposureControl vs. Exposure. Which is better?


Info of the VideoDeviceController class' available properties can be found here: https://learn.microsoft.com/en-us/uwp/api/windows.media.devices.videodevicecontroller

I'm confused about the distinction between ExposureControl and Exposure within the VideoDeviceController class. They seem quite similar. Why would Microsoft provide both? Are there pros for one over the other?

"Gets the exposure control for this video device," represented below:

private MediaCapture _mediaCapture;
var exposureControl = _mediaCapture.VideoDeviceController.ExposureControl;

exposureControl.Auto
exposureControl.Min
exposureControl.Max
exposureControl.Supported

Source: https://learn.microsoft.com/en-us/uwp/api/windows.media.devices.exposurecontrol

"Gets a MediaDeviceControl object that can be used to get or set the camera's exposure time," represented below:

private MediaCapture _mediaCapture;
var otherExposureControl = _mediaCapture.VideoDeviceController.Exposure;

otherExposureControl.capabilities.auto;
otherExposureControl.capabilities.min;
otherExposureControl.capabilities.max;
otherExposureControl.capabilities.supported;

Sources: https://learn.microsoft.com/en-us/uwp/api/windows.media.devices.mediadevicecontrol

And https://learn.microsoft.com/en-us/uwp/api/windows.media.devices.mediadevicecontrolcapabilities


Solution

  • The ExposureControl gives apps additional control over the exposure settings on a device.

    This is the line which gives you your answer, it is written in the Expore Control docs -> remarks. Read that and you will see how ExporeControl is the better way to do this.

    Also exposureControl deals with capturing device which can be any attached capturing device to your Windows 10 device, while exposure only deals with built in camera of device as per the docs first line of each.