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.

Prerelease. Gets a string containing the identifier for the video device controller.

Methods summary

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

Gets the value of the property with the specified ID from the capture device driver. 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 the value of the property with the specified ID on the capture device driver. You can use this method to set properties that are specific to a particular camera.

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.

Prerelease. Gets the value of the property with the specified ID from the capture device driver, using an extended ID with custom header information and specifying the maximum buffer size required to store the result. You can use this method to query properties that are specific to a particular camera.

Prerelease. Gets a the value of the property from the capture device driver with the ID with custom header information. You can use this method to query properties that are specific to a particular camera.

Prerelease. Sets the value of the property with the specified ID from the capture device driver, using an extended ID with custom header information and and providing the value as a byte array.

Prerelease. Sets the value of the property with the specified ID from the capture device driver, using an extended ID with custom header information and and providing the value as an object.

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 mediaStreamType)public IVectorView<IMediaEncodingProperties> GetAvailableMediaStreamProperties(Windows.Media.Capture.MediaStreamType mediaStreamType)Public Function GetAvailableMediaStreamProperties(mediaStreamType As 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 the value of the property with the specified ID from the capture device driver. You can use this method to query properties that are specific to a particular camera.

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

    Parameters

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

      The identifier of the property for which the value is retrieved.

    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 mediaStreamType)public IMediaEncodingProperties GetMediaStreamProperties(Windows.Media.Capture.MediaStreamType mediaStreamType)Public Function GetMediaStreamProperties(mediaStreamType As 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 the value of the property with the specified ID on the capture device driver. You can use this method to set properties that are specific to a particular camera.

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

    Parameters

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

      The identifier of the property for which the value is set.

    • 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 mediaStreamType,Windows.Media.MediaProperties.IMediaEncodingProperties mediaEncodingProperties)public IAsyncAction SetMediaStreamPropertiesAsync(Windows.Media.Capture.MediaStreamType mediaStreamType,Windows.Media.MediaProperties.IMediaEncodingProperties mediaEncodingProperties)Public Function SetMediaStreamPropertiesAsync(mediaStreamType As Windows.Media.Capture.MediaStreamType,mediaEncodingProperties As 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 value)public bool TryGetPowerlineFrequency(Windows.Media.Capture.PowerlineFrequency value)Public Function TryGetPowerlineFrequency(value As 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 value)public bool TrySetPowerlineFrequency(Windows.Media.Capture.PowerlineFrequency value)Public Function TrySetPowerlineFrequency(value As 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.

  • GetDevicePropertyByExtendedId(System.Byte[],Windows.Foundation.IReference{System.UInt32})
    GetDevicePropertyByExtendedId(System.Byte[],Windows.Foundation.IReference{System.UInt32})
    GetDevicePropertyByExtendedId(System.Byte[],Windows.Foundation.IReference{System.UInt32})
    GetDevicePropertyByExtendedId(System.Byte[],Windows.Foundation.IReference{System.UInt32})

    Prerelease. Gets the value of the property with the specified ID from the capture device driver, using an extended ID with custom header information and specifying the maximum buffer size required to store the result. You can use this method to query properties that are specific to a particular camera.

    public VideoDeviceControllerGetDevicePropertyResult GetDevicePropertyByExtendedId(System.Byte[] extendedPropertyId,Windows.Foundation.IReference{System.UInt32} maxPropertyValueSize)public VideoDeviceControllerGetDevicePropertyResult GetDevicePropertyByExtendedId(System.Byte[] extendedPropertyId,Windows.Foundation.IReference{System.UInt32} maxPropertyValueSize)Public Function GetDevicePropertyByExtendedId(extendedPropertyId As System.Byte[],maxPropertyValueSize As Windows.Foundation.IReference{System.UInt32}) As VideoDeviceControllerGetDevicePropertyResult

    Parameters

    • extendedPropertyId
      System.Byte[]
      System.Byte[]
      System.Byte[]
      System.Byte[]

      A byte array containing the extended identifier data.

    • maxPropertyValueSize

      The size of the buffer that should be allocated to store the result of the operation. If the driver does not require that a size be specified for the returned property, set this value to null. If the size is required, and you do not provide a value, the Status property of the returned VideoDeviceControllerGetDevicePropertyResult object will be MaxPropertyValueSizeRequired. If the value supplied is too small to store the result of the operation, the returned Status object will be MaxPropertyValueSizeTooSmall, which means that you can retry the call with a larger buffer size.

    Returns

  • GetDevicePropertyById(System.String,Windows.Foundation.IReference{System.UInt32})
    GetDevicePropertyById(System.String,Windows.Foundation.IReference{System.UInt32})
    GetDevicePropertyById(System.String,Windows.Foundation.IReference{System.UInt32})
    GetDevicePropertyById(System.String,Windows.Foundation.IReference{System.UInt32})

    Prerelease. Gets a the value of the property from the capture device driver with the ID with custom header information. You can use this method to query properties that are specific to a particular camera.

    public VideoDeviceControllerGetDevicePropertyResult GetDevicePropertyById(System.String propertyId,Windows.Foundation.IReference{System.UInt32} maxPropertyValueSize)public VideoDeviceControllerGetDevicePropertyResult GetDevicePropertyById(System.String propertyId,Windows.Foundation.IReference{System.UInt32} maxPropertyValueSize)Public Function GetDevicePropertyById(propertyId As System.String,maxPropertyValueSize As Windows.Foundation.IReference{System.UInt32}) As VideoDeviceControllerGetDevicePropertyResult

    Parameters

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

      The identifier of the property for which the value is retrieved.

    • maxPropertyValueSize

      The size of the buffer that should be allocated to store the result of the operation. If the driver does not require that a size be specified for the returned property, set this value to null. If the size is required, and you do not provide a value, the Status property of the returned VideoDeviceControllerGetDevicePropertyResult object will be MaxPropertyValueSizeRequired. If the value supplied is too small to store the result of the operation, the returned Status object will be MaxPropertyValueSizeTooSmall, which means that you can retry the call with a larger buffer size.

    Returns

  • SetDevicePropertyByExtendedId(System.Byte[],System.Byte[])
    SetDevicePropertyByExtendedId(System.Byte[],System.Byte[])
    SetDevicePropertyByExtendedId(System.Byte[],System.Byte[])
    SetDevicePropertyByExtendedId(System.Byte[],System.Byte[])

    Prerelease. Sets the value of the property with the specified ID from the capture device driver, using an extended ID with custom header information and and providing the value as a byte array.

    public VideoDeviceControllerSetDevicePropertyStatus SetDevicePropertyByExtendedId(System.Byte[] extendedPropertyId,System.Byte[] propertyValue)public VideoDeviceControllerSetDevicePropertyStatus SetDevicePropertyByExtendedId(System.Byte[] extendedPropertyId,System.Byte[] propertyValue)Public Function SetDevicePropertyByExtendedId(extendedPropertyId As System.Byte[],propertyValue As System.Byte[]) As VideoDeviceControllerSetDevicePropertyStatus

    Parameters

    • extendedPropertyId
      System.Byte[]
      System.Byte[]
      System.Byte[]
      System.Byte[]

      A byte array containing the extended identifier data.

    • propertyValue
      System.Byte[]
      System.Byte[]
      System.Byte[]
      System.Byte[]

      A byte array containing the data to be assigned to the specified property.

    Returns

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

    Prerelease. Sets the value of the property with the specified ID from the capture device driver, using an extended ID with custom header information and and providing the value as an object.

    public VideoDeviceControllerSetDevicePropertyStatus SetDevicePropertyById(System.String propertyId,System.Object propertyValue)public VideoDeviceControllerSetDevicePropertyStatus SetDevicePropertyById(System.String propertyId,System.Object propertyValue)Public Function SetDevicePropertyById(propertyId As System.String,propertyValue As System.Object) As VideoDeviceControllerSetDevicePropertyStatus

    Parameters

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

      A byte array containing the extended identifier data.

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

      An object representing the data to be assigned to the specified property.

    Returns

Attributes

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

Details

Assembly

Windows.Media.Devices.dll