VideoDeviceController VideoDeviceController VideoDeviceController VideoDeviceController Class

Controls device settings on the camera.

Syntax

Declaration

public sealed class VideoDeviceControllerpublic sealed class VideoDeviceControllerPublic NotInheritable Class VideoDeviceController

Remarks

To get an instance of this object, retrieve the VideoDeviceController property.

Some drivers may require that the camera device preview to be in a running state before it can determine which controls are supported by the VideoDeviceController. If you check whether a certain control is supported by the VideoDeviceController before the preview stream is running, the control may be described as unsupported even though it is supported by the video device.

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 summary

Gets the advanced photo capture control for this video device.

Gets a MediaDeviceControl object that can be used to get or set the whether back-light compensation is enabled on the camera.

Gets a MediaDeviceControl object that can be used to get or set the brightness level on the camera.

Gets a MediaDeviceControl object that can be used to get or set the contrast level on the camera.

Gets or sets a value that indicates the optimizations the capture device should use to prioritize high quality picture, low latency, or low power consumption during video capture.

Gets a MediaDeviceControl object that can be used to get or set the camera's exposure time.

Gets the exposure compensation control for this video device.

Gets the exposure control for this video device.

Gets the ExposurePriorityVideoControl associated with the VideoDeviceController.

Gets the flash control for this video device.

Gets a MediaDeviceControl object that can be used to get or set the camera's focus setting.

Gets the focus control for this video device.

Gets the HdrVideoControl associated with the VideoDeviceController.

Gets a MediaDeviceControl object that can be used to get or set the camera's hue setting.

Gets the ISO film speed control for this video device.

Gets the low shutter lag photo control for this video device.

Gets the low shutter lag photo sequence control for this video device.

Gets the OpticalImageStabilizationControl associated with the VideoDeviceController.

Gets a MediaDeviceControl object that can be used to get or set the camera's pan setting.

Gets the photo confirmation control for this video device.

Gets or sets the primary use for the device.

Gets the regions of interest control for this video device.

Gets a MediaDeviceControl object that can be used to get or set the camera's roll setting.

Gets the scene mode control for this video device.

Gets a MediaDeviceControl object that can be used to get or set the camera's tilt setting.

Gets the torch control for this video device.

Gets the VariablePhotoSequenceController associated with the VideoDeviceController.

Gets a MediaDeviceControl object that can be used to get or set the white balance on the camera.

Gets the white balance control for this video device.

Gets a MediaDeviceControl object that can be used to get or set the camera's zoom setting.

Gets the ZoomControl associated with the VideoDeviceController.

Methods summary

Gets a list of the supported encoding properties for the video device.

Gets a property on the camera. You can use this method to query properties that are specific to a particular camera.

Gets the encoding properties for the specified media stream type for the video device.

Sets a property on the device. You can use this method to set properties that are specific to a particular device.

Sets the encoding properties asynchronously for the specified media stream type for the video device.

Gets the local power line frequency.

Sets the local power line frequency.

Properties

