Tag Parser 12.1.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
TagParser::AspectRatio Struct Reference

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

#include <aspectratio.h>

Public Member Functions

constexpr AspectRatio ()
 Constructs an invalid aspect ratio.
 
 AspectRatio (std::uint8_t aspectRatioType)
 Constructs a PAR form the specified AVC aspectRatioType.
 
constexpr AspectRatio (std::uint16_t numerator, std::uint16_t denominator)
 Constructs a aspect ratio with the specified numerator and denominator.
 
constexpr bool isValid () const
 Returns an indication whether the aspect ratio is present and valid.
 
constexpr bool isExtended () const
 Returns whether numerator and denominator must be read from extended SAR header.
 
std::string toString () const
 Returns the string representation "numerator : denominator".
 

Public Attributes

std::uint8_t type
 
std::uint16_t numerator
 
std::uint16_t denominator
 

Detailed Description

The AspectRatio struct defines an aspect ratio.

Definition at line 13 of file aspectratio.h.

Constructor & Destructor Documentation

◆ AspectRatio() [1/3]

constexpr TagParser::AspectRatio::AspectRatio ( )
explicitconstexpr

Constructs an invalid aspect ratio.

Definition at line 29 of file aspectratio.h.

◆ AspectRatio() [2/3]

TagParser::AspectRatio::AspectRatio ( std::uint8_t  aspectRatioType)
explicit

Constructs a PAR form the specified AVC aspectRatioType.

Definition at line 15 of file aspectratio.cpp.

◆ AspectRatio() [3/3]

constexpr TagParser::AspectRatio::AspectRatio ( std::uint16_t  numerator,
std::uint16_t  denominator 
)
explicitconstexpr

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 40 of file aspectratio.h.

Member Function Documentation

◆ isExtended()

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

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

Definition at line 58 of file aspectratio.h.

◆ isValid()

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

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

Definition at line 50 of file aspectratio.h.

◆ toString()

std::string TagParser::AspectRatio::toString ( ) const
inline

Returns the string representation "numerator : denominator".

Definition at line 66 of file aspectratio.h.

Member Data Documentation

◆ denominator

std::uint16_t TagParser::AspectRatio::denominator

Definition at line 23 of file aspectratio.h.

◆ numerator

std::uint16_t TagParser::AspectRatio::numerator

Definition at line 22 of file aspectratio.h.

◆ type

std::uint8_t TagParser::AspectRatio::type

Definition at line 21 of file aspectratio.h.


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