Vuo  2.3.2
Classes | Public Member Functions | Static Public Member Functions | List of all members
VuoFfmpegDecoder Class Reference

Description

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 VuoFfmpegDecoderCreate (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
VideoPlayervideoPlayer = 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...
 

Constructor & Destructor Documentation

◆ ~VuoFfmpegDecoder()

VuoFfmpegDecoder::~VuoFfmpegDecoder ( )
virtual

Unload objects allocated by the FFMPEG decoder.

Definition at line 425 of file VuoFfmpegDecoder.cc.

Member Function Documentation

◆ CanPlayAudio()

bool VuoFfmpegDecoder::CanPlayAudio ( )
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.

◆ ContainsAudio()

bool VuoFfmpegDecoder::ContainsAudio ( )

Returns true if video contains an audio track.

Definition at line 1165 of file VuoFfmpegDecoder.cc.

◆ Create()

VuoFfmpegDecoder * VuoFfmpegDecoder::Create ( VuoUrl  url)
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.

◆ GetAudioChannelCount()

unsigned int VuoFfmpegDecoder::GetAudioChannelCount ( )
virtual

Returns the number of audio channels available.

Implements VuoVideoDecoder.

Definition at line 464 of file VuoFfmpegDecoder.cc.

◆ GetDuration()

double VuoFfmpegDecoder::GetDuration ( )
virtual

The total duration of this video in seconds.

Implements VuoVideoDecoder.

Definition at line 1170 of file VuoFfmpegDecoder.cc.

◆ GetFrameRate()

double VuoFfmpegDecoder::GetFrameRate ( )
virtual

Returns the average frame-rate.

Implements VuoVideoDecoder.

Definition at line 1226 of file VuoFfmpegDecoder.cc.

◆ GetLastDecodedVideoTimeStamp()

double VuoFfmpegDecoder::GetLastDecodedVideoTimeStamp ( )
virtual

Returns the timestamp of the last decoded video frame.

Implements VuoVideoDecoder.

Definition at line 1221 of file VuoFfmpegDecoder.cc.

◆ IsReady()

virtual bool VuoFfmpegDecoder::IsReady ( )
inlinevirtual

Returns true if this asset is loaded and ready to play.

Reimplemented from VuoVideoDecoder.

Definition at line 77 of file VuoFfmpegDecoder.h.

◆ NextAudioFrame()

bool VuoFfmpegDecoder::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.

Definition at line 822 of file VuoFfmpegDecoder.cc.

◆ NextVideoFrame()

bool VuoFfmpegDecoder::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.

Definition at line 501 of file VuoFfmpegDecoder.cc.

◆ SeekToSecond()

bool VuoFfmpegDecoder::SeekToSecond ( double  second,
VuoVideoFrame frame 
)
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.

◆ SetPlaybackRate()

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

Definition at line 1205 of file VuoFfmpegDecoder.cc.


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