Vuo  1.2.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions | Variables
VuoFfmpegUtility Namespace Reference

Description

Helper methods for working with ffmpeg.

Functions

static double AvTimeToSecond (AVStream *stream, int64_t pts)
 Converts AVStream presentation timestamp to fractional seconds.
 
static int64_t AvTimeToMicrosecond (AVStream *stream, int64_t pts)
 Converts AVStream presentation timestamp to integer microseconds.
 
static int64_t SecondToAvTime (AVStream *stream, double second)
 Converts seconds to microseconds.
 
static int FirstStreamIndexWithMediaType (AVFormatContext *context, AVMediaType type)
 Return the index of the first stream matching the media type.
 
static void FlipImageBytesVertical (uint8_t *buffer, uint width, uint height)
 Flip an image vertically.
 
static bool ConvertAVPictureToRGB (AVPicture *dst, PixelFormat dst_pix_fmt, AVPicture *src, PixelFormat pix_fmt, int width, int height)
 Convert an AVPicture from whatever format it was originally in to RGB.
 
static VuoImage VuoImageWithAVFrame (AVCodecContext *videoCodecCtx, AVFrame *frame)
 Convert an AVFrame to a VuoImage.
 
static char * AVCodecIDToString (AVCodecID id)
 Return a human-readable string for a codec.
 

Variables

const double USEC_TO_SECOND = .000001
 Multiply by this to convert microsecond to seconds.
 
const double SEC_TO_USEC = 1000000
 Multiply a second by this value to convert to microsecond.
 

Function Documentation

static char* VuoFfmpegUtility::AVCodecIDToString ( AVCodecID  id)
static

Return a human-readable string for a codec.

static int64_t VuoFfmpegUtility::AvTimeToMicrosecond ( AVStream *  stream,
int64_t  pts 
)
static

Converts AVStream presentation timestamp to integer microseconds.

static double VuoFfmpegUtility::AvTimeToSecond ( AVStream *  stream,
int64_t  pts 
)
static

Converts AVStream presentation timestamp to fractional seconds.

static bool VuoFfmpegUtility::ConvertAVPictureToRGB ( AVPicture *  dst,
PixelFormat  dst_pix_fmt,
AVPicture *  src,
PixelFormat  pix_fmt,
int  width,
int  height 
)
static

Convert an AVPicture from whatever format it was originally in to RGB.

static int VuoFfmpegUtility::FirstStreamIndexWithMediaType ( AVFormatContext *  context,
AVMediaType  type 
)
static

Return the index of the first stream matching the media type.

static void VuoFfmpegUtility::FlipImageBytesVertical ( uint8_t *  buffer,
uint  width,
uint  height 
)
static

Flip an image vertically.

static int64_t VuoFfmpegUtility::SecondToAvTime ( AVStream *  stream,
double  second 
)
static

Converts seconds to microseconds.

static VuoImage VuoFfmpegUtility::VuoImageWithAVFrame ( AVCodecContext *  videoCodecCtx,
AVFrame *  frame 
)
static

Convert an AVFrame to a VuoImage.

Variable Documentation

const double VuoFfmpegUtility::SEC_TO_USEC = 1000000

Multiply a second by this value to convert to microsecond.

const double VuoFfmpegUtility::USEC_TO_SECOND = .000001

Multiply by this to convert microsecond to seconds.