#include <v4l1buffer.h>
T | The pixel type of the frames. The supported type are <CVD::byte> which returns 8-bit grey scale and <CVD::bayer> which returns an 8-bit grey scale image containing the raw intensities of the sensor. You have to convert the returned image to a byte image or something else to use it in a meaningful way. <CVD::Rgb<CVD::byte> > should work to but crashes with my current driver ?! The pixel type used will automatically configure the underlying RawV4L1 object to use the right video palette. |
frame_rate currently returns fixed 30 fps and frame_pending is untested.
Definition at line 190 of file v4l1buffer.h.
Public Member Functions | |
V4L1Buffer (const std::string &dev) | |
V4L1Buffer (const std::string &dev, ImageRef size) | |
virtual ImageRef | size () |
virtual VideoFrame< T > * | get_frame () |
virtual void | put_frame (VideoFrame< T > *f) |
virtual bool | frame_pending () |
virtual double | frame_rate () |
virtual | ~V4L1Buffer () |
CVD::V4L1Buffer< T >::V4L1Buffer | ( | const std::string & | dev | ) | [inline] |
Construct a video buffer.
dev | file name of the device to use |
Definition at line 195 of file v4l1buffer.h.
CVD::V4L1Buffer< T >::V4L1Buffer | ( | const std::string & | dev, | |
ImageRef | size | |||
) | [inline] |
Construct a video buffer.
dev | file name of the device to use | |
size | Size of the video stream to grab |
Definition at line 203 of file v4l1buffer.h.
virtual ImageRef CVD::V4L1Buffer< T >::size | ( | ) | [inline, virtual] |
The size of the VideoFrames returned by this buffer.
Implements CVD::VideoBuffer< T >.
Definition at line 208 of file v4l1buffer.h.
virtual VideoFrame<T>* CVD::V4L1Buffer< 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 212 of file v4l1buffer.h.
References CVD::cvd_timer::get_time(), and CVD::timer.
virtual void CVD::V4L1Buffer< 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 216 of file v4l1buffer.h.
References CVD::SubImage< T >::data().
virtual bool CVD::V4L1Buffer< 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 221 of file v4l1buffer.h.
virtual double CVD::V4L1Buffer< 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 225 of file v4l1buffer.h.