MPD: lib/ffmpeg/Time.hxx File Reference

MPD 0.20.18

Functions
Time.hxx File Reference
`#include "Chrono.hxx"`
`#include "Compiler.h"`
`#include <libavutil/avutil.h>`
`#include <libavutil/mathematics.h>`
`#include <assert.h>`
`#include <stdint.h>`
Include dependency graph for Time.hxx:

Go to the source code of this file.

## Functions
static gcc_const double | FfmpegTimeToDouble (int64_t t, const AVRational time_base) noexcept
| Convert a FFmpeg time stamp to a floating point value (in seconds). More...
template<typename Ratio >
static constexpr AVRational | RatioToAVRational ()
| Convert a std::ratio to a #AVRational. More...
static gcc_const SongTime | FromFfmpegTime (int64_t t, const AVRational time_base) noexcept
| Convert a FFmpeg time stamp to a SongTime. More...
static gcc_const SignedSongTime | FromFfmpegTimeChecked (int64_t t, const AVRational time_base) noexcept
| Convert a FFmpeg time stamp to a SignedSongTime. More...
static gcc_const int64_t | ToFfmpegTime (SongTime t, const AVRational time_base) noexcept
| Convert a SongTime to a FFmpeg time stamp with the given base. More...
static constexpr int64_t | FfmpegTimestampFallback (int64_t t, int64_t fallback)
| Replace #AV_NOPTS_VALUE with the given fallback. More...

## Function Documentation

## ◆ FfmpegTimestampFallback()

static constexpr int64_t FfmpegTimestampFallback | ( | int64_t | t,
|  | int64_t | fallback
| ) |  |
| static

Replace #AV_NOPTS_VALUE with the given fallback.

Definition at line 103 of file Time.hxx.

## ◆ FfmpegTimeToDouble()

static gcc_const double FfmpegTimeToDouble | ( | int64_t | t,
|  | const AVRational | time_base
| ) |  |
| inlinestaticnoexcept

Convert a FFmpeg time stamp to a floating point value (in seconds).

Definition at line 44 of file Time.hxx.

## ◆ FromFfmpegTime()

static gcc_const SongTime FromFfmpegTime | ( | int64_t | t,
|  | const AVRational | time_base
| ) |  |
| inlinestaticnoexcept

Convert a FFmpeg time stamp to a SongTime.

Definition at line 67 of file Time.hxx.

## ◆ FromFfmpegTimeChecked()

static gcc_const SignedSongTime FromFfmpegTimeChecked | ( | int64_t | t,
|  | const AVRational | time_base
| ) |  |
| inlinestaticnoexcept

Convert a FFmpeg time stamp to a SignedSongTime.

Definition at line 80 of file Time.hxx.

## ◆ RatioToAVRational()

template<typename Ratio >

static constexpr AVRational RatioToAVRational | ( |  | ) |
| inlinestatic

Convert a std::ratio to a #AVRational.

Definition at line 57 of file Time.hxx.

## ◆ ToFfmpegTime()

static gcc_const int64_t ToFfmpegTime | ( | SongTime | t,
|  | const AVRational | time_base
| ) |  |
| inlinestaticnoexcept

Convert a SongTime to a FFmpeg time stamp with the given base.

Definition at line 92 of file Time.hxx.