GetMediaStreamProperties | getMediaStreamProperties method
TOC
Collapse the table of content
Expand the table of content

VideoDeviceController.GetMediaStreamProperties | getMediaStreamProperties method

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

Syntax


var iMediaEncodingProperties = videoDeviceController.getMediaStreamProperties(mediaStreamType);

Parameters

mediaStreamType

Type: MediaStreamType

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

Return value

Type: IMediaEncodingProperties

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



IMediaEncodingProperties _properties = 
                _mediaCapture.VideoDeviceController.GetMediaStreamProperties(MediaStreamType.Photo).FirstOrDefault();

if (_properties is ImageEncodingProperties)
{
  _width = (_properties as ImageEncodingProperties).Width;
}
else if (_properties is VideoEncodingProperties)
{
  _width = (_properties as VideoEncodingProperties).Width;
}

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Media.Devices
Windows::Media::Devices [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Media.Devices
Windows::Media::Devices [C++]

Metadata

Windows.winmd

See also

VideoDeviceController
Camera resolution sample (Windows 10)

 

 

Show:
© 2016 Microsoft