|
VideoTools
|
A video-capture buffer class to hold image data, with overloaded constructors for the various V4l i/o mechanisms. More...
#include <gvcapturebuffer.h>
Public Member Functions | |
| CaptureBuffer (size_t length) | |
| Constructor for a malloc()ed buffer suitable for "read()" i/o. | |
| CaptureBuffer (size_t length, void *p, int(*unmap)(void *, size_t)) | |
| Constructor for a mmap-ed i/o. | |
| CaptureBuffer (size_t page_size, size_t buffer_size) | |
| Constructor for a memalign()ed buffer suitable for "userptr" i/o. | |
| ~CaptureBuffer () | |
| Destructor. | |
| const unsigned char * | begin () const |
| Returns a pointer to start of the dword-aligned data buffer. | |
| unsigned char * | begin () |
| Non-const overload. | |
| const unsigned char * | end () const |
| Returns a pointer off the end of the raw data buffer. | |
| size_t | size () const |
| Returns the size of the buffer. | |
| CaptureBufferIterator | row (int y) const |
| Returns a pixel iterator for the y'th row. | |
| void | setFormat (const CaptureBufferFormat &, const CaptureBufferScale &) |
| Used by the Gv::Capture class to imbue the buffer with a particular format description and scale. More... | |
| void | copyTo (Gr::ImageData &) const |
| Copies the image to a correctly-sized image data buffer. | |
| void | copy (int dx, int dy, char *p_out, size_t out_size) const |
| Copies the image to an rgb output buffer. | |
| void | copy (int dx, int dy, unsigned char *p_out, size_t out_size) const |
| Overload for unsigned char. | |
| size_t | offset_imp (int c, int x, int y) const |
| Used by Gv::CaptureBufferIterator. | |
| size_t | offset_imp (int c, int y) const |
| Used by Gv::CaptureBufferIterator. | |
|
Gr::ColourSpace::triple < unsigned char > | rgb_imp (size_t, size_t, size_t) const |
| Used by Gv::CaptureBufferIterator. | |
| unsigned char | luma_imp (size_t, size_t, size_t) const |
| Used by Gv::CaptureBufferIterator. | |
A video-capture buffer class to hold image data, with overloaded constructors for the various V4l i/o mechanisms.
The buffer contents are straight from the video device; the setFormat() must be used to tell the buffer what format it contains. The accessor methods row() and copy()/copyTo() can then be used to extract RGB pixels. The low-level pixelformat conversion is performed by the Gv::CaptureBufferIterator class.
Definition at line 75 of file gvcapturebuffer.h.
| void Gv::CaptureBuffer::setFormat | ( | const CaptureBufferFormat & | f, |
| const CaptureBufferScale & | s | ||
| ) |
Used by the Gv::Capture class to imbue the buffer with a particular format description and scale.
Definition at line 88 of file gvcapturebuffer.cpp.