|
| | Timestamp (int64_t timestamp, const Rational &timebase) noexcept |
| | Create a timestamp from a value and its time base.
|
| template<typename Duration, typename = typename Duration::period, typename = std::enable_if_t<std::is_integral_v<typename Duration::rep>>> |
| constexpr | Timestamp (const Duration &duration) |
| | Create AvCpp/FFmpeg compatible timestamp value from the std::chrono::duration/boost::chrono::duration.
|
| template<typename Duration, typename PrecisionPeriod, typename = typename Duration::period, typename = std::enable_if_t<std::is_floating_point_v<typename Duration::rep>>> |
| constexpr | Timestamp (const Duration &duration, PrecisionPeriod) |
| | Create AvCpp/FFmpeg compatible timestamp value from the floating point std::chrono::duration/boost::chrono::duration with given precision.
|
| template<typename Duration, typename = typename Duration::period, typename = std::enable_if_t<std::is_floating_point_v<typename Duration::rep>>> |
| constexpr | Timestamp (const Duration &duration, const Rational &timebase) |
| | Create AvCpp/FFmpeg compatible timestamp value from the floating point std::chrono::duration/boost::chrono::duration with given precision.
|
| int64_t | timestamp () const noexcept |
| | The raw timestamp value.
|
| int64_t | timestamp (const Rational &timebase) const noexcept |
| | The timestamp converted to another time base.
|
| const Rational & | timebase () const noexcept |
| | The time base of the timestamp.
|
| | operator bool () const noexcept |
| | Whether the timestamp carries a value.
|
| bool | isValid () const noexcept |
| | Whether the timestamp is usable.
|
| bool | isNoPts () const noexcept |
| | Whether the timestamp means "no timestamp".
|
| | operator double () const noexcept |
| | The timestamp in seconds.
|
| double | seconds () const noexcept |
| | The timestamp in seconds.
|
| template<typename Duration, typename = typename Duration::period, typename = typename Duration::rep> |
| constexpr Duration | toDuration () const |
| | Convert to the std::chrono::duration compatible value.
|
| Timestamp & | operator+= (const Timestamp &other) |
| | Add another timestamp, aligning the time bases.
|
| Timestamp & | operator-= (const Timestamp &other) |
| | Subtract another timestamp, aligning the time bases.
|
| Timestamp & | operator*= (const Timestamp &other) |
| | Multiply by another timestamp.
|
| Timestamp & | operator/= (const Timestamp &other) |
| | Divide by another timestamp.
|
Timestamp class can be treated as Fixed Point time representation where timestamp itself is a value and Time Base is a multiplicator. Be careful with construct Timestamp from the std::chrono::duration with floating point rep
- Examples
- api2-generate-subtitles.cpp, api2-hw-encode.cpp, api2-hw-scale.cpp, api2-hw-transcode.cpp, api2-remux.cpp, and api2-timestamp.cpp.