VideoDeviceController VideoDeviceController VideoDeviceController VideoDeviceController Class

Controls device settings on the camera.

Syntax

Declaration

public sealed class VideoDeviceControllerpublic sealed class VideoDeviceControllerPublic NotInheritable Class VideoDeviceControllerpublic sealed 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.

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

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 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.

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.

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.

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.

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

  • AdvancedPhotoControl
    AdvancedPhotoControl
    AdvancedPhotoControl
    AdvancedPhotoControl

    Gets the advanced photo capture control for this video device.

    public AdvancedPhotoControl AdvancedPhotoControl { get; }public AdvancedPhotoControl AdvancedPhotoControl { get; }Public ReadOnly Property AdvancedPhotoControl As AdvancedPhotoControlpublic AdvancedPhotoControl AdvancedPhotoControl { get; }

    Property Value

  • BacklightCompensation
    BacklightCompensation
    BacklightCompensation
    BacklightCompensation

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

    public MediaDeviceControl BacklightCompensation { get; }public MediaDeviceControl BacklightCompensation { get; }Public ReadOnly Property BacklightCompensation As MediaDeviceControlpublic MediaDeviceControl BacklightCompensation { get; }

    Property Value

    Remarks

    If the value is 1, back-light compensation is enabled. If the value is 0, back-light compensation is disabled.

    For more information on getting or setting this value, see MediaDeviceControl.

  • Brightness
    Brightness
    Brightness
    Brightness

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

    public MediaDeviceControl Brightness { get; }public MediaDeviceControl Brightness { get; }Public ReadOnly Property Brightness As MediaDeviceControlpublic MediaDeviceControl Brightness { get; }

    Property Value

    Remarks

    For NTSC sources, brightness is expressed in IRE units multiplied by 100. For non-NTSC sources, the units are arbitrary, with 0 representing blanking and 10000 representing pure white.

    For more information on getting or setting this value, see MediaDeviceControl.

  • Contrast
    Contrast
    Contrast
    Contrast

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

    public MediaDeviceControl Contrast { get; }public MediaDeviceControl Contrast { get; }Public ReadOnly Property Contrast As MediaDeviceControlpublic MediaDeviceControl Contrast { get; }

    Property Value

    Remarks

    Contrast is specified as a gain factor multiplied by 100.

    For more information on getting or setting this value, see MediaDeviceControl.

  • DesiredOptimization
    DesiredOptimization
    DesiredOptimization
    DesiredOptimization

    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.

    public MediaCaptureOptimization DesiredOptimization { get; set; }public MediaCaptureOptimization DesiredOptimization { get; set; }Public ReadWrite Property DesiredOptimization As MediaCaptureOptimizationpublic MediaCaptureOptimization DesiredOptimization { get; set; }

    Property Value

  • Exposure
    Exposure
    Exposure
    Exposure

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

    public MediaDeviceControl Exposure { get; }public MediaDeviceControl Exposure { get; }Public ReadOnly Property Exposure As MediaDeviceControlpublic MediaDeviceControl Exposure { get; }

    Property Value

    Remarks

    Exposure is specified in log base 2 seconds. For values less than zero, the exposure time is 1/(2n) seconds. For values of zero and above, the exposure time is 2n seconds.

    For more information on getting or setting this value, see MediaDeviceControl.

  • ExposureCompensationControl
    ExposureCompensationControl
    ExposureCompensationControl
    ExposureCompensationControl

    Gets the exposure compensation control for this video device.

    public ExposureCompensationControl ExposureCompensationControl { get; }public ExposureCompensationControl ExposureCompensationControl { get; }Public ReadOnly Property ExposureCompensationControl As ExposureCompensationControlpublic ExposureCompensationControl ExposureCompensationControl { get; }

    Property Value

  • ExposureControl
    ExposureControl
    ExposureControl
    ExposureControl

    Gets the exposure control for this video device.

    public ExposureControl ExposureControl { get; }public ExposureControl ExposureControl { get; }Public ReadOnly Property ExposureControl As ExposureControlpublic ExposureControl ExposureControl { get; }

    Property Value

  • ExposurePriorityVideoControl
    ExposurePriorityVideoControl
    ExposurePriorityVideoControl
    ExposurePriorityVideoControl

    Gets the ExposurePriorityVideoControl associated with the VideoDeviceController.

    public ExposurePriorityVideoControl ExposurePriorityVideoControl { get; }public ExposurePriorityVideoControl ExposurePriorityVideoControl { get; }Public ReadOnly Property ExposurePriorityVideoControl As ExposurePriorityVideoControlpublic ExposurePriorityVideoControl ExposurePriorityVideoControl { get; }

    Property Value

  • FlashControl
    FlashControl
    FlashControl
    FlashControl

    Gets the flash control for this video device.

    public FlashControl FlashControl { get; }public FlashControl FlashControl { get; }Public ReadOnly Property FlashControl As FlashControlpublic FlashControl FlashControl { get; }

    Property Value

  • Focus
    Focus
    Focus
    Focus

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

    public MediaDeviceControl Focus { get; }public MediaDeviceControl Focus { get; }Public ReadOnly Property Focus As MediaDeviceControlpublic MediaDeviceControl Focus { get; }

    Property Value

    Remarks

    Focus is specified in millimeters.

    For more information on getting or setting this value, see MediaDeviceControl.

  • FocusControl
    FocusControl
    FocusControl
    FocusControl

    Gets the focus control for this video device.

    public FocusControl FocusControl { get; }public FocusControl FocusControl { get; }Public ReadOnly Property FocusControl As FocusControlpublic FocusControl FocusControl { get; }

    Property Value

  • HdrVideoControl
    HdrVideoControl
    HdrVideoControl
    HdrVideoControl

    Gets the HdrVideoControl associated with the VideoDeviceController.

    public HdrVideoControl HdrVideoControl { get; }public HdrVideoControl HdrVideoControl { get; }Public ReadOnly Property HdrVideoControl As HdrVideoControlpublic HdrVideoControl HdrVideoControl { get; }

    Property Value

  • Hue
    Hue
    Hue
    Hue

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

    public MediaDeviceControl Hue { get; }public MediaDeviceControl Hue { get; }Public ReadOnly Property Hue As MediaDeviceControlpublic MediaDeviceControl Hue { get; }

    Property Value

    Remarks

    Hue is specified in degrees multiplied by 100.

    For more information on getting or setting this value, see MediaDeviceControl.

  • Id
    Id
    Id
    Id

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

    public string Id { get; }public string Id { get; }Public ReadOnly Property Id As stringpublic string Id { get; }

    Property Value

    • string
      string
      string
      string

      The identifier for the video device controller.

  • IsoSpeedControl
    IsoSpeedControl
    IsoSpeedControl
    IsoSpeedControl

    Gets the ISO film speed control for this video device.

    public IsoSpeedControl IsoSpeedControl { get; }public IsoSpeedControl IsoSpeedControl { get; }Public ReadOnly Property IsoSpeedControl As IsoSpeedControlpublic IsoSpeedControl IsoSpeedControl { get; }

    Property Value

  • LowLagPhoto
    LowLagPhoto
    LowLagPhoto
    LowLagPhoto

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

    public LowLagPhotoControl LowLagPhoto { get; }public LowLagPhotoControl LowLagPhoto { get; }Public ReadOnly Property LowLagPhoto As LowLagPhotoControlpublic LowLagPhotoControl LowLagPhoto { get; }

    Property Value

  • LowLagPhotoSequence
    LowLagPhotoSequence
    LowLagPhotoSequence
    LowLagPhotoSequence

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

    public LowLagPhotoSequenceControl LowLagPhotoSequence { get; }public LowLagPhotoSequenceControl LowLagPhotoSequence { get; }Public ReadOnly Property LowLagPhotoSequence As LowLagPhotoSequenceControlpublic LowLagPhotoSequenceControl LowLagPhotoSequence { get; }

    Property Value

  • OpticalImageStabilizationControl
    OpticalImageStabilizationControl
    OpticalImageStabilizationControl
    OpticalImageStabilizationControl

    Gets the OpticalImageStabilizationControl associated with the VideoDeviceController.

    public OpticalImageStabilizationControl OpticalImageStabilizationControl { get; }public OpticalImageStabilizationControl OpticalImageStabilizationControl { get; }Public ReadOnly Property OpticalImageStabilizationControl As OpticalImageStabilizationControlpublic OpticalImageStabilizationControl OpticalImageStabilizationControl { get; }

    Property Value

  • Pan
    Pan
    Pan
    Pan

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

    public MediaDeviceControl Pan { get; }public MediaDeviceControl Pan { get; }Public ReadOnly Property Pan As MediaDeviceControlpublic MediaDeviceControl Pan { get; }

    Property Value

    Remarks

    Pan is rotation around the base of the camera (the camera's Y axis). Pan is specified in degrees.

    For more information on getting or setting this value, see MediaDeviceControl.

  • PhotoConfirmationControl
    PhotoConfirmationControl
    PhotoConfirmationControl
    PhotoConfirmationControl

    Gets the photo confirmation control for this video device.

    public PhotoConfirmationControl PhotoConfirmationControl { get; }public PhotoConfirmationControl PhotoConfirmationControl { get; }Public ReadOnly Property PhotoConfirmationControl As PhotoConfirmationControlpublic PhotoConfirmationControl PhotoConfirmationControl { get; }

    Property Value

  • PrimaryUse
    PrimaryUse
    PrimaryUse
    PrimaryUse

    Gets or sets the primary use for the device.

    public CaptureUse PrimaryUse { get; set; }public CaptureUse PrimaryUse { get; set; }Public ReadWrite Property PrimaryUse As CaptureUsepublic CaptureUse PrimaryUse { get; set; }

    Property Value

    Remarks

    This property enables device to make optimization based on the intended use for the device.

  • RegionsOfInterestControl
    RegionsOfInterestControl
    RegionsOfInterestControl
    RegionsOfInterestControl

    Gets the regions of interest control for this video device.

    public RegionsOfInterestControl RegionsOfInterestControl { get; }public RegionsOfInterestControl RegionsOfInterestControl { get; }Public ReadOnly Property RegionsOfInterestControl As RegionsOfInterestControlpublic RegionsOfInterestControl RegionsOfInterestControl { get; }

    Property Value

  • Roll
    Roll
    Roll
    Roll

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

    public MediaDeviceControl Roll { get; }public MediaDeviceControl Roll { get; }Public ReadOnly Property Roll As MediaDeviceControlpublic MediaDeviceControl Roll { get; }

    Property Value

    Remarks

    Roll is rotation around the camera's image-viewing axis. Roll is specified in degrees.

    For more information on getting or setting this value, see MediaDeviceControl.

  • SceneModeControl
    SceneModeControl
    SceneModeControl
    SceneModeControl

    Gets the scene mode control for this video device.

    public SceneModeControl SceneModeControl { get; }public SceneModeControl SceneModeControl { get; }Public ReadOnly Property SceneModeControl As SceneModeControlpublic SceneModeControl SceneModeControl { get; }

    Property Value

  • Tilt
    Tilt
    Tilt
    Tilt

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

    public MediaDeviceControl Tilt { get; }public MediaDeviceControl Tilt { get; }Public ReadOnly Property Tilt As MediaDeviceControlpublic MediaDeviceControl Tilt { get; }

    Property Value

    Remarks

    Tilt points the camera's imaging plane up or down. Tilt is specified in degrees.

    For more information on getting or setting this value, see MediaDeviceControl.

  • TorchControl
    TorchControl
    TorchControl
    TorchControl

    Gets the torch control for this video device.

    public TorchControl TorchControl { get; }public TorchControl TorchControl { get; }Public ReadOnly Property TorchControl As TorchControlpublic TorchControl TorchControl { get; }

    Property Value

  • VariablePhotoSequenceController
    VariablePhotoSequenceController
    VariablePhotoSequenceController
    VariablePhotoSequenceController

    Gets the VariablePhotoSequenceController associated with the VideoDeviceController.

    public VariablePhotoSequenceController VariablePhotoSequenceController { get; }public VariablePhotoSequenceController VariablePhotoSequenceController { get; }Public ReadOnly Property VariablePhotoSequenceController As VariablePhotoSequenceControllerpublic VariablePhotoSequenceController VariablePhotoSequenceController { get; }

    Property Value

  • WhiteBalance
    WhiteBalance
    WhiteBalance
    WhiteBalance

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

    public MediaDeviceControl WhiteBalance { get; }public MediaDeviceControl WhiteBalance { get; }Public ReadOnly Property WhiteBalance As MediaDeviceControlpublic MediaDeviceControl WhiteBalance { get; }

    Property Value

    Remarks

    White balance is specified as a color temperature in degrees Kelvin.

    For more information on getting or setting this value, see MediaDeviceControl.

  • WhiteBalanceControl
    WhiteBalanceControl
    WhiteBalanceControl
    WhiteBalanceControl

    Gets the white balance control for this video device.

    public WhiteBalanceControl WhiteBalanceControl { get; }public WhiteBalanceControl WhiteBalanceControl { get; }Public ReadOnly Property WhiteBalanceControl As WhiteBalanceControlpublic WhiteBalanceControl WhiteBalanceControl { get; }

    Property Value

  • Zoom
    Zoom
    Zoom
    Zoom

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

    public MediaDeviceControl Zoom { get; }public MediaDeviceControl Zoom { get; }Public ReadOnly Property Zoom As MediaDeviceControlpublic MediaDeviceControl Zoom { get; }

    Property Value

    Remarks

    Zoom is specified in millimeters.

    For more information on getting or setting this value, see MediaDeviceControl.

  • ZoomControl
    ZoomControl
    ZoomControl
    ZoomControl

    Gets the ZoomControl associated with the VideoDeviceController.

    public ZoomControl ZoomControl { get; }public ZoomControl ZoomControl { get; }Public ReadOnly Property ZoomControl As ZoomControlpublic ZoomControl ZoomControl { get; }

    Property Value

Methods

  • GetAvailableMediaStreamProperties(MediaStreamType)
    GetAvailableMediaStreamProperties(MediaStreamType)
    GetAvailableMediaStreamProperties(MediaStreamType)
    GetAvailableMediaStreamProperties(MediaStreamType)

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

    public IVectorView<IMediaEncodingProperties> GetAvailableMediaStreamProperties(MediaStreamType mediaStreamType)public IVectorView<IMediaEncodingProperties> GetAvailableMediaStreamProperties(MediaStreamType mediaStreamType)Public Function GetAvailableMediaStreamProperties(mediaStreamType As MediaStreamType) As IVectorView( Of IMediaEncodingProperties )public IVectorView<IMediaEncodingProperties> GetAvailableMediaStreamProperties(MediaStreamType mediaStreamType)

    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(String)
    GetDeviceProperty(String)
    GetDeviceProperty(String)
    GetDeviceProperty(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(String propertyId)public object GetDeviceProperty(String propertyId)Public Function GetDeviceProperty(propertyId As String) As objectpublic object GetDeviceProperty(String propertyId)

    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.

  • GetDevicePropertyByExtendedId(Byte[], IReference<UInt32>)
    GetDevicePropertyByExtendedId(Byte[], IReference<UInt32>)
    GetDevicePropertyByExtendedId(Byte[], IReference<UInt32>)
    GetDevicePropertyByExtendedId(Byte[], IReference<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(Byte[] extendedPropertyId, IReference<UInt32> maxPropertyValueSize)public VideoDeviceControllerGetDevicePropertyResult GetDevicePropertyByExtendedId(Byte[] extendedPropertyId, IReference<UInt32> maxPropertyValueSize)Public Function GetDevicePropertyByExtendedId(extendedPropertyId As Byte[], maxPropertyValueSize As IReference<UInt32>) As VideoDeviceControllerGetDevicePropertyResultpublic VideoDeviceControllerGetDevicePropertyResult GetDevicePropertyByExtendedId(Byte[] extendedPropertyId, IReference<UInt32> maxPropertyValueSize)

    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(String, IReference<UInt32>)
    GetDevicePropertyById(String, IReference<UInt32>)
    GetDevicePropertyById(String, IReference<UInt32>)
    GetDevicePropertyById(String, IReference<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(String propertyId, IReference<UInt32> maxPropertyValueSize)public VideoDeviceControllerGetDevicePropertyResult GetDevicePropertyById(String propertyId, IReference<UInt32> maxPropertyValueSize)Public Function GetDevicePropertyById(propertyId As String, maxPropertyValueSize As IReference<UInt32>) As VideoDeviceControllerGetDevicePropertyResultpublic VideoDeviceControllerGetDevicePropertyResult GetDevicePropertyById(String propertyId, IReference<UInt32> maxPropertyValueSize)

    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

  • GetMediaStreamProperties(MediaStreamType)
    GetMediaStreamProperties(MediaStreamType)
    GetMediaStreamProperties(MediaStreamType)
    GetMediaStreamProperties(MediaStreamType)

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

    public IMediaEncodingProperties GetMediaStreamProperties(MediaStreamType mediaStreamType)public IMediaEncodingProperties GetMediaStreamProperties(MediaStreamType mediaStreamType)Public Function GetMediaStreamProperties(mediaStreamType As MediaStreamType) As IMediaEncodingPropertiespublic IMediaEncodingProperties GetMediaStreamProperties(MediaStreamType mediaStreamType)

    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(String, Object)
    SetDeviceProperty(String, Object)
    SetDeviceProperty(String, Object)
    SetDeviceProperty(String, 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(String propertyId, Object propertyValue)public void SetDeviceProperty(String propertyId, Object propertyValue)Public Function SetDeviceProperty(propertyId As String, propertyValue As Object) As voidpublic void SetDeviceProperty(String propertyId, Object propertyValue)

    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.

  • SetDevicePropertyByExtendedId(Byte[], Byte[])
    SetDevicePropertyByExtendedId(Byte[], Byte[])
    SetDevicePropertyByExtendedId(Byte[], Byte[])
    SetDevicePropertyByExtendedId(Byte[], 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(Byte[] extendedPropertyId, Byte[] propertyValue)public VideoDeviceControllerSetDevicePropertyStatus SetDevicePropertyByExtendedId(Byte[] extendedPropertyId, Byte[] propertyValue)Public Function SetDevicePropertyByExtendedId(extendedPropertyId As Byte[], propertyValue As Byte[]) As VideoDeviceControllerSetDevicePropertyStatuspublic VideoDeviceControllerSetDevicePropertyStatus SetDevicePropertyByExtendedId(Byte[] extendedPropertyId, Byte[] propertyValue)

    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(String, Object)
    SetDevicePropertyById(String, Object)
    SetDevicePropertyById(String, Object)
    SetDevicePropertyById(String, 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(String propertyId, Object propertyValue)public VideoDeviceControllerSetDevicePropertyStatus SetDevicePropertyById(String propertyId, Object propertyValue)Public Function SetDevicePropertyById(propertyId As String, propertyValue As Object) As VideoDeviceControllerSetDevicePropertyStatuspublic VideoDeviceControllerSetDevicePropertyStatus SetDevicePropertyById(String propertyId, Object propertyValue)

    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

  • SetMediaStreamPropertiesAsync(MediaStreamType, IMediaEncodingProperties)
    SetMediaStreamPropertiesAsync(MediaStreamType, IMediaEncodingProperties)
    SetMediaStreamPropertiesAsync(MediaStreamType, IMediaEncodingProperties)
    SetMediaStreamPropertiesAsync(MediaStreamType, IMediaEncodingProperties)

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

    public IAsyncAction SetMediaStreamPropertiesAsync(MediaStreamType mediaStreamType, IMediaEncodingProperties mediaEncodingProperties)public IAsyncAction SetMediaStreamPropertiesAsync(MediaStreamType mediaStreamType, IMediaEncodingProperties mediaEncodingProperties)Public Function SetMediaStreamPropertiesAsync(mediaStreamType As MediaStreamType, mediaEncodingProperties As IMediaEncodingProperties) As IAsyncActionpublic IAsyncAction SetMediaStreamPropertiesAsync(MediaStreamType mediaStreamType, IMediaEncodingProperties mediaEncodingProperties)

    Parameters

    Returns

    Remarks

    This method sets the properties on the media source, which is the video capture device. This is unlike SetEncodingPropertiesAsync(MediaStreamType, IMediaEncodingProperties, 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(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(PowerlineFrequency)
    TryGetPowerlineFrequency(PowerlineFrequency)
    TryGetPowerlineFrequency(PowerlineFrequency)
    TryGetPowerlineFrequency(PowerlineFrequency)

    Gets the local power line frequency.

    public bool TryGetPowerlineFrequency(PowerlineFrequency value)public bool TryGetPowerlineFrequency(PowerlineFrequency value)Public Function TryGetPowerlineFrequency(value As PowerlineFrequency) As boolpublic bool TryGetPowerlineFrequency(PowerlineFrequency value)

    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(PowerlineFrequency)
    TrySetPowerlineFrequency(PowerlineFrequency)
    TrySetPowerlineFrequency(PowerlineFrequency)
    TrySetPowerlineFrequency(PowerlineFrequency)

    Sets the local power line frequency.

    public bool TrySetPowerlineFrequency(PowerlineFrequency value)public bool TrySetPowerlineFrequency(PowerlineFrequency value)Public Function TrySetPowerlineFrequency(value As PowerlineFrequency) As boolpublic bool TrySetPowerlineFrequency(PowerlineFrequency value)

    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.ContractVersionAttribute
Windows.Foundation.Metadata.DualApiPartitionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.ThreadingAttribute

Details

Assembly

Windows.Media.Devices.dll