Vuo  1.0.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
VuoMovieDecoder Class Reference

Description

Instance class used to control the playback of video.

See Also
VuoMovie_getNextFrame VuoMovie_initFfmpeg VuoMovie_getInfo VuoMovie_make

Classes

struct  AVContainer
 Internal struct which contains context and current playback status of VuoMovieDecoder. More...
 
struct  PacketQueue
 Holds audio AVPackets for decoding. More...
 
struct  VuoPacketList
 A replacement for the FFMPEG AVPacketList which uses deprecated functionality. More...
 

Public Types

typedef struct
VuoMovieDecoder::VuoPacketList 
VuoPacketList
 A replacement for the FFMPEG AVPacketList which uses deprecated functionality.
 
typedef struct
VuoMovieDecoder::PacketQueue 
PacketQueue
 Holds audio AVPackets for decoding.
 
typedef struct
VuoMovieDecoder::AVContainer 
AVContainer
 Internal struct which contains context and current playback status of VuoMovieDecoder.
 

Public Member Functions

 ~VuoMovieDecoder ()
 VuoMovieDecoder class destructor.
 
int initWithFile (const char *path)
 Attempts to initialize an AVFormatContext and appropriate codec for the video path.
 
bool containsAudio ()
 If file contains audio tracks, return yes.
 
double getCurrentSecond ()
 Returns the last timestamp in seconds.
 
bool getNextVideoFrame (VuoImage *image, double *frameTimestampInSeconds)
 Attempts to extract the frame image and timestamp for the next full frame in the current stream.
 
bool getNextAudioFrame (VuoList_VuoAudioSamples audioSamples, double *frameTimestampInSeconds)
 Attempt to extract audioSamples.sampleCount number of values from audio channels.
 
bool getPreviousVideoFrame (VuoImage *image, double *frameTimestampInSeconds)
 Attempts to extract chronologically prior frame image and timestamp in the current stream.
 
VuoList_VuoReal extractFramePtsValues ()
 Returns a VuoList_VuoReal containing every frame's presentation time stamp.
 
bool seekToMs (int64_t ms)
 Converts millisecond to frame PTS and performs an av_seek_frame() call.
 

Public Attributes

AVContainer container
 Stores instance playback information.
 

Class Documentation

struct VuoMovieDecoder::AVContainer
Class Members
AVCodecContext * aCodecCtx
double audio_diff_avg_coef
int audio_diff_avg_count
double audio_diff_cum
double audio_diff_threshold
AVStream * audio_st
PacketQueue audioPacketQueue
int audioStreamIndex
int64_t avOffset
int bytesPerAudioSample
int64_t currentAudioPTS
int64_t currentAudioTimestampUSEC
int64_t currentVideoPTS
int64_t currentVideoTimestampUSEC
double duration
int64_t firstAudioFrame
int64_t firstVideoFrame
int64_t lastAudioFrame
int64_t lastVideoFrame
int packetDuration
char * path
AVCodecContext * pCodecCtx
AVFormatContext * pFormatCtx
bool previousFrameValid
int previousPacketDuration
bool seekUnavailable
int64_t startPts
struct SwrContext * swr_ctx
AVStream * video_st
PacketQueue videoPacketQueue
int videoStreamIndex
struct VuoMovieDecoder::PacketQueue
Class Members
VuoPacketList * first_pkt
VuoPacketList * last_pkt
int nb_packets
int size
struct VuoMovieDecoder::VuoPacketList
Class Members
VuoPacketList * next
AVPacket pkt

Member Typedef Documentation

Internal struct which contains context and current playback status of VuoMovieDecoder.

Holds audio AVPackets for decoding.

A replacement for the FFMPEG AVPacketList which uses deprecated functionality.

Constructor & Destructor Documentation

VuoMovieDecoder::~VuoMovieDecoder ( )
inline

VuoMovieDecoder class destructor.

See Also
VuoMovie_free

Member Function Documentation

bool VuoMovieDecoder::containsAudio ( )
inline

If file contains audio tracks, return yes.

Otherwise, no.

VuoList_VuoReal VuoMovieDecoder::extractFramePtsValues ( )
inline

Returns a VuoList_VuoReal containing every frame's presentation time stamp.

In the event that timestamp information is not available, the current frame index multiplied by time base is used.

double VuoMovieDecoder::getCurrentSecond ( )
inline

Returns the last timestamp in seconds.

bool VuoMovieDecoder::getNextAudioFrame ( VuoList_VuoAudioSamples  audioSamples,
double *  frameTimestampInSeconds 
)
inline

Attempt to extract audioSamples.sampleCount number of values from audio channels.

bool VuoMovieDecoder::getNextVideoFrame ( VuoImage image,
double *  frameTimestampInSeconds 
)
inline

Attempts to extract the frame image and timestamp for the next full frame in the current stream.

bool VuoMovieDecoder::getPreviousVideoFrame ( VuoImage image,
double *  frameTimestampInSeconds 
)
inline

Attempts to extract chronologically prior frame image and timestamp in the current stream.

int VuoMovieDecoder::initWithFile ( const char *  path)
inline

Attempts to initialize an AVFormatContext and appropriate codec for the video path.

See Also
VuoMovie_make
bool VuoMovieDecoder::seekToMs ( int64_t  ms)
inline

Converts millisecond to frame PTS and performs an av_seek_frame() call.

Member Data Documentation

AVContainer VuoMovieDecoder::container

Stores instance playback information.


The documentation for this class was generated from the following file: