avcpp  2.0
Wrapper for the FFmpeg that simplify usage from C++ projects.
Public Member Functions | Static Public Member Functions | List of all members
av::Rational Class Reference

#include <rational.h>

Public Member Functions

 Rational () noexcept
 
 Rational (int numerator, int denominator=1) noexcept
 
 Rational (const AVRational &value) noexcept
 
 Rational (double value, int maxPrecision=RationalMaxPrecision) noexcept
 
AVRational & getValue () noexcept
 
const AVRational & getValue () const noexcept
 
void setValue (const AVRational &newValue) noexcept
 
void setNumerator (int numerator) noexcept
 
void setDenominator (int denominator) noexcept
 
int getNumerator () const noexcept
 
int getDenominator () const noexcept
 
double getDouble () const noexcept
 
int64_t rescale (int64_t srcValue, const Rational &dstBase) const noexcept
 
void dump () const noexcept
 
Rationaloperator= (const AVRational &value) noexcept
 
Rationaloperator= (double value) noexcept
 
bool operator== (const Rational &other) const noexcept
 
bool operator!= (const Rational &other) const noexcept
 
bool operator< (const Rational &other) const noexcept
 
bool operator> (const Rational &other) const noexcept
 
bool operator<= (const Rational &other) const noexcept
 
bool operator>= (const Rational &other) const noexcept
 
Rational operator+ (const Rational &value) const noexcept
 
Rational operator- (const Rational &value) const noexcept
 
Rational operator* (const Rational &value) const noexcept
 
Rational operator/ (const Rational &value) const noexcept
 
double operator() () const noexcept
 
 operator const AVRational & () const noexcept
 

Static Public Member Functions

static Rational fromDouble (double value, int maxPrecision=RationalMaxPrecision) noexcept
 

Constructor & Destructor Documentation

◆ Rational() [1/4]

av::Rational::Rational ( )
noexcept

◆ Rational() [2/4]

av::Rational::Rational ( int  numerator,
int  denominator = 1 
)
noexcept

◆ Rational() [3/4]

av::Rational::Rational ( const AVRational &  value)
noexcept

◆ Rational() [4/4]

av::Rational::Rational ( double  value,
int  maxPrecision = RationalMaxPrecision 
)
noexcept

Member Function Documentation

◆ dump()

void av::Rational::dump ( ) const
noexcept

◆ fromDouble()

Rational av::Rational::fromDouble ( double  value,
int  maxPrecision = RationalMaxPrecision 
)
staticnoexcept

◆ getDenominator()

int av::Rational::getDenominator ( ) const
inlinenoexcept

◆ getDouble()

double av::Rational::getDouble ( ) const
inlinenoexcept

◆ getNumerator()

int av::Rational::getNumerator ( ) const
inlinenoexcept

◆ getValue() [1/2]

const AVRational& av::Rational::getValue ( ) const
inlinenoexcept

◆ getValue() [2/2]

AVRational& av::Rational::getValue ( )
inlinenoexcept

◆ operator const AVRational &()

av::Rational::operator const AVRational & ( ) const
inlinenoexcept

◆ operator!=()

bool av::Rational::operator!= ( const Rational other) const
inlinenoexcept

◆ operator()()

double av::Rational::operator() ( ) const
noexcept

◆ operator*()

Rational av::Rational::operator* ( const Rational value) const
noexcept

◆ operator+()

Rational av::Rational::operator+ ( const Rational value) const
noexcept

◆ operator-()

Rational av::Rational::operator- ( const Rational value) const
noexcept

◆ operator/()

Rational av::Rational::operator/ ( const Rational value) const
noexcept

◆ operator<()

bool av::Rational::operator< ( const Rational other) const
inlinenoexcept

◆ operator<=()

bool av::Rational::operator<= ( const Rational other) const
inlinenoexcept

◆ operator=() [1/2]

Rational & av::Rational::operator= ( const AVRational &  value)
noexcept

◆ operator=() [2/2]

Rational & av::Rational::operator= ( double  value)
noexcept

◆ operator==()

bool av::Rational::operator== ( const Rational other) const
noexcept

◆ operator>()

bool av::Rational::operator> ( const Rational other) const
inlinenoexcept

◆ operator>=()

bool av::Rational::operator>= ( const Rational other) const
inlinenoexcept

◆ rescale()

int64_t av::Rational::rescale ( int64_t  srcValue,
const Rational dstBase 
) const
noexcept

◆ setDenominator()

void av::Rational::setDenominator ( int  denominator)
inlinenoexcept

◆ setNumerator()

void av::Rational::setNumerator ( int  numerator)
inlinenoexcept

◆ setValue()

void av::Rational::setValue ( const AVRational &  newValue)
inlinenoexcept

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