#include <v4lbuffer.h>
A replacement for the (deprecated?) V4L2Buffer
Definition at line 152 of file v4lbuffer.h.
Public Member Functions | |
V4LBuffer (const std::string &dev, ImageRef size, int input=-1, bool fields=false, int frames_per_second=0, bool verbose=0) | |
virtual ImageRef | size () |
virtual VideoFrame< T > * | get_frame () |
virtual void | put_frame (VideoFrame< T > *f) |
virtual bool | frame_pending () |
virtual double | frame_rate () |
virtual | ~V4LBuffer () |
int | num_buffers () |
const std::string & | device_name () const |
Classes | |
struct | V4LFrame |
virtual ImageRef CVD::V4LBuffer< T >::size | ( | ) | [inline, virtual] |
The size of the VideoFrames returned by this buffer.
Implements CVD::VideoBuffer< T >.
Definition at line 171 of file v4lbuffer.h.
References CVD::V4L::V4L2Client::getSize().
virtual VideoFrame<T>* CVD::V4LBuffer< T >::get_frame | ( | ) | [inline, virtual] |
Returns the next frame from the buffer. This function blocks until a frame is ready.
Implements CVD::VideoBuffer< T >.
Definition at line 172 of file v4lbuffer.h.
References CVD::V4L::V4L2Client::Buffer::data, CVD::V4L::V4L2Client::getFrame(), CVD::V4L::V4L2Client::getSize(), CVD::V4L::V4L2Client::Buffer::id, and CVD::V4L::V4L2Client::Buffer::when.
virtual void CVD::V4LBuffer< 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::VideoBuffer< T >.
Definition at line 184 of file v4lbuffer.h.
References CVD::V4L::V4L2Client::releaseFrame().
virtual bool CVD::V4LBuffer< 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::VideoBuffer< T >.
Definition at line 200 of file v4lbuffer.h.
References CVD::V4L::V4L2Client::pendingFrame().
virtual double CVD::V4LBuffer< 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 201 of file v4lbuffer.h.
References CVD::V4L::V4L2Client::getRate().