An object for controlling and extracting information from video using FFMPEG.
Definition at line 49 of file VuoFfmpegDecoder.h.
Public Member Functions | |
virtual | ~VuoFfmpegDecoder () |
Unload objects allocated by the FFMPEG decoder. More... | |
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. More... | |
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. More... | |
virtual bool | SeekToSecond (double second, VuoVideoFrame *frame) |
Seek the playhead to the second. second is not in timestamp format, rather, relative to movie start = 0. More... | |
bool | ContainsAudio () |
Returns true if video contains an audio track. More... | |
virtual double | GetDuration () |
The total duration of this video in seconds. More... | |
virtual void | SetPlaybackRate (double rate) |
Set the playback rate. More... | |
virtual double | GetLastDecodedVideoTimeStamp () |
Returns the timestamp of the last decoded video frame. More... | |
virtual bool | CanPlayAudio () |
Returns true if there isn't an audio track, or there is but the decoder can play it. More... | |
virtual unsigned int | GetAudioChannelCount () |
Returns the number of audio channels available. More... | |
virtual bool | IsReady () |
Returns true if this asset is loaded and ready to play. More... | |
virtual double | GetFrameRate () |
Returns the average frame-rate. More... | |
Public Member Functions inherited from VuoVideoDecoder | |
virtual | ~VuoVideoDecoder () |
Clean up any resources claimed by decoder. More... | |
Static Public Member Functions | |
static VuoFfmpegDecoder * | Create (VuoUrl url) |
Initialize a instance of the FFMPEG decoder. Can return NULL if initialization fails (but will clean up after itself in that event). More... | |
Additional Inherited Members | |
Public Types inherited from VuoVideoDecoder | |
typedef class VuoVideoPlayer | VideoPlayer |
Forward declare VuoVideoPlayer for the onReady delegate. More... | |
Public Attributes inherited from VuoVideoDecoder | |
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 inherited from VuoVideoDecoder | |
VuoVideoDecoder () | |
Base constructor does nothing interesting. More... | |
|
virtual |
Unload objects allocated by the FFMPEG decoder.
Definition at line 425 of file VuoFfmpegDecoder.cc.
|
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.
Definition at line 459 of file VuoFfmpegDecoder.cc.
bool VuoFfmpegDecoder::ContainsAudio | ( | ) |
Returns true if video contains an audio track.
Definition at line 1165 of file VuoFfmpegDecoder.cc.
|
static |
Initialize a instance of the FFMPEG decoder. Can return NULL if initialization fails (but will clean up after itself in that event).
Definition at line 90 of file VuoFfmpegDecoder.cc.
|
virtual |
Returns the number of audio channels available.
Implements VuoVideoDecoder.
Definition at line 464 of file VuoFfmpegDecoder.cc.
|
virtual |
The total duration of this video in seconds.
Implements VuoVideoDecoder.
Definition at line 1170 of file VuoFfmpegDecoder.cc.
|
virtual |
Returns the average frame-rate.
Implements VuoVideoDecoder.
Definition at line 1226 of file VuoFfmpegDecoder.cc.
|
virtual |
Returns the timestamp of the last decoded video frame.
Implements VuoVideoDecoder.
Definition at line 1221 of file VuoFfmpegDecoder.cc.
|
inlinevirtual |
Returns true if this asset is loaded and ready to play.
Reimplemented from VuoVideoDecoder.
Definition at line 77 of file VuoFfmpegDecoder.h.
|
virtual |
Get the next audio frame in the queue. If playback speed is negative (or anything other than 1), this returns nothing.
Implements VuoVideoDecoder.
Definition at line 822 of file VuoFfmpegDecoder.cc.
|
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.
Definition at line 501 of file VuoFfmpegDecoder.cc.
|
virtual |
Seek the playhead to the second. second
is not in timestamp format, rather, relative to movie start = 0.
Implements VuoVideoDecoder.
Definition at line 1096 of file VuoFfmpegDecoder.cc.
|
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.
Definition at line 1205 of file VuoFfmpegDecoder.cc.