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

The Timestamp class represents timestamp value and it timebase. More...

#include <timestamp.h>

Public Member Functions

 Timestamp () noexcept
 
 Timestamp (int64_t timestamp, const Rational &timebase) noexcept
 
template<typename Duration , typename = typename Duration::period>
 Timestamp (const Duration &duration)
 Create AvCpp/FFmpeg compatible timestamp value from the std::chrono::duration/boost::chrono::duration. More...
 
int64_t timestamp () const noexcept
 
int64_t timestamp (const Rational &timebase) const noexcept
 
const Rationaltimebase () const noexcept
 
 operator bool () const noexcept
 
bool isValid () const noexcept
 
bool isNoPts () const noexcept
 
 operator double () const noexcept
 
double seconds () const noexcept
 
template<typename Duration >
Duration toDuration () const
 Convert to the std::chrono::duration compatible value. More...
 
Timestampoperator+= (const Timestamp &other)
 
Timestampoperator-= (const Timestamp &other)
 
Timestampoperator*= (const Timestamp &other)
 
Timestampoperator/= (const Timestamp &other)
 

Detailed Description

The Timestamp class represents timestamp value and it timebase.

Constructor & Destructor Documentation

◆ Timestamp() [1/3]

av::Timestamp::Timestamp ( )
noexcept

◆ Timestamp() [2/3]

av::Timestamp::Timestamp ( int64_t  timestamp,
const Rational timebase 
)
noexcept

◆ Timestamp() [3/3]

template<typename Duration , typename = typename Duration::period>
av::Timestamp::Timestamp ( const Duration &  duration)
inline

Create AvCpp/FFmpeg compatible timestamp value from the std::chrono::duration/boost::chrono::duration.

Member Function Documentation

◆ isNoPts()

bool av::Timestamp::isNoPts ( ) const
noexcept

◆ isValid()

bool av::Timestamp::isValid ( ) const
noexcept

◆ operator bool()

av::Timestamp::operator bool ( ) const
noexcept

◆ operator double()

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

◆ operator*=()

Timestamp & av::Timestamp::operator*= ( const Timestamp other)

◆ operator+=()

Timestamp & av::Timestamp::operator+= ( const Timestamp other)

◆ operator-=()

Timestamp & av::Timestamp::operator-= ( const Timestamp other)

◆ operator/=()

Timestamp & av::Timestamp::operator/= ( const Timestamp other)

◆ seconds()

double av::Timestamp::seconds ( ) const
noexcept

◆ timebase()

const Rational & av::Timestamp::timebase ( ) const
noexcept

◆ timestamp() [1/2]

int64_t av::Timestamp::timestamp ( ) const
noexcept

◆ timestamp() [2/2]

int64_t av::Timestamp::timestamp ( const Rational timebase) const
noexcept

◆ toDuration()

template<typename Duration >
Duration av::Timestamp::toDuration ( ) const
inline

Convert to the std::chrono::duration compatible value.


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