Vuo  0.5.3
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Macros | Functions
VuoMovie.cc File Reference

Description

VuoMovie implementation.

Classes

class  VuoMovieDecoder
 Instance class used to control the playback of video. More...
 
struct  VuoMovieDecoder::AVContainer
 Internal struct which contains context and current playback status of VuoMovieDecoder. More...
 

Macros

#define SEC_PER_USEC   .000001
 Seconds per millisecond. Vuo nodes want information in seconds, where ffmpeg operates in milliseconds.
 

Functions

void VuoMovie_free (void *movie)
 Releases ffmpeg resources created during this object's lifecycle.
 
VuoMovieVuoMovie_make (const char *path)
 VuoMovie_make: Creates a new VuoMovieDecoder object and returns itself.
 
bool VuoMovie_getNextFrame (VuoMovie *decoder, VuoImage *image, double *nextFrame)
 VuoMovie_getNextFrame gets the next full frame's image and presentation timestamp (in seconds).
 
bool VuoMovie_seekToSecond (VuoMovie *movie, double second)
 Seeks the video to the specified second.
 
bool VuoMovie_getInfo (const char *path, double *duration)
 Given a path, this will open and close a video stream and return the duration.
 

Class Documentation

struct VuoMovieDecoder::AVContainer
Class Members
AVCodecContext * pCodecCtx
AVFormatContext * pFormatCtx
int64_t startPts
int totalFrames
AVStream * video_st
int videoStream

Macro Definition Documentation

#define SEC_PER_USEC   .000001

Seconds per millisecond. Vuo nodes want information in seconds, where ffmpeg operates in milliseconds.

Function Documentation

void VuoMovie_free ( void *  movie)

Releases ffmpeg resources created during this object's lifecycle.

Todo:
Close movie file and free memory. (https://b33p.net/kosada/node/6595)
bool VuoMovie_getInfo ( const char *  path,
double *  duration 
)

Given a path, this will open and close a video stream and return the duration.

bool VuoMovie_getNextFrame ( VuoMovie decoder,
VuoImage image,
double *  nextFrame 
)

VuoMovie_getNextFrame gets the next full frame's image and presentation timestamp (in seconds).

Will return true if next frame is found and false if not.

VuoMovie* VuoMovie_make ( const char *  path)

VuoMovie_make: Creates a new VuoMovieDecoder object and returns itself.

Parameters
pathAn absolute path to the video file to open.
Returns
A new VuoMovie object, which may be used to control playback of the film. If the video file fails to open for any reason, this returns NULL.
bool VuoMovie_seekToSecond ( VuoMovie movie,
double  second 
)

Seeks the video to the specified second.