Windows Dev Center

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

VideoEncodingProperties.VideoEncodingProperties constructor

Creates a new instance of the VideoEncodingProperties class.

Syntax


var videoEncodingProperties = new Windows.Media.MediaProperties.VideoEncodingProperties();

Parameters

This constructor has no parameters.

Examples

The following example creates an instance of the VideoEncodingProperties class and then sets and gets properties of the class.


function getVideoProperties() {
    var videoProperties = new Windows.Media.MediaProperties.VideoEncodingProperties();
    var props = videoProperties.properties;
    // Remove all values from the property set.
    props.clear();

    var videoType = videoProperties.type;
    var videoSubType = videoProperties.subtype;
    if (videoType === "Video" && videoSubType === "H264") {
        // The format is an H.264 video.
    }
    // Set the bitrate. 
    videoProperties.bitrate = value;

    // Get the frame rate ratio.
    var d_value = videoProperties.frameRate.denominator;
    var n_value = videoProperties.frameRate.numerator;

    // Get the pixel aspect ratio.
    d_value = videoProperties.pixelAspectRatio.denominator;
    n_value = videoProperties.pixelAspectRatio.numerator;

    // Set new height and width.
    videoProperties.height = h_Value;
    videoProperties.width = w_Value;
}


Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Media.MediaProperties
Windows::Media::MediaProperties [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.MediaProperties
Windows::Media::MediaProperties [C++]

Metadata

Windows.winmd

See also

VideoEncodingProperties

 

 

Show:
© 2015 Microsoft