CVD::VideoFileBuffer< T > Class Template Reference
[Video buffers]

#include <videofilebuffer.h>

Inheritance diagram for CVD::VideoFileBuffer< T >:

CVD::LocalVideoBuffer< T > CVD::VideoBuffer< T >

List of all members.


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:
T The pixel type of the video frames. Currently only CVD::Rgb<CVD::byte> > and CVD::byte> are supported.

Definition at line 207 of file videofilebuffer.h.


Public Member Functions

 VideoFileBuffer (const std::string &file)
 ~VideoFileBuffer ()
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 ()

Constructor & Destructor Documentation

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

Construct a VideoFileBuffer to play this file.

Parameters:
file The path to the video file

Definition at line 216 of file videofilebuffer.h.


Member Function Documentation

template<typename T>
virtual ImageRef CVD::VideoFileBuffer< T >::size (  )  [inline, virtual]

The size of the VideoFrames returned by this buffer.

Implements CVD::LocalVideoBuffer< T >.

Definition at line 225 of file videofilebuffer.h.

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

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 230 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:
behaviour The desired behaviour

Definition at line 237 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:
t The frame time in seconds

Reimplemented from CVD::LocalVideoBuffer< T >.

Definition at line 242 of file videofilebuffer.h.

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

template<typename T>
virtual VideoFileFrame<T>* CVD::VideoFileBuffer< T >::get_frame (  )  [inline, virtual]

Returns the next frame from the buffer. This function blocks until a frame is ready.

Implements CVD::LocalVideoBuffer< T >.

Definition at line 247 of file videofilebuffer.h.

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

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:
f The frame that you are finished with.

Implements CVD::LocalVideoBuffer< T >.

Definition at line 252 of file videofilebuffer.h.

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

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

What is the (expected) frame rate of this video buffer, in frames per second?

Implements CVD::VideoBuffer< T >.

Definition at line 259 of file videofilebuffer.h.

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

template<typename T>
std::string CVD::VideoFileBuffer< T >::file_name (  )  [inline]

What is the path to the video file?

Definition at line 265 of file videofilebuffer.h.

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

template<typename T>
std::string CVD::VideoFileBuffer< T >::codec_name (  )  [inline]

What codec is being used to decode this video?

Definition at line 271 of file videofilebuffer.h.

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


The documentation for this class was generated from the following file:
Generated on Wed Feb 18 10:23:09 2009 for CVD by  doxygen 1.5.3