Skip to content
v2.278.0

Experimental

@aws-cdk/aws-medialive-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

PixelAspectRatio Class ​

The pixel aspect ratio (PAR) of the video.

Use the predefined constants for standard ratios, or {@link PixelAspectRatio.of} for a custom ratio.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as medialive_alpha from '@aws-cdk/aws-medialive-alpha';
const pixelAspectRatio = medialive_alpha.PixelAspectRatio.of(123, 123);
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_medialive_alpha as medialive_alpha

pixel_aspect_ratio = medialive_alpha.PixelAspectRatio.of(123, 123)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.medialive.alpha.*;

PixelAspectRatio pixelAspectRatio = PixelAspectRatio.of(123, 123);
csharp
// Install: dotnet add package Amazon.CDK.AWS.MediaLive.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.MediaLive.Alpha;

var pixelAspectRatio = PixelAspectRatio.Of(123, 123);
go
// Install: go get github.com/aws/aws-cdk-go/awsmedialivealpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import medialive_alpha "github.com/aws/aws-cdk-go/awsmedialivealpha"

pixelAspectRatio := medialive_alpha.PixelAspectRatio_Of(jsii.Number(123), jsii.Number(123))

Properties ​

Square pixels (`1:1`).

Methods ​

of(numerator: number, denominator: number): PixelAspectRatio // chainable@staticmethod def of(numerator: int | float, denominator: int | float) -> PixelAspectRatiopublic static PixelAspectRatio of(Number numerator, Number denominator)public static PixelAspectRatio Of(double numerator, double denominator)func Of(Numerator *float64, Denominator *float64) PixelAspectRatio static #
Define a pixel aspect ratio.
2 parameters

Parameters

  • numeratornumeratornumeratornumeratorNumerator — Numerator of the ratio.
  • denominatordenominatordenominatordenominatorDenominator — Denominator of the ratio.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string #
Returns the string value in `numerator:denominator` form.