Vuo
1.2.0
|
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. | |
![]() | |
virtual | ~VuoVideoDecoder () |
Clean up any resources claimed by decoder. | |
Static Public Member Functions | |
static VuoAvDecoder * | Create (VuoUrl url) |
Initialize a new AvFoundation video decoder with URL. | |
Protected Member Functions | |
VuoAvDecoder () | |
Constructor initializes the decoder object. | |
![]() | |
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 | |
![]() | |
typedef class VuoVideoPlayer | VideoPlayer |
Forward declare VuoVideoPlayer for the onReady delegate. | |
![]() | |
VideoPlayer * | videoPlayer = 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. | |
|
inlineprotected |
Constructor initializes the decoder object.
|
virtual |
Clean up any resources claimed by decoder.
|
virtual |
Returns true if there isn't an audio track, or there is but the decoder can play it.
Implements VuoVideoDecoder.
|
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.
|
virtual |
Returns the number of audio channels in this video;.
Implements VuoVideoDecoder.
|
virtual |
The total duration of this video in seconds.
Implements VuoVideoDecoder.
|
virtual |
The average video framerate.
Implements VuoVideoDecoder.
|
virtual |
Returns the timestamp of the last decoded video frame.
Implements VuoVideoDecoder.
|
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.
|
virtual |
Get the next audio frame in the queue. If playback speed is negative (or anything other than 1), this returns nothing.
Implements VuoVideoDecoder.
|
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.
|
virtual |
Seek the playhead to the second. second
is not in timestamp format, rather, relative to movie start.
Implements VuoVideoDecoder.
|
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.
|
protected |
Serializes all operations, so this class's methods can be called from any thread.