CVD 0.8
Public Member Functions
CVD::VideoFileBuffer< T > Class Template Reference

A video buffer to play frames from a video file. More...

#include <videofilebuffer.h>

Inheritance diagram for CVD::VideoFileBuffer< T >:
CVD::LocalVideoBuffer< T > CVD::VideoBuffer< T > CVD::RawVideoBuffer

List of all members.

Public Member Functions

 VideoFileBuffer (const std::string &file)
virtual ImageRef size ()
virtual bool frame_pending ()
virtual void on_end_of_buffer (VideoBufferFlags::OnEndOfBuffer behaviour)
virtual void seek_to (double t)
virtual VideoFileFrame< T > * get_frame ()
virtual void put_frame (VideoFrame< T > *f)
double frame_rate ()
std::string file_name ()
std::string codec_name ()

Detailed Description

template<typename T>
class CVD::VideoFileBuffer< T >

A video buffer to play frames from a video file.

This uses the ffmpeg library (http://ffmpeg.sourceforge.net/) to play a wide range of video formats, including MPEG (1, 2 and 4) and AVI (including DivX and DV) files. Provides frames of type CVD::VideoFileFrame and throws exceptions of type CVD::Exceptions::VideoFileBuffer

Parameters:
TThe pixel type of the video frames. Currently only CVD::Rgb<CVD::byte> > and CVD::byte> are supported.

Definition at line 152 of file videofilebuffer.h.


Constructor & Destructor Documentation

template<typename T >
CVD::VideoFileBuffer< T >::VideoFileBuffer ( const std::string &  file) [inline]

Construct a VideoFileBuffer to play this file.

Parameters:
fileThe path to the video file

Definition at line 161 of file videofilebuffer.h.


Member Function Documentation

template<typename T >
virtual bool CVD::VideoFileBuffer< T >::frame_pending ( ) [inline, virtual]

Is there a frame waiting in the buffer? This function does not block.

See is_live and is_flushable.

Implements CVD::LocalVideoBuffer< T >.

Definition at line 175 of file videofilebuffer.h.

References CVD::VFB::RawVideoFileBuffer::frame_pending().

template<typename T >
virtual void CVD::VideoFileBuffer< T >::on_end_of_buffer ( VideoBufferFlags::OnEndOfBuffer  behaviour) [inline, virtual]

What should the buffer do when it reaches the end of the list of files?

Parameters:
behaviourThe desired behaviour

Definition at line 182 of file videofilebuffer.h.

References CVD::VFB::RawVideoFileBuffer::on_end_of_buffer().

template<typename T >
virtual void CVD::VideoFileBuffer< T >::seek_to ( double  ) [inline, virtual]

Go to a particular point in the video buffer (only implemented in buffers of recorded video)

Parameters:
tThe frame time in seconds

Reimplemented from CVD::LocalVideoBuffer< T >.

Definition at line 187 of file videofilebuffer.h.

References CVD::VFB::RawVideoFileBuffer::seek_to().

template<typename T >
virtual void CVD::VideoFileBuffer< T >::put_frame ( VideoFrame< T > *  f) [inline, virtual]

Tell the buffer that you are finished with this frame.

Typically the VideoBuffer then destroys the frame.

Parameters:
fThe frame that you are finished with.

Implements CVD::LocalVideoBuffer< T >.

Definition at line 197 of file videofilebuffer.h.

References CVD::VFB::RawVideoFileBuffer::put_frame().


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