Video​Device​Controller Video​Device​Controller Video​Device​Controller Class

Definition

Controls device settings on the camera.

public : sealed class VideoDeviceController : IAdvancedVideoCaptureDeviceController, IAdvancedVideoCaptureDeviceController2, IAdvancedVideoCaptureDeviceController3, IAdvancedVideoCaptureDeviceController4, IAdvancedVideoCaptureDeviceController5, IMediaDeviceController, IVideoDeviceControllerpublic sealed class VideoDeviceController : IAdvancedVideoCaptureDeviceController, IAdvancedVideoCaptureDeviceController2, IAdvancedVideoCaptureDeviceController3, IAdvancedVideoCaptureDeviceController4, IAdvancedVideoCaptureDeviceController5, IMediaDeviceController, IVideoDeviceControllerPublic NotInheritable Class VideoDeviceController Implements IAdvancedVideoCaptureDeviceController, IAdvancedVideoCaptureDeviceController2, IAdvancedVideoCaptureDeviceController3, IAdvancedVideoCaptureDeviceController4, IAdvancedVideoCaptureDeviceController5, IMediaDeviceController, IVideoDeviceController
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

To get an instance of this object, retrieve the MediaCapture.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

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 AdvancedPhotoControl
Value
AdvancedPhotoControl AdvancedPhotoControl AdvancedPhotoControl

The advanced photo capture control

Attributes

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 MediaDeviceControl
Value
MediaDeviceControl MediaDeviceControl MediaDeviceControl

A MediaDeviceControl object that provides methods to get and set the back-light compensation.

Attributes

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.

See Also

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 MediaDeviceControl
Value
MediaDeviceControl MediaDeviceControl MediaDeviceControl

A MediaDeviceControl object that provides methods to get and set the brightness.

Attributes

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.

See Also

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 MediaDeviceControl
Value
MediaDeviceControl MediaDeviceControl MediaDeviceControl

A MediaDeviceControl object that provides methods to get and set the contrast.

Attributes

Remarks

Contrast is specified as a gain factor multiplied by 100.

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

See Also

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 MediaCaptureOptimization
Value
MediaCaptureOptimization MediaCaptureOptimization MediaCaptureOptimization

A value that indicates the optimizations the capture device should use.

Attributes

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 MediaDeviceControl
Value
MediaDeviceControl MediaDeviceControl MediaDeviceControl

A MediaDeviceControl object that provides methods to get and set the exposure time.

Attributes

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.

See Also

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 ExposureCompensationControl
Attributes

ExposureControl ExposureControl ExposureControl

Gets the exposure control for this video device.

public : ExposureControl ExposureControl { get; }public ExposureControl ExposureControl { get; }Public ReadOnly Property ExposureControl As ExposureControl
Value
ExposureControl ExposureControl ExposureControl

The exposure control.

Attributes

ExposurePriorityVideoControl ExposurePriorityVideoControl ExposurePriorityVideoControl

Gets the ExposurePriorityVideoControl associated with the VideoDeviceController.

public : ExposurePriorityVideoControl ExposurePriorityVideoControl { get; }public ExposurePriorityVideoControl ExposurePriorityVideoControl { get; }Public ReadOnly Property ExposurePriorityVideoControl As ExposurePriorityVideoControl
Attributes

FlashControl FlashControl FlashControl

Gets the flash control for this video device.

public : FlashControl FlashControl { get; }public FlashControl FlashControl { get; }Public ReadOnly Property FlashControl As FlashControl
Value
FlashControl FlashControl FlashControl

The flash control.

Attributes

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 MediaDeviceControl
Value
MediaDeviceControl MediaDeviceControl MediaDeviceControl

A MediaDeviceControl object that provides methods to get and set the focus.

Attributes

Remarks

Focus is specified in millimeters.

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

See Also

FocusControl FocusControl FocusControl

Gets the focus control for this video device.

public : FocusControl FocusControl { get; }public FocusControl FocusControl { get; }Public ReadOnly Property FocusControl As FocusControl
Value
FocusControl FocusControl FocusControl

The focus control.

Attributes

HdrVideoControl HdrVideoControl HdrVideoControl

Gets the HdrVideoControl associated with the VideoDeviceController.

public : HdrVideoControl HdrVideoControl { get; }public HdrVideoControl HdrVideoControl { get; }Public ReadOnly Property HdrVideoControl As HdrVideoControl
Attributes

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 MediaDeviceControl
Value
MediaDeviceControl MediaDeviceControl MediaDeviceControl

A MediaDeviceControl object that provides methods to get and set the hue.

Attributes

Remarks

