CVD 0.8
|
A video buffer to play frames from a video file. More...
#include <videofilebuffer.h>
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 () |
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
T | The 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.
CVD::VideoFileBuffer< T >::VideoFileBuffer | ( | const std::string & | file | ) | [inline] |
Construct a VideoFileBuffer to play this file.
file | The path to the video file |
Definition at line 161 of file videofilebuffer.h.
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().
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?
behaviour | The desired behaviour |
Definition at line 182 of file videofilebuffer.h.
References CVD::VFB::RawVideoFileBuffer::on_end_of_buffer().
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)
t | The frame time in seconds |
Reimplemented from CVD::LocalVideoBuffer< T >.
Definition at line 187 of file videofilebuffer.h.
References CVD::VFB::RawVideoFileBuffer::seek_to().
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.
f | The frame that you are finished with. |
Implements CVD::LocalVideoBuffer< T >.
Definition at line 197 of file videofilebuffer.h.
References CVD::VFB::RawVideoFileBuffer::put_frame().