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

Description

AvFoundation video decoder.

Public Member Functions

virtual ~VuoAvDecoder ()
 Clean up any resources claimed by decoder.
 
virtual bool IsReady ()
 Bool relaying the preparedness of playback.
 
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.
 
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 in this video;.
 
void DecoderReady (bool canPlayMedia)
 Called by AvFoundation when ready to begin playback.
 
double GetFrameRate ()
 The average video framerate.
 
- Public Member Functions inherited from VuoVideoDecoder
virtual ~VuoVideoDecoder ()
 Clean up any resources claimed by decoder.
 

Static Public Member Functions

static VuoAvDecoderCreate (VuoUrl url)
 Initialize a new AvFoundation video decoder with URL.
 

Protected Member Functions

 VuoAvDecoder ()
 Constructor initializes the decoder object.
 
- Protected Member Functions inherited from VuoVideoDecoder
 VuoVideoDecoder ()
 Base constructor does nothing interesting.
 

Protected Attributes

dispatch_queue_t queue
 Serializes all operations, so this class's methods can be called from any thread.
 

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.
 

Constructor & Destructor Documentation

VuoAvDecoder::VuoAvDecoder ( )
inlineprotected

Constructor initializes the decoder object.

VuoAvDecoder::~VuoAvDecoder ( )
virtual

Clean up any resources claimed by decoder.

Member Function Documentation

bool VuoAvDecoder::CanPlayAudio ( )
virtual

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

Implements VuoVideoDecoder.

VuoAvDecoder * VuoAvDecoder::Create ( VuoUrl  url)
static

Initialize a new AvFoundation video decoder with URL.

void VuoAvDecoder::DecoderReady ( bool  canPlayMedia)

Called by AvFoundation when ready to begin playback.

If VuoVideoDecoder videoPlayer and onReadyToPlay are non-null, they'll be invoked.

unsigned int VuoAvDecoder::GetAudioChannelCount ( )
virtual

Returns the number of audio channels in this video;.

Implements VuoVideoDecoder.

double VuoAvDecoder::GetDuration ( )
virtual

The total duration of this video in seconds.

Implements VuoVideoDecoder.

double VuoAvDecoder::GetFrameRate ( )
virtual

The average video framerate.

Implements VuoVideoDecoder.

double VuoAvDecoder::GetLastDecodedVideoTimeStamp ( )
virtual

Returns the timestamp of the last decoded video frame.

Implements VuoVideoDecoder.

bool VuoAvDecoder::IsReady ( )
virtual

Bool relaying the preparedness of playback.

If this is false, register with onReadyToPlay to receive a notification when playback is enabled. If inheriting class does not override, playback is assumed to be available immediately following initialization.

Reimplemented from VuoVideoDecoder.

bool VuoAvDecoder::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 VuoAvDecoder::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 VuoAvDecoder::SeekToSecond ( double  second)
virtual

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

Implements VuoVideoDecoder.

void VuoAvDecoder::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.

Member Data Documentation

dispatch_queue_t VuoAvDecoder::queue
protected

Serializes all operations, so this class's methods can be called from any thread.


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