25 #include <boost/thread/thread.hpp> 26 #include <boost/interprocess/sync/interprocess_mutex.hpp> 32 #define V4L2_CID_BASE_EXTCTR 0x009A0900 33 #define V4L2_CID_BASE_LOGITECH V4L2_CID_BASE_EXTCTR 36 struct v4l2_queryctrl;
43 static const int OK = 0;
45 static const int NA = 0;
99 FD
initCamera(
const std::string &videoDevice =
"");
115 int v4lget(ControlEntryPtr entry);
123 int v4lset(ControlEntryPtr entry);
bool isBlackListed(int control)
int v4lset(ControlEntryPtr entry)
bool hasInfoMsg() const
returns false if therer are any error msgs waiting for pull
const std::vector< ControlEntryPtr > & detectControlEnties()
v4l2_queryctrl * queryctrl
name of the v4l2 control
int format_
not supported yet
bool hasValidType() const
creates an info string related to the v4l2 control
std::stringstream error_msg
info msgs stream
std::string videoDevice_
pointer to the v4l2 device
boost::shared_ptr< v4l2_control > v4l2_controlPtr
std::string aviFilename_
device name /dev/videoX
std::string pullErrorMsg()
return true if the value type is supported
int grabmethod_
image formate
int save_controls(const std::string &filename)
std::stringstream error_msg_
int v4lupdate(ControlEntryPtr entry)
std::stringstream info_msg
target value to set after a write
timeval timeLastFrame_
frames per second
static char removeNonAlNum(char in)
ControlEntryPtr getControlEntry(std::string varName)
std::string getQueryCtrlInfo() const
error msgs in the case something happend
boost::interprocess::interprocess_mutex mutexImage_
duration between last and the frame before the last one
int targetValue
current value of the control after read or set
int v4lgetInfo(ControlEntryPtr entry)
v4lcontrols
std::vector< ControlEntryPtr > controlEntries_
mutex to secure critical sections
int load_controls(const std::string &filename)
double durationLastFrame_
time stamp of the last frame
boost::shared_ptr< ControlEntry > ControlEntryPtr
int v4lget(ControlEntryPtr entry)
V4RCam()
shared pointer for ControlEntry
bool hasErrorMsg() const
clears the info_msgs stringstream and crates a info string
shared pointer for v4l2 control entries
std::stringstream info_msg_
FD initCamera(const std::string &videoDevice="")
vector of the current supported control entries
int currentValue
pointer to the original related control
std::string pullInfoMsg()
clears the error_msgs stringstream and crates a info string
~ControlEntry()
construtor