|
| constexpr | AVRational () noexcept=default |
| | {0, 1} — unknown / unset.
|
| constexpr | AVRational (int num, int den) noexcept |
| | {num, den} like the C aggregate.
|
| constexpr bool | Valid () const noexcept |
| | True when both sides are positive.
|
| constexpr double | ToDouble () const noexcept |
| | av_q2d — num / den as double.
|
| std::int64_t | Rescale (std::int64_t ticks, const AVRational &dst) const noexcept |
| | av_rescale_q(ticks, *this, dst).
|
| constexpr bool | operator== (const AVRational &other) const noexcept |
| | Equality.
|
| constexpr bool | operator!= (const AVRational &other) const noexcept |
| | Inequality.
|
Pair {num, den} matching libavutil AVRational.
Public fields so fps.num, fps.den and AVRational{24000, 1001} read like the C API. This is not libav's header: plugins that include libavutil/rational.h still use ::AVRational for the C struct. Convert with {r.num, r.den}.
23.976 fps is {24000, 1001}. 24 fps is {24, 1}. A time base of 1 ms is {1, 1000}.