Share via


MediaDeviceControl Class

Definition

Gets or sets a device setting on a camera.

public ref class MediaDeviceControl sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.MTA)]
class MediaDeviceControl final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.MTA)]
public sealed class MediaDeviceControl
Public NotInheritable Class MediaDeviceControl
Inheritance
Object Platform::Object IInspectable MediaDeviceControl
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Examples

For examples of setting media device controllers, see Manual camera controls for photo and video capture

Remarks

Various properties on the VideoDeviceController object returns instances of the MediaDeviceControl object. Each VideoDeviceController property represents a particular setting on the camera, such as brightness or focus. Use the MediaDeviceControl object to:

  • Get or set the camera setting.
  • Enable automatic adjustment of the setting.
  • Get the range of values that the camera supports for the setting.

Note

This class is not agile, which means that you need to consider its threading model and marshaling behavior. For more info, see Threading and Marshaling (C++/CX) and Using Windows Runtime objects in a multithreaded environment (.NET).

Properties

Capabilities

Gets the capabilities of the camera for this camera setting.

Methods

TryGetAuto(Boolean)

Indicates whether automatic adjustment of the camera setting is enabled.

TryGetValue(Double)

Gets the value of the camera setting.

TrySetAuto(Boolean)

Enables or disables automatic adjustment of the camera setting.

TrySetValue(Double)

Sets the camera setting.

Applies to