Vuo  1.2.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | List of all members
VuoVideoDecoder Class Referenceabstract

Description

Virtual class from which Ffmpeg and AvFoundation video decoders inherit.

Public Types

typedef class VuoVideoPlayer VideoPlayer
 Forward declare VuoVideoPlayer for the onReady delegate.
 

Public Member Functions

virtual ~VuoVideoDecoder ()
 Clean up any resources claimed by decoder.
 
virtual bool IsReady ()
 Bool relaying the preparedness of playback.
 
virtual bool NextVideoFrame (VuoVideoFrame *frame)=0
 Get the next video frame in the queue. Image comes with a retain count of 1 (as opposed to the usual non-registered value). If playback speed is negative, this will the the frame prior to the last retrieved.
 
virtual bool NextAudioFrame (VuoAudioFrame *audio)=0
 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)=0
 Seek the playhead to the second. second is not in timestamp format, rather, relative to movie start = 0.
 
virtual double GetDuration ()=0
 The total duration of this video in seconds.
 
virtual void SetPlaybackRate (double rate)=0
 Set the playback rate.
 
virtual double GetLastDecodedVideoTimeStamp ()=0
 Returns the timestamp of the last decoded video frame.
 
virtual bool CanPlayAudio ()=0
 Returns true if there isn't an audio track, or there is but the decoder can play it.
 
virtual unsigned int GetAudioChannelCount ()=0
 Returns the number of audio channels in this video;.
 
virtual double GetFrameRate ()=0
 Returns the average desired frame-rate.
 

Public Attributes

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

 VuoVideoDecoder ()
 Base constructor does nothing interesting.
 

Member Typedef Documentation

Forward declare VuoVideoPlayer for the onReady delegate.

Constructor & Destructor Documentation

VuoVideoDecoder::VuoVideoDecoder ( )
inlineprotected

Base constructor does nothing interesting.

virtual VuoVideoDecoder::~VuoVideoDecoder ( )
inlinevirtual

Clean up any resources claimed by decoder.

Member Function Documentation

virtual bool VuoVideoDecoder::CanPlayAudio ( )
pure virtual

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

Implemented in VuoFfmpegDecoder, and VuoAvDecoder.

virtual unsigned int VuoVideoDecoder::GetAudioChannelCount ( )
pure virtual

Returns the number of audio channels in this video;.

Implemented in VuoFfmpegDecoder, and VuoAvDecoder.

virtual double VuoVideoDecoder::GetDuration ( )
pure virtual

The total duration of this video in seconds.

Implemented in VuoFfmpegDecoder, and VuoAvDecoder.

virtual double VuoVideoDecoder::GetFrameRate ( )
pure virtual

Returns the average desired frame-rate.

Implemented in VuoFfmpegDecoder, and VuoAvDecoder.

virtual double VuoVideoDecoder::GetLastDecodedVideoTimeStamp ( )
pure virtual

Returns the timestamp of the last decoded video frame.

Implemented in VuoFfmpegDecoder, and VuoAvDecoder.

virtual bool VuoVideoDecoder::IsReady ( )
inlinevirtual

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 in VuoFfmpegDecoder, and VuoAvDecoder.

virtual bool VuoVideoDecoder::NextAudioFrame ( VuoAudioFrame audio)
pure virtual

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

Implemented in VuoFfmpegDecoder, and VuoAvDecoder.

virtual bool VuoVideoDecoder::NextVideoFrame ( VuoVideoFrame frame)
pure virtual

Get the next video frame in the queue. Image comes with a retain count of 1 (as opposed to the usual non-registered value). If playback speed is negative, this will the the frame prior to the last retrieved.

Implemented in VuoFfmpegDecoder, and VuoAvDecoder.

virtual bool VuoVideoDecoder::SeekToSecond ( double  second)
pure virtual

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

Implemented in VuoFfmpegDecoder, and VuoAvDecoder.

virtual void VuoVideoDecoder::SetPlaybackRate ( double  rate)
pure 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.

Implemented in VuoFfmpegDecoder, and VuoAvDecoder.

Member Data Documentation

void(VideoPlayer::* VuoVideoDecoder::onReadyToPlay)(bool canPlayMedia)

A delegate to be called when the decoder is ready to begin playback.

VideoPlayer* VuoVideoDecoder::videoPlayer = NULL

Reference to the VuoVideoPlayer making use of this decoder.


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