Vuo  1.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Public Member Functions | Static Public Member Functions | List of all members
VuoFfmpegDecoder Class Reference

Description

An object for controlling and extracting information from video using FFMPEG.

Public Member Functions

virtual ~VuoFfmpegDecoder ()
 Unload objects allocated by the FFMPEG decoder.
 
virtual bool NextVideoFrame (VuoVideoFrame *frame)
 Get the next video frame in the queue. If playback speed is negative, this will the the frame prior to the last retrieved.
 
virtual bool NextAudioFrame (VuoAudioFrame *audio)
 Get the next audio frame in the queue. If playback speed is negative (or anything other than 1), this returns nothing.
 
virtual bool SeekToSecond (double second)
 Seek the playhead to the second. second is not in timestamp format, rather, relative to movie start = 0.
 
bool ContainsAudio ()
 Returns true if video contains an audio track.
 
virtual double GetDuration ()
 The total duration of this video in seconds.
 
virtual void SetPlaybackRate (double rate)
 Set the playback rate.
 
virtual double GetLastDecodedVideoTimeStamp ()
 Returns the timestamp of the last decoded video frame.
 
virtual bool CanPlayAudio ()
 Returns true if there isn't an audio track, or there is but the decoder can play it.
 
virtual unsigned int GetAudioChannelCount ()
 Returns the number of audio channels available.
 
virtual bool IsReady ()
 Returns true if this asset is loaded and ready to play.
 
virtual double GetFrameRate ()
 Returns the average frame-rate.
 
- Public Member Functions inherited from VuoVideoDecoder
virtual ~VuoVideoDecoder ()
 Clean up any resources claimed by decoder.
 

Static Public Member Functions

static VuoFfmpegDecoderCreate (VuoUrl url)
 Initialize a instance of the FFMPEG decoder. Can return NULL if initialization fails (but will clean up after itself in that event).
 

Additional Inherited Members

- Public Types inherited from VuoVideoDecoder
typedef class VuoVideoPlayer VideoPlayer
 Forward declare VuoVideoPlayer for the onReady delegate.
 
- Public Attributes inherited from VuoVideoDecoder
VideoPlayervideoPlayer = NULL
 Reference to the VuoVideoPlayer making use of this decoder.
 
void(VideoPlayer::* onReadyToPlay )(bool canPlayMedia)
 A delegate to be called when the decoder is ready to begin playback.
 
- Protected Member Functions inherited from VuoVideoDecoder
 VuoVideoDecoder ()
 Base constructor does nothing interesting.
 

Constructor & Destructor Documentation

VuoFfmpegDecoder::~VuoFfmpegDecoder ( )
virtual

Unload objects allocated by the FFMPEG decoder.

Member Function Documentation

bool VuoFfmpegDecoder::CanPlayAudio ( )
virtual

Returns true if there isn't an audio track, or there is but the decoder can play it.

If there are audio streams, but no channels, that means no codec was found.

Implements VuoVideoDecoder.

bool VuoFfmpegDecoder::ContainsAudio ( )

Returns true if video contains an audio track.

VuoFfmpegDecoder * VuoFfmpegDecoder::Create ( VuoUrl  url)
static

Initialize a instance of the FFMPEG decoder. Can return NULL if initialization fails (but will clean up after itself in that event).

unsigned int VuoFfmpegDecoder::GetAudioChannelCount ( )
virtual

Returns the number of audio channels available.

Implements VuoVideoDecoder.

double VuoFfmpegDecoder::GetDuration ( )
virtual

The total duration of this video in seconds.

Implements VuoVideoDecoder.

double VuoFfmpegDecoder::GetFrameRate ( )
virtual

Returns the average frame-rate.

Implements VuoVideoDecoder.

double VuoFfmpegDecoder::GetLastDecodedVideoTimeStamp ( )
virtual

Returns the timestamp of the last decoded video frame.

Implements VuoVideoDecoder.

virtual bool VuoFfmpegDecoder::IsReady ( )
inlinevirtual

Returns true if this asset is loaded and ready to play.

Reimplemented from VuoVideoDecoder.

bool VuoFfmpegDecoder::NextAudioFrame ( VuoAudioFrame audio)
virtual

Get the next audio frame in the queue. If playback speed is negative (or anything other than 1), this returns nothing.

Implements VuoVideoDecoder.

bool VuoFfmpegDecoder::NextVideoFrame ( VuoVideoFrame frame)
virtual

Get the next video frame in the queue. If playback speed is negative, this will the the frame prior to the last retrieved.

Implements VuoVideoDecoder.

bool VuoFfmpegDecoder::SeekToSecond ( double  second)
virtual

Seek the playhead to the second. second is not in timestamp format, rather, relative to movie start = 0.

Implements VuoVideoDecoder.

void VuoFfmpegDecoder::SetPlaybackRate ( double  rate)
virtual

Set the playback rate.

Any value that isn't 1 will flush the audio queue and discard any future audio frames until frame rate is back to 1.

Implements VuoVideoDecoder.


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