#include <videofilebuffer.h>
Public Member Functions | |
std::string | codec_name () |
What codec is being used to decode this video? | |
std::string | file_name () |
What is the path to the video file? | |
virtual bool | frame_pending () |
double | frame_rate () |
What is the (expected) frame rate of this video buffer, in frames per second? | |
virtual VideoFileFrame< T > * | get_frame () |
Returns the next frame from the buffer. This function blocks until a frame is ready. | |
virtual void | on_end_of_buffer (VideoBufferFlags::OnEndOfBuffer behaviour) |
virtual void | put_frame (VideoFrame< T > *f) |
virtual void | seek_to (double t) |
virtual ImageRef | size () |
The size of the VideoFrames returned by this buffer. | |
VideoFileBuffer (const std::string &file) | |
~VideoFileBuffer () | |
Private Attributes | |
VFB::RawVideoFileBuffer | vf |
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 207 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 216 of file videofilebuffer.h.
CVD::VideoFileBuffer< T >::~VideoFileBuffer | ( | ) | [inline] |
Definition at line 221 of file videofilebuffer.h.
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.
std::string CVD::VideoFileBuffer< T >::file_name | ( | ) | [inline] |
What is the path to the video file?
Definition at line 265 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 230 of file videofilebuffer.h.
double CVD::VideoFileBuffer< T >::frame_rate | ( | ) | [inline, virtual] |
What is the (expected) frame rate of this video buffer, in frames per second?
Implements CVD::RawVideoBuffer.
Definition at line 259 of file videofilebuffer.h.
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.
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 237 of file videofilebuffer.h.
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 252 of file videofilebuffer.h.
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 242 of file videofilebuffer.h.
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.
VFB::RawVideoFileBuffer CVD::VideoFileBuffer< T >::vf [private] |
Definition at line 210 of file videofilebuffer.h.