A video buffer to play frames from a video file.
More...
#include <videofilebuffer.h>
|
| VideoFileBuffer (const std::string &file, bool verbose=false) |
| Construct a VideoFileBuffer to play this file. More...
|
|
| VideoFileBuffer (const std::string &file, const std::string &fmt, bool verbose=false) |
|
| VideoFileBuffer (const std::string &file, const std::string &fmt, bool verbose, const std::map< std::string, std::string > &o) |
|
virtual ImageRef | size () |
| The size of the VideoFrames returned by this buffer.
|
|
virtual bool | frame_pending () |
| Is there a frame waiting in the buffer? This function does not block. More...
|
|
virtual void | on_end_of_buffer (VideoBufferFlags::OnEndOfBuffer behaviour) |
| What should the buffer do when it reaches the end of the list of files? More...
|
|
virtual void | seek_to (double t) |
| Go to a particular point in the video buffer (only implemented in buffers of recorded video) More...
|
|
virtual VideoFileFrame< T > * | get_frame () |
| Returns the next frame from the buffer. This function blocks until a frame is ready.
|
|
virtual void | put_frame (VideoFrame< T > *f) |
| Tell the buffer that you are finished with this frame. More...
|
|
double | frame_rate () |
| What is the (expected) frame rate of this video buffer, in frames per second?
|
|
std::string | file_name () |
| What is the path to the video file?
|
|
| LocalVideoBuffer (typename VideoBufferType::Type t) |
|
| VideoBuffer (VideoBufferType::Type _type) |
| Construct the buffer with the known semantics.
|
|
virtual void | flush () |
| Flush all old frames out of the video buffer, on a flushable buffer, causing the next get_frame() to sleep until a frame arrives. More...
|
|
VideoBufferType::Type | type () |
| Returns the type of the video stream. More...
|
|
virtual RawVideoBuffer * | source_buffer () |
| Which video grabber provides the source images for this video grabber. More...
|
|
RawVideoBuffer * | root_buffer () |
| Follow the chain of video grabbers back as far as at will go. More...
|
|
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. |
◆ VideoFileBuffer()
Construct a VideoFileBuffer to play this file.
- Parameters
-
file | The path to the video file |
◆ frame_pending()
Is there a frame waiting in the buffer? This function does not block.
See is_live and is_flushable.
Implements CVD::LocalVideoBuffer< T >.
◆ on_end_of_buffer()
What should the buffer do when it reaches the end of the list of files?
- Parameters
-
behaviour | The desired behaviour |
◆ put_frame()
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 >.
◆ seek_to()
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 >.
The documentation for this class was generated from the following file: