MythTV master
|
C++ wrapper for FFmpeg libavutil AVRational. More...
#include <libmythtv/mythavrational.h>
Public Member Functions | |
MythAVRational (int n=0, int d=1) | |
MythAVRational (AVRational q) | |
AVRational | get_q () const |
long long | toFixed (long long base) const |
Convert the rational number to fixed point. More... | |
double | toDouble () const |
QString | toString () const |
bool | isNonzero () const |
bool | isValid () const |
MythAVRational | reduce (int64_t max) const |
MythAVRational | reduce (int64_t max, bool &exact) const |
MythAVRational | invert () const |
MythAVRational & | operator+= (MythAVRational rhs) |
MythAVRational & | operator-= (MythAVRational rhs) |
MythAVRational & | operator*= (MythAVRational rhs) |
MythAVRational & | operator/= (MythAVRational rhs) |
Static Public Member Functions | |
static MythAVRational | fromDouble (double d, int64_t max) |
Convert a double to a MythAVRational. More... | |
static int | cmp (MythAVRational a, MythAVRational b) |
Private Attributes | |
AVRational | m_q {.num = 0, .den = 1} |
C++ wrapper for FFmpeg libavutil AVRational.
Definition at line 14 of file mythavrational.h.
|
inlineexplicit |
Definition at line 17 of file mythavrational.h.
Referenced by fromDouble(), and invert().
|
inlineexplicit |
Definition at line 18 of file mythavrational.h.
|
inlinestatic |
Definition at line 59 of file mythavrational.h.
Referenced by operator!=(), operator<(), operator<=(), operator==(), operator>(), and operator>=().
|
inlinestatic |
Convert a double to a MythAVRational.
Definition at line 25 of file mythavrational.h.
|
inline |
Definition at line 30 of file mythavrational.h.
Referenced by operator*(), operator+(), operator-(), and operator/().
|
inline |
Definition at line 57 of file mythavrational.h.
Referenced by DTVRecorder::UpdateFramesWritten().
|
inline |
Definition at line 42 of file mythavrational.h.
Referenced by DecoderBase::SaveTotalDuration(), and DTVRecorder::UpdateFramesWritten().
|
inline |
Definition at line 44 of file mythavrational.h.
Referenced by DecoderBase::SaveTotalDuration().
|
inline |
Definition at line 98 of file mythavrational.h.
|
inline |
Definition at line 96 of file mythavrational.h.
|
inline |
Definition at line 97 of file mythavrational.h.
|
inline |
Definition at line 99 of file mythavrational.h.
|
inline |
Definition at line 46 of file mythavrational.h.
Referenced by reduce().
|
inline |
Definition at line 51 of file mythavrational.h.
|
inline |
Definition at line 36 of file mythavrational.h.
Referenced by DTVRecorder::UpdateFramesWritten().
|
inline |
Convert the rational number to fixed point.
Definition at line 32 of file mythavrational.h.
Referenced by AvFormatDecoder::HandleGopStart(), and DecoderBase::SaveTotalDuration().
|
inline |
Definition at line 37 of file mythavrational.h.
Referenced by DTVRecorder::UpdateFramesWritten().
|
private |
Definition at line 66 of file mythavrational.h.
Referenced by cmp(), get_q(), invert(), isNonzero(), isValid(), reduce(), toDouble(), toFixed(), and toString().