Hue is specified in degrees multiplied by 100.

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

See Also

Id Id Id

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

public : PlatForm::String Id { get; }public string Id { get; }Public ReadOnly Property Id As string
Value
PlatForm::String string string

The identifier for the video device controller.

Attributes
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

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 IsoSpeedControl
Value
IsoSpeedControl IsoSpeedControl IsoSpeedControl

The ISO film speed control.

Attributes

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 LowLagPhotoControl
Value
LowLagPhotoControl LowLagPhotoControl LowLagPhotoControl

The low shutter lag photo control.

Attributes

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 LowLagPhotoSequenceControl
Attributes

OpticalImageStabilizationControl OpticalImageStabilizationControl OpticalImageStabilizationControl

Gets the OpticalImageStabilizationControl associated with the VideoDeviceController.

public : OpticalImageStabilizationControl OpticalImageStabilizationControl { get; }public OpticalImageStabilizationControl OpticalImageStabilizationControl { get; }Public ReadOnly Property OpticalImageStabilizationControl As OpticalImageStabilizationControl
Attributes

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 MediaDeviceControl
Value
MediaDeviceControl MediaDeviceControl MediaDeviceControl

A MediaDeviceControl object that provides methods to get and set the pan.

Attributes

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.

See Also

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 PhotoConfirmationControl
Value
PhotoConfirmationControl PhotoConfirmationControl PhotoConfirmationControl

The photo confirmation control for this video device.

Attributes

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 CaptureUse
Value
CaptureUse CaptureUse CaptureUse

The primary use for the device.

Attributes

Remarks

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

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 RegionsOfInterestControl
Attributes

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 MediaDeviceControl
Value
MediaDeviceControl MediaDeviceControl MediaDeviceControl

A MediaDeviceControl object that provides methods to get and set the roll.

Attributes

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.

See Also

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 SceneModeControl
Value
SceneModeControl SceneModeControl SceneModeControl

The scene mode control.

Attributes

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 MediaDeviceControl
Value
MediaDeviceControl MediaDeviceControl MediaDeviceControl

A MediaDeviceControl object that provides methods to get and set the tilt.

Attributes

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.

See Also

TorchControl TorchControl TorchControl

Gets the torch control for this video device.

public : TorchControl TorchControl { get; }public TorchControl TorchControl { get; }Public ReadOnly Property TorchControl As TorchControl
Value
TorchControl TorchControl TorchControl

The torch control.

Attributes

VariablePhotoSequenceController VariablePhotoSequenceController VariablePhotoSequenceController

Gets the VariablePhotoSequenceController associated with the VideoDeviceController.

public : VariablePhotoSequenceController VariablePhotoSequenceController { get; }public VariablePhotoSequenceController VariablePhotoSequenceController { get; }Public ReadOnly Property VariablePhotoSequenceController As VariablePhotoSequenceController
Attributes

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 MediaDeviceControl
Value
MediaDeviceControl MediaDeviceControl MediaDeviceControl

A MediaDeviceControl object that provides methods to get and set the white balance.

Attributes

Remarks

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

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

See Also

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 WhiteBalanceControl
Attributes

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 MediaDeviceControl
Value
MediaDeviceControl MediaDeviceControl MediaDeviceControl

A MediaDeviceControl object that provides methods to get and set the zoom.

Attributes

Remarks

Zoom is specified in millimeters.

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

See Also

ZoomControl ZoomControl ZoomControl

Gets the ZoomControl associated with the VideoDeviceController.

public : ZoomControl ZoomControl { get; }public ZoomControl ZoomControl { get; }Public ReadOnly Property ZoomControl As ZoomControl
Attributes

Methods

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 IReadOnlyList<IMediaEncodingProperties> GetAvailableMediaStreamProperties(MediaStreamType mediaStreamType)Public Function GetAvailableMediaStreamProperties(mediaStreamType As MediaStreamType) As IReadOnlyList( Of IMediaEncodingProperties )
Parameters
mediaStreamType
MediaStreamType MediaStreamType MediaStreamType

The type of media stream for which to get the properties.

Returns
IVectorView<IMediaEncodingProperties> IReadOnlyList<IMediaEncodingProperties> IReadOnlyList<IMediaEncodingProperties>

A list of the supported encoding properties.

Attributes

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.

See Also

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 : PlatForm::Object GetDeviceProperty(PlatForm::String propertyId)public object GetDeviceProperty(String propertyId)Public Function GetDeviceProperty(propertyId As String) As object
Parameters
propertyId
PlatForm::String String String

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

Returns
PlatForm::Object object object

The property value.

Attributes
See Also

