Tag Parser  6.4.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
Public Member Functions | Public Attributes | List of all members
Media::AspectRatio Struct Reference

The AspectRatio struct defines an aspect ratio. More...

#include <aspectratio.h>

Public Member Functions

constexpr AspectRatio ()
 Constructs an invalid aspect ratio. More...
 
 AspectRatio (byte aspectRatioType)
 Constructs a PAR form the specified AVC aspectRatioType. More...
 
constexpr AspectRatio (uint16 numerator, uint16 denominator)
 Constructs a aspect ratio with the specified numerator and denominator. More...
 
constexpr bool isValid () const
 Returns an indication whether the aspect ratio is present and valid. More...
 
constexpr bool isExtended () const
 Returns whether numerator and denominator must be read from extended SAR header. More...
 

Public Attributes

byte type
 
uint16 numerator
 
uint16 denominator
 

Detailed Description

The AspectRatio struct defines an aspect ratio.

Definition at line 10 of file aspectratio.h.

Constructor & Destructor Documentation

◆ AspectRatio() [1/3]

constexpr Media::AspectRatio::AspectRatio ( )

Constructs an invalid aspect ratio.

Definition at line 25 of file aspectratio.h.

◆ AspectRatio() [2/3]

Media::AspectRatio::AspectRatio ( byte  aspectRatioType)

Constructs a PAR form the specified AVC aspectRatioType.

Definition at line 15 of file aspectratio.cpp.

◆ AspectRatio() [3/3]

constexpr Media::AspectRatio::AspectRatio ( uint16  numerator,
uint16  denominator 
)

Constructs a aspect ratio with the specified numerator and denominator.

Remarks
Allows defining a custom aspect ratio, hence counts as "extended" (see isExtended()).

Definition at line 35 of file aspectratio.h.

Member Function Documentation

◆ isExtended()

constexpr bool Media::AspectRatio::isExtended ( ) const

Returns whether numerator and denominator must be read from extended SAR header.

Definition at line 52 of file aspectratio.h.

◆ isValid()

constexpr bool Media::AspectRatio::isValid ( ) const

Returns an indication whether the aspect ratio is present and valid.

Definition at line 44 of file aspectratio.h.

Member Data Documentation

◆ denominator

uint16 Media::AspectRatio::denominator

Definition at line 19 of file aspectratio.h.

◆ numerator

uint16 Media::AspectRatio::numerator

Definition at line 18 of file aspectratio.h.

◆ type

byte Media::AspectRatio::type

Definition at line 17 of file aspectratio.h.


The documentation for this struct was generated from the following files: