This topic has not yet been rated - Rate this topic

MediaEncodingProfile.MediaEncodingProfile constructor

Creates a new instance of the MediaEncodingProfile class.

Syntax


var mediaEncodingProfile = new Windows.Media.MediaProperties.MediaEncodingProfile();

Parameters

This constructor has no parameters.

Examples

The following example creates an instance of the MediaEncodingProfile class and gets the encoding properties for the audio stream, the media container, and the video stream.


function getAudioProperties() {
    var mediaProfile = new Windows.Media.MediaProperties.MediaEncodingProfile();

    // Get the encoding properties for the audio stream.
    var audioProps = mediaProfile.audio;
    // Set the channel count.
    audioProps.channelCount = count;

    // Get the encoding properties for the media container.
    var containerProps = mediaProfile.container;
    // Set the container subtype.
    containerProps.subtype = "MP3";

    // Get the encoding properties for the video stream.
    var videoProps = mediaProfile.video;
    // Get the frame rate.
    var d_value = videoProps.frameRate.denominator;
    var n_value = videoProps.frameRate.numerator;

}


Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Namespace

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

Metadata

Windows.winmd

See also

MediaEncodingProfile

 

 

Build date: 12/4/2012

© 2013 Microsoft. All rights reserved.