GetDevicePropertyByExtendedId(Byte[], IReference<UInt32>) GetDevicePropertyByExtendedId(Byte[], IReference<UInt32>) GetDevicePropertyByExtendedId(Byte[], IReference<UInt32>)

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<unsigned int> maxPropertyValueSize)public VideoDeviceControllerGetDevicePropertyResult GetDevicePropertyByExtendedId(Byte[] extendedPropertyId, Nullable<UInt32> maxPropertyValueSize)Public Function GetDevicePropertyByExtendedId(extendedPropertyId As Byte[], maxPropertyValueSize As Nullable<UInt32>) As VideoDeviceControllerGetDevicePropertyResult
Parameters
extendedPropertyId
Byte[] Byte[] Byte[]

A byte array containing the extended identifier data.

maxPropertyValueSize
IReference<unsigned int> Nullable<UInt32> Nullable<UInt32>

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
Attributes
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

GetDevicePropertyById(String, IReference<UInt32>) GetDevicePropertyById(String, IReference<UInt32>) GetDevicePropertyById(String, IReference<UInt32>)

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(PlatForm::String propertyId, IReference<unsigned int> maxPropertyValueSize)public VideoDeviceControllerGetDevicePropertyResult GetDevicePropertyById(String propertyId, Nullable<UInt32> maxPropertyValueSize)Public Function GetDevicePropertyById(propertyId As String, maxPropertyValueSize As Nullable<UInt32>) As VideoDeviceControllerGetDevicePropertyResult
Parameters
propertyId
PlatForm::String String String

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

maxPropertyValueSize
IReference<unsigned int> Nullable<UInt32> Nullable<UInt32>

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
Attributes
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

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 IMediaEncodingProperties
Parameters
mediaStreamType
MediaStreamType MediaStreamType MediaStreamType

The type of media stream for which to get the properties.

Returns
Attributes

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.

See Also

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

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

propertyValue
PlatForm::Object Object Object

The new value of the property.

Attributes
See Also

SetDevicePropertyByExtendedId(Byte[], Byte[]) SetDevicePropertyByExtendedId(Byte[], Byte[]) SetDevicePropertyByExtendedId(Byte[], Byte[])

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 VideoDeviceControllerSetDevicePropertyStatus
Parameters
extendedPropertyId
Byte[] Byte[] Byte[]

A byte array containing the extended identifier data.

propertyValue
Byte[] Byte[] Byte[]

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

Returns
Attributes
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

SetDevicePropertyById(String, Object) SetDevicePropertyById(String, Object) SetDevicePropertyById(String, Object)

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

A byte array containing the extended identifier data.

propertyValue
PlatForm::Object Object Object

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

Returns
Attributes
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

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 IAsyncAction
Parameters
mediaStreamType
MediaStreamType MediaStreamType MediaStreamType

The type of media stream for which to set the properties.

mediaEncodingProperties
IMediaEncodingProperties IMediaEncodingProperties IMediaEncodingProperties

The encoding properties to set.

Returns

An IAsyncAction object that is used to control the asynchronous operation.

Attributes

Remarks

This method sets the properties on the media source, which is the video capture device. This is unlike MediaCapture.SetEncodingPropertiesAsync, 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. 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.

See Also

TryGetPowerlineFrequency(PowerlineFrequency) TryGetPowerlineFrequency(PowerlineFrequency) TryGetPowerlineFrequency(PowerlineFrequency)

Gets the local power line frequency.

public : PlatForm::Boolean TryGetPowerlineFrequency(PowerlineFrequency value)public bool TryGetPowerlineFrequency(PowerlineFrequency value)Public Function TryGetPowerlineFrequency(value As PowerlineFrequency) As bool
Parameters
value
PowerlineFrequency PowerlineFrequency PowerlineFrequency

The power line frequency.

Returns
PlatForm::Boolean bool bool

Returns true if the method succeeded, or false otherwise.

Attributes

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.

See Also

TrySetPowerlineFrequency(PowerlineFrequency) TrySetPowerlineFrequency(PowerlineFrequency) TrySetPowerlineFrequency(PowerlineFrequency)

Sets the local power line frequency.

public : PlatForm::Boolean TrySetPowerlineFrequency(PowerlineFrequency value)public bool TrySetPowerlineFrequency(PowerlineFrequency value)Public Function TrySetPowerlineFrequency(value As PowerlineFrequency) As bool
Parameters
value
PowerlineFrequency PowerlineFrequency PowerlineFrequency

The power line frequency.

Returns
PlatForm::Boolean bool bool

Returns true if the method succeeded, or false otherwise.

Attributes

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.

See Also