VideoTools
|
A video capture abstract interface, exposing a file descriptor and a method to handle read events on it. More...
#include <gvcapture.h>
Public Member Functions | |
virtual | ~Capture ()=0 |
Destructor. | |
virtual void | start ()=0 |
Restarts capturing after a stop(). Not normally needed. | |
virtual void | stop ()=0 |
Stops capturing. | |
virtual bool | simple () const =0 |
Returns true if a complete RGB24 image can be read out of the capture device and straight into a contiguous image buffer using the appropriate read() overload. More... | |
virtual bool | read (unsigned char *, size_t n)=0 |
Does a read of an RGB24 image into the user-supplied buffer, on condition that the device is simple(). More... | |
virtual bool | read (CaptureCallback &)=0 |
Delivers an image to the given callback fn. More... | |
virtual int | fd () const =0 |
Returns the fd for select(). More... | |
virtual unsigned int | dx () const =0 |
Returns the width. | |
virtual unsigned int | dy () const =0 |
Returns the height. | |
virtual bool | active () const =0 |
Returns true after construction or start(), and false after stop(). More... | |
virtual std::string | info () const =0 |
Returns information for debugging and logging purposes. | |
A video capture abstract interface, exposing a file descriptor and a method to handle read events on it.
The read method delivers images to a callback interface in a "capture buffer".
Definition at line 40 of file gvcapture.h.
|
pure virtual |
Returns true after construction or start(), and false after stop().
Implemented in Gv::CaptureV4l, and Gv::CaptureTest.
|
pure virtual |
Returns the fd for select().
Note that when using streaming i/o there is no way to stop events being delivered to this file descriptor. Using stop() is not sufficient; also remove the file descriptor from the event loop.
Implemented in Gv::CaptureV4l, and Gv::CaptureTest.
|
pure virtual |
Does a read of an RGB24 image into the user-supplied buffer, on condition that the device is simple().
Implemented in Gv::CaptureV4l, and Gv::CaptureTest.
|
pure virtual |
Delivers an image to the given callback fn.
Returns true if an image was delivered to the callback interface, or false if none was available.
Implemented in Gv::CaptureV4l, and Gv::CaptureTest.
|
pure virtual |
Returns true if a complete RGB24 image can be read out of the capture device and straight into a contiguous image buffer using the appropriate read() overload.
This is typically only true when using libv4l with the 'read' i/o method.
Implemented in Gv::CaptureV4l, and Gv::CaptureTest.