Methods

  • GetAvailableMediaStreamProperties(Windows.Media.Capture.MediaStreamType)
    GetAvailableMediaStreamProperties(Windows.Media.Capture.MediaStreamType)
    GetAvailableMediaStreamProperties(Windows.Media.Capture.MediaStreamType)
    GetAvailableMediaStreamProperties(Windows.Media.Capture.MediaStreamType)

    Gets a list of the supported encoding properties for the video device.

    public IVectorView<IMediaEncodingProperties> GetAvailableMediaStreamProperties(Windows.Media.Capture.MediaStreamType)public IVectorView<IMediaEncodingProperties> GetAvailableMediaStreamProperties(Windows.Media.Capture.MediaStreamType)Public Function GetAvailableMediaStreamProperties(Windows.Media.Capture.MediaStreamType) As IVectorView( Of IMediaEncodingProperties )

    Parameters

    Returns

    • A list of the supported encoding properties.

    Remarks

    The encoding properties returned from this method can either be of type VideoEncodingProperties or ImageEncodingProperties, regardless of the stream type you specify. For this reason, you must check the type of each returned IMediaEncodingProperties object and cast to the appropriate type before accessing the properties of the object. The article Set media encoding properties for MediaCapture provides the complete code for a helper class that handles all necessary type-checking and casting for you.

  • GetDeviceProperty(System.String)
    GetDeviceProperty(System.String)
    GetDeviceProperty(System.String)
    GetDeviceProperty(System.String)

    Gets a property on the camera. You can use this method to query properties that are specific to a particular camera.

    public object GetDeviceProperty(System.String)public object GetDeviceProperty(System.String)Public Function GetDeviceProperty(System.String) As object

    Parameters

    • propertyId
      System.String
      System.String
      System.String
      System.String

      The property identifier.

    Returns

    • object
      object
      object
      object

      The property value.

  • GetMediaStreamProperties(Windows.Media.Capture.MediaStreamType)
    GetMediaStreamProperties(Windows.Media.Capture.MediaStreamType)
    GetMediaStreamProperties(Windows.Media.Capture.MediaStreamType)
    GetMediaStreamProperties(Windows.Media.Capture.MediaStreamType)

    Gets the encoding properties for the specified media stream type for the video device.

    public IMediaEncodingProperties GetMediaStreamProperties(Windows.Media.Capture.MediaStreamType)public IMediaEncodingProperties GetMediaStreamProperties(Windows.Media.Capture.MediaStreamType)Public Function GetMediaStreamProperties(Windows.Media.Capture.MediaStreamType) As IMediaEncodingProperties

    Parameters

    Returns

    Remarks

    The encoding properties returned from this method can either be of type VideoEncodingProperties or ImageEncodingProperties, regardless of the stream type you specify. For this reason, you must check the type of each returned IMediaEncodingProperties object and cast to the appropriate type before accessing the properties of the object. The article Set media encoding properties for MediaCapture provides the complete code for a helper class that handles all necessary type-checking and casting for you.

  • SetDeviceProperty(System.String,System.Object)
    SetDeviceProperty(System.String,System.Object)
    SetDeviceProperty(System.String,System.Object)
    SetDeviceProperty(System.String,System.Object)

    Sets a property on the device. You can use this method to set properties that are specific to a particular device.

    public void SetDeviceProperty(System.String,System.Object)public void SetDeviceProperty(System.String,System.Object)Public Function SetDeviceProperty(System.String,System.Object) As void

    Parameters

    • propertyId
      System.String
      System.String
      System.String
      System.String

      The property identifier.

    • propertyValue
      System.Object
      System.Object
      System.Object
      System.Object

      The new value of the property.

  • SetMediaStreamPropertiesAsync(Windows.Media.Capture.MediaStreamType,Windows.Media.MediaProperties.IMediaEncodingProperties)
    SetMediaStreamPropertiesAsync(Windows.Media.Capture.MediaStreamType,Windows.Media.MediaProperties.IMediaEncodingProperties)
    SetMediaStreamPropertiesAsync(Windows.Media.Capture.MediaStreamType,Windows.Media.MediaProperties.IMediaEncodingProperties)
    SetMediaStreamPropertiesAsync(Windows.Media.Capture.MediaStreamType,Windows.Media.MediaProperties.IMediaEncodingProperties)

    Sets the encoding properties asynchronously for the specified media stream type for the video device.

    public IAsyncAction SetMediaStreamPropertiesAsync(Windows.Media.Capture.MediaStreamType,Windows.Media.MediaProperties.IMediaEncodingProperties)public IAsyncAction SetMediaStreamPropertiesAsync(Windows.Media.Capture.MediaStreamType,Windows.Media.MediaProperties.IMediaEncodingProperties)Public Function SetMediaStreamPropertiesAsync(Windows.Media.Capture.MediaStreamType,Windows.Media.MediaProperties.IMediaEncodingProperties) As IAsyncAction

    Parameters

    Returns

    Remarks

    This method sets the properties on the media source, which is the video capture device. This is unlike SetEncodingPropertiesAsync(Windows.Media.Capture.MediaStreamType,Windows.Media.MediaProperties.IMediaEncodingProperties,Windows.Media.MediaProperties.MediaPropertySet), which changes the properties of the media encoding. For this reason, with SetMediaStreamPropertiesAsync you can only set properties and values that are supported natively by the capture device. Get a list of a capture device's supported resolutions, frame rates, and other properties by calling GetAvailableMediaStreamProperties(Windows.Media.Capture.MediaStreamType). The benefit of setting the capture device properties instead of the media encoding is that the device only needs to generate enough data for the specified resolution, which can provide better performance than capturing at a high resolution and then downscaling at another point in the media capture pipeline. For more information, see Set format, resolution, and frame rate for MediaCapture and the Camera Resolution Sample.

  • TryGetPowerlineFrequency(Windows.Media.Capture.PowerlineFrequency)
    TryGetPowerlineFrequency(Windows.Media.Capture.PowerlineFrequency)
    TryGetPowerlineFrequency(Windows.Media.Capture.PowerlineFrequency)
    TryGetPowerlineFrequency(Windows.Media.Capture.PowerlineFrequency)

    Gets the local power line frequency.

    public bool TryGetPowerlineFrequency(Windows.Media.Capture.PowerlineFrequency)public bool TryGetPowerlineFrequency(Windows.Media.Capture.PowerlineFrequency)Public Function TryGetPowerlineFrequency(Windows.Media.Capture.PowerlineFrequency) As bool

    Parameters

    Returns

    • bool
      bool
      bool
      bool

      Returns true if the method succeeded, or false otherwise.

    Remarks

    You can use this method if the camera supports anti-flicker processing for fluorescent lights.

    For how-to guidance for handling powerline frequency, see Manual camera controls for photo and video capture.

  • TrySetPowerlineFrequency(Windows.Media.Capture.PowerlineFrequency)
    TrySetPowerlineFrequency(Windows.Media.Capture.PowerlineFrequency)
    TrySetPowerlineFrequency(Windows.Media.Capture.PowerlineFrequency)
    TrySetPowerlineFrequency(Windows.Media.Capture.PowerlineFrequency)

    Sets the local power line frequency.

    public bool TrySetPowerlineFrequency(Windows.Media.Capture.PowerlineFrequency)public bool TrySetPowerlineFrequency(Windows.Media.Capture.PowerlineFrequency)Public Function TrySetPowerlineFrequency(Windows.Media.Capture.PowerlineFrequency) As bool

    Parameters

    Returns

    • bool
      bool
      bool
      bool

      Returns true if the method succeeded, or false otherwise.

    Remarks

    You can use this method if the camera supports anti-flicker processing for fluorescent lights.

    For how-to guidance for handling powerline frequency, see Manual camera controls for photo and video capture.

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.DualApiPartitionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.ThreadingAttribute
Windows.Foundation.Metadata.ContractVersionAttribute

Details

Assembly

Windows.Media.Devices.dll