libcvd
|
A live video buffer which uses the Video for Linux 2 (V4L2) API. More...
#include <uvcbuffer.h>
Public Member Functions | |
UVCBuffer (const std::string &dev, ImageRef size, int frames_per_second=0, bool mjpeg=0, bool verbose=0) | |
virtual ImageRef | size () |
The size of the VideoFrames returned by this buffer. | |
virtual VideoFrame< 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... | |
virtual bool | frame_pending () |
Is there a frame waiting in the buffer? This function does not block. More... | |
virtual double | frame_rate () |
What is the (expected) frame rate of this video buffer, in frames per second? | |
int | num_buffers () |
![]() | |
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... | |
virtual void | seek_to (double) |
Go to a particular point in the video buffer (only implemented in buffers of recorded video) More... | |
![]() | |
RawUVCBuffer (const std::string &dev, unsigned int fmt, ImageRef size, double frame_per_second, bool mjpeg, bool verbose) | |
ImageRef | getSize () |
void | fill_frame (void *) |
double | getRate () |
const std::string & | device_name () const |
RawUVCBuffer (const RawUVCBuffer &)=delete | |
void | operator= (const RawUVCBuffer &)=delete |
A live video buffer which uses the Video for Linux 2 (V4L2) API.
A replacement for the (deprecated?) V4L2Buffer
|
inlinevirtual |
Is there a frame waiting in the buffer? This function does not block.
See is_live and is_flushable.
Implements CVD::RawVideoBuffer.
|
inlinevirtual |
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 >.