MediaRatio class

Applies to Windows and Windows Phone

Represents ratios used in media operations.

Syntax


public sealed class MediaRatio

Attributes

[DualApiPartition()]
[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]

Members

The MediaRatio class has these types of members:

Methods

The MediaRatio class inherits methods from the Object class (C#/VB/C++).

Properties

The MediaRatio class has these properties.

PropertyAccess typeDescription

Denominator

Read/writeThe denominator of the MediaRatio.

Numerator

Read/writeThe numerator of the MediaRatio.

 

Remarks

This object is not instantiated directly, it is returned by the VideoEncodingProperties.FrameRate and VideoEncodingProperties.PixelAspectRatio properties.

Examples

The following example creates an instance of the VideoEncodingProperties class and then gets an instance of the MediaRatio class from the FrameRate property. The example then gets the denominator and numerator values of the ratio.


function getFrameRate() {
    var videoProperties = new Windows.Media.MediaProperties.VideoEncodingProperties();
    // Get the MediaRatio object.
    var ratio = videoProperties.frameRate;
    // Get the numerator and denominator of the frame rate ratio.
    var d_value = ratio.denominator;
    var n_value = ratio.numerator;
}


Requirements

Minimum supported client

Windows 8 [Windows Store apps, desktop apps]

Minimum supported server

Windows Server 2012 [Windows Store apps, desktop apps]

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

 

 

Show:
© 2014 Microsoft. All rights reserved.