Helper methods for working with ffmpeg.
Functions | |
static double | AvTimeToSecond (AVStream *stream, int64_t pts) |
Converts AVStream presentation timestamp to fractional seconds. More... | |
static int64_t | AvTimeToMicrosecond (AVStream *stream, int64_t pts) |
Converts AVStream presentation timestamp to integer microseconds. More... | |
static int64_t | SecondToAvTime (AVStream *stream, double second) |
Converts seconds to microseconds. More... | |
static int | FirstStreamIndexWithMediaType (AVFormatContext *context, AVMediaType type) |
Return the index of the first stream matching the media type. More... | |
static void | FlipImageBytesVertical (uint8_t *buffer, uint width, uint height) |
Flip an image vertically. More... | |
static bool | ConvertAVFrameToRGB (AVFrame *dst, AVPixelFormat dst_pix_fmt, AVFrame *src, AVPixelFormat pix_fmt, int width, int height) |
Convert an AVFrame from whatever format it was originally in to RGB. More... | |
static VuoImage | VuoImageWithAVFrame (AVCodecContext *videoCodecCtx, AVFrame *frame) |
Convert an AVFrame to a VuoImage. More... | |
Variables | |
const double | USEC_TO_SECOND = .000001 |
Multiply by this to convert microsecond to seconds. More... | |
const double | SEC_TO_USEC = 1000000 |
Multiply a second by this value to convert to microsecond. More... | |
bool | warnedAboutSlowFlip = false |
Whether we've already shown a warning about using the slow flipper code path. More... | |
|
static |
Converts AVStream presentation timestamp to integer microseconds.
Definition at line 56 of file VuoFfmpegUtility.h.
|
static |
Converts AVStream presentation timestamp to fractional seconds.
Definition at line 48 of file VuoFfmpegUtility.h.
|
static |
Convert an AVFrame from whatever format it was originally in to RGB.
Definition at line 107 of file VuoFfmpegUtility.h.
|
static |
Return the index of the first stream matching the media type.
Definition at line 76 of file VuoFfmpegUtility.h.
|
static |
Flip an image vertically.
Definition at line 87 of file VuoFfmpegUtility.h.
|
static |
Converts seconds to microseconds.
Definition at line 64 of file VuoFfmpegUtility.h.
|
static |
Convert an AVFrame to a VuoImage.
Definition at line 166 of file VuoFfmpegUtility.h.
const double VuoFfmpegUtility::SEC_TO_USEC = 1000000 |
Multiply a second by this value to convert to microsecond.
Definition at line 45 of file VuoFfmpegUtility.h.
const double VuoFfmpegUtility::USEC_TO_SECOND = .000001 |
Multiply by this to convert microsecond to seconds.
Definition at line 42 of file VuoFfmpegUtility.h.
bool VuoFfmpegUtility::warnedAboutSlowFlip = false |
Whether we've already shown a warning about using the slow flipper code path.
Definition at line 102 of file VuoFfmpegUtility.h.