VideoTools
|
A video capture implementation for video-for-linux (v4l). More...
#include <gvcapture_v4l.h>
Public Types | |
enum | io_method { IO_METHOD_READ, IO_METHOD_MMAP, IO_METHOD_USERPTR } |
Public Member Functions | |
CaptureV4l (const std::string &dev_name, const std::string &dev_config) | |
Constructor. More... | |
~CaptureV4l () | |
Destructor. | |
virtual void | start () override |
Override from Gv::Capture. | |
virtual void | stop () override |
Override from Gv::Capture. | |
virtual bool | simple () const override |
Override from Gv::Capture. | |
virtual bool | read (unsigned char *, size_t) override |
Override from Gv::Capture. | |
virtual bool | read (CaptureCallback &) override |
Override from Gv::Capture. | |
virtual int | fd () const override |
Override from Gv::Capture. | |
virtual unsigned int | dx () const override |
Override from Gv::Capture. | |
virtual unsigned int | dy () const override |
Override from Gv::Capture. | |
virtual bool | active () const override |
Override from Gv::Capture. | |
virtual std::string | info () const override |
Override from Gv::Capture. | |
Public Member Functions inherited from Gv::Capture | |
virtual | ~Capture ()=0 |
Destructor. | |
Friends | |
class | Gv::CaptureRequeuer |
A video capture implementation for video-for-linux (v4l).
Definition at line 40 of file gvcapture_v4l.h.
Enumerator | |
---|---|
IO_METHOD_USERPTR |
TODO DMA method. |
Definition at line 43 of file gvcapture_v4l.h.
Gv::CaptureV4l::CaptureV4l | ( | const std::string & | dev_name, |
const std::string & | dev_config | ||
) |
Constructor.
Opens the video device, with optional device-specific configuration that can include "buffers=<n>", "nolibv4l", "mmap", "read", "userptr", and "fmt=<n>". The number of buffers should be small to reduce latency, or larger for better throughput.
Definition at line 153 of file gvcapture_v4l.cpp.