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

#include <v4lbuffer.h>

Inheritance diagram for CVD::V4LBuffer< T >:

CVD::VideoBuffer< T >

List of all members.


Detailed Description

template<class T>
class CVD::V4LBuffer< T >

A live video buffer which uses the Video for Linux 2 (V4L2) API.

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

Member Function Documentation

template<class T>
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().

template<class T>
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.

template<class T>
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.

Parameters:
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().

template<class T>
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().

template<class T>
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().


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