Virtual class from which Ffmpeg and AvFoundation video decoders inherit.
Definition at line 26 of file VuoVideoDecoder.h.
Public Types | |
typedef class VuoVideoPlayer | VideoPlayer |
Forward declare VuoVideoPlayer for the onReady delegate. More... | |
Public Member Functions | |
virtual | ~VuoVideoDecoder () |
Clean up any resources claimed by decoder. More... | |
virtual bool | IsReady () |
Bool relaying the preparedness of playback. More... | |
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. More... | |
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. More... | |
virtual bool | SeekToSecond (double second, VuoVideoFrame *frame)=0 |
Seek the playhead to the second. More... | |
virtual double | GetDuration ()=0 |
The total duration of this video in seconds. More... | |
virtual void | SetPlaybackRate (double rate)=0 |
Set the playback rate. More... | |
virtual double | GetLastDecodedVideoTimeStamp ()=0 |
Returns the timestamp of the last decoded video frame. More... | |
virtual bool | CanPlayAudio ()=0 |
Returns true if there isn't an audio track, or there is but the decoder can play it. More... | |
virtual unsigned int | GetAudioChannelCount ()=0 |
Returns the number of audio channels in this video;. More... | |
virtual double | GetFrameRate ()=0 |
Returns the average desired frame-rate. More... | |
Public Attributes | |
VideoPlayer * | videoPlayer = NULL |
Reference to the VuoVideoPlayer making use of this decoder. More... | |
void(VideoPlayer::* | onReadyToPlay )(bool canPlayMedia) |
A delegate to be called when the decoder is ready to begin playback. More... | |
Protected Member Functions | |
VuoVideoDecoder () | |
Base constructor does nothing interesting. More... | |
typedef class VuoVideoPlayer VuoVideoDecoder::VideoPlayer |
Forward declare VuoVideoPlayer for the onReady delegate.
Definition at line 42 of file VuoVideoDecoder.h.
|
inlineprotected |
Base constructor does nothing interesting.
Definition at line 30 of file VuoVideoDecoder.h.
|
inlinevirtual |
Clean up any resources claimed by decoder.
Definition at line 39 of file VuoVideoDecoder.h.
|
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.
|
pure virtual |
Returns the number of audio channels in this video;.
Implemented in VuoFfmpegDecoder, and VuoAvDecoder.
|
pure virtual |
The total duration of this video in seconds.
Implemented in VuoFfmpegDecoder, and VuoAvDecoder.
|
pure virtual |
Returns the average desired frame-rate.
Implemented in VuoFfmpegDecoder, and VuoAvDecoder.
|
pure virtual |
Returns the timestamp of the last decoded video frame.
Implemented in VuoFfmpegDecoder, and VuoAvDecoder.
|
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.
Definition at line 51 of file VuoVideoDecoder.h.
|
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.
|
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.
|
pure virtual |
Seek the playhead to the second.
second
is not in timestamp format, rather, relative to movie start = 0.
The video frame at that time is returned in frame
. frame
can be NULL if the caller doesn't need the video frame.
Implemented in VuoFfmpegDecoder, and VuoAvDecoder.
|
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.
void(VideoPlayer::* VuoVideoDecoder::onReadyToPlay) (bool canPlayMedia) |
A delegate to be called when the decoder is ready to begin playback.
Definition at line 46 of file VuoVideoDecoder.h.
VideoPlayer* VuoVideoDecoder::videoPlayer = NULL |
Reference to the VuoVideoPlayer making use of this decoder.
Definition at line 44 of file VuoVideoDecoder.h.