v4l2 camera abstraction More...
#include <uvc.h>
Classes | |
class | ControlEntry |
shared pointer for v4l2 control entries More... | |
Public Types | |
typedef boost::shared_ptr < ControlEntry > | ControlEntryPtr |
typedef int | FD |
typedef boost::shared_ptr < v4l2_control > | v4l2_controlPtr |
Public Member Functions | |
const std::vector < ControlEntryPtr > & | detectControlEnties () |
ControlEntryPtr | getControlEntry (std::string varName) |
bool | grab () |
destructor | |
bool | hasErrorMsg () const |
bool | hasInfoMsg () const |
FD | initCamera (const std::string &videoDevice="") |
vector of the current supported control entries | |
bool | isBlackListed (int control) |
int | load_controls (const std::string &filename) |
std::string | pullErrorMsg () |
std::string | pullInfoMsg () |
int | save_controls (const std::string &filename) |
int | v4lget (ControlEntryPtr entry) |
int | v4lgetInfo (ControlEntryPtr entry) |
v4lcontrols | |
int | v4lset (ControlEntryPtr entry) |
int | v4lupdate (ControlEntryPtr entry) |
V4RCam () | |
shared pointer for ControlEntry | |
~V4RCam () | |
construtor | |
Static Public Member Functions | |
static char | removeNonAlNum (char in) |
Static Public Attributes | |
static const int | ERROR = 1 |
static const int | LOAD = 1 |
static const int | NA = 0 |
static const int | OK = 0 |
static const int | SAVE = 2 |
Protected Attributes | |
std::string | aviFilename_ |
device name /dev/videoX | |
std::vector< ControlEntryPtr > | controlEntries_ |
mutex to secure critical sections | |
double | durationLastFrame_ |
time stamp of the last frame | |
std::stringstream | error_msg_ |
int | format_ |
not supported yet | |
float | fps_ |
image height | |
int | grabmethod_ |
image formate | |
int | height_ |
image width | |
std::stringstream | info_msg_ |
boost::interprocess::interprocess_mutex | mutexImage_ |
duration between last and the frame before the last one | |
vdIn * | pVideoIn_ |
timeval | timeLastFrame_ |
frames per second | |
std::string | videoDevice_ |
pointer to the v4l2 device | |
int | width_ |
typedef boost::shared_ptr<ControlEntry> V4RCam::ControlEntryPtr |
typedef int V4RCam::FD |
typedef boost::shared_ptr<v4l2_control> V4RCam::v4l2_controlPtr |
V4RCam::V4RCam | ( | ) |
shared pointer for ControlEntry
V4RCam::~V4RCam | ( | ) |
const std::vector< V4RCam::ControlEntryPtr > & V4RCam::detectControlEnties | ( | ) |
V4RCam::ControlEntryPtr V4RCam::getControlEntry | ( | std::string | varName | ) |
bool V4RCam::grab | ( | ) |
bool V4RCam::hasErrorMsg | ( | ) | const |
bool V4RCam::hasInfoMsg | ( | ) | const |
V4RCam::FD V4RCam::initCamera | ( | const std::string & | videoDevice = "" | ) |
bool V4RCam::isBlackListed | ( | int | control | ) |
check if a control is backlisted
control |
int V4RCam::load_controls | ( | const std::string & | filename | ) |
loads control entries to a file
std::string V4RCam::pullErrorMsg | ( | ) |
std::string V4RCam::pullInfoMsg | ( | ) |
char V4RCam::removeNonAlNum | ( | char | in | ) | [static] |
int V4RCam::save_controls | ( | const std::string & | filename | ) |
saves control entries to a file
int V4RCam::v4lget | ( | ControlEntryPtr | entry | ) |
reads a control entry and stores the value into entry.currentValue
entry | entry to get |
int V4RCam::v4lgetInfo | ( | ControlEntryPtr | entry | ) |
int V4RCam::v4lset | ( | ControlEntryPtr | entry | ) |
int V4RCam::v4lupdate | ( | ControlEntryPtr | entry | ) |
updates a control entry using entry.targetValue it also checks control min, max, stepsize it also verifies the written data by reading the value again into entry.currentValue
entry | entry to update |
std::string V4RCam::aviFilename_ [protected] |
std::vector<ControlEntryPtr > V4RCam::controlEntries_ [protected] |
double V4RCam::durationLastFrame_ [protected] |
const int V4RCam::ERROR = 1 [static] |
std::stringstream V4RCam::error_msg_ [protected] |
int V4RCam::format_ [protected] |
float V4RCam::fps_ [protected] |
int V4RCam::grabmethod_ [protected] |
int V4RCam::height_ [protected] |
std::stringstream V4RCam::info_msg_ [protected] |
const int V4RCam::LOAD = 1 [static] |
boost::interprocess::interprocess_mutex V4RCam::mutexImage_ [protected] |
const int V4RCam::NA = 0 [static] |
const int V4RCam::OK = 0 [static] |
vdIn* V4RCam::pVideoIn_ [protected] |
const int V4RCam::SAVE = 2 [static] |
timeval V4RCam::timeLastFrame_ [protected] |
std::string V4RCam::videoDevice_ [protected] |
int V4RCam::width_ [protected] |