MPD 0.20.6

- Main Page
- Namespaces
- Data Structures
- Files

- File List
- Globals

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)
| 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)
| Convert a FFmpeg time stamp to a SongTime. More...
static gcc_const SignedSongTime | FromFfmpegTimeChecked (int64_t t, const AVRational time_base)
| Convert a FFmpeg time stamp to a SignedSongTime. More...
static gcc_const int64_t | ToFfmpegTime (SongTime t, const AVRational time_base)
| 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

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.

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

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

Definition at line 44 of file Time.hxx.

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

Convert a FFmpeg time stamp to a SongTime.

Definition at line 67 of file Time.hxx.

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

Convert a FFmpeg time stamp to a SignedSongTime.

Definition at line 80 of file Time.hxx.

template<typename Ratio >

static constexpr AVRational RatioToAVRational | ( |  | ) |
| inline static

Convert a std::ratio to a #AVRational.

Definition at line 57 of file Time.hxx.

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

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

Definition at line 92 of file Time.hxx.