|
Instrument Neutral Distributed Interface INDI 2.2.5
|
#include <v4l2_base.h>
Classes | |
| struct | buffer |
Public Types | |
| enum | io_method { IO_METHOD_READ , IO_METHOD_MMAP , IO_METHOD_USERPTR } |
Public Member Functions | |
| V4L2_Base () | |
| virtual | ~V4L2_Base () |
| virtual int | connectCam (const char *devpath, char *errmsg, int pixelFormat=-1, int width=-1, int height=-1) |
| virtual void | disconnectCam (bool stopcapture) |
| char * | getDeviceName () |
| void | setDeviceName (const char *name) |
| bool | isLXmodCapable () |
| void | callFrame (void *p) |
| int | getFormat () |
| int | getWidth () |
| int | getHeight () |
| int | getBpp () |
| void | setNative (bool value) |
| virtual int | setSize (int x, int y) |
| virtual void | getMaxMinSize (int &x_max, int &y_max, int &x_min, int &y_min) |
| unsigned char * | getY () |
| unsigned char * | getU () |
| unsigned char * | getV () |
| unsigned char * | getMJPEGBuffer (int &size) |
| unsigned char * | getRGBBuffer () |
| float * | getLinearY () |
| void | registerCallback (WPF *fp, void *ud) |
| int | start_capturing (char *errmsg) |
| int | stop_capturing (char *errmsg) |
| void | enumerate_ctrl () |
| void | enumerate_menu () |
| bool | enumerate_ext_ctrl () |
| int | queryINTControls (INumberVectorProperty *nvp) |
| bool | queryExtControls (INumberVectorProperty *nvp, unsigned int *nnumber, ISwitchVectorProperty **options, unsigned int *noptions, const char *dev, const char *group) |
| void | queryControls (INumberVectorProperty *nvp, unsigned int *nnumber, ISwitchVectorProperty **options, unsigned int *noptions, const char *dev, const char *group) |
| int | getControl (unsigned int ctrl_id, double *value, char *errmsg) |
| int | setINTControl (unsigned int ctrl_id, double new_value, char *errmsg) |
| int | setOPTControl (unsigned int ctrl_id, unsigned int new_value, char *errmsg) |
| int | query_ctrl (unsigned int ctrl_id, double &ctrl_min, double &ctrl_max, double &ctrl_step, double &ctrl_value, char *errmsg) |
| void | getinputs (ISwitchVectorProperty *inputssp) |
| int | setinput (unsigned int inputindex, char *errmsg) |
| void | getcaptureformats (ISwitchVectorProperty *captureformatssp) |
| int | setcaptureformat (unsigned int captureformatindex, char *errmsg) |
| void | getcapturesizes (ISwitchVectorProperty *capturesizessp, INumberVectorProperty *capturesizenp) |
| int | setcapturesize (unsigned int w, unsigned int h, char *errmsg) |
| void | getframerates (ISwitchVectorProperty *frameratessp, INumberVectorProperty *frameratenp) |
| int | setcroprect (int x, int y, int w, int h, char *errmsg) |
| struct v4l2_rect | getcroprect () |
| void | setColorProcessing (bool quantization, bool colorconvert, bool linearization) |
| void | setlxstate (short s) |
| short | getlxstate () |
| bool | isstreamactive () |
| void | doDecode (bool) |
Static Public Member Functions | |
| static std::map< std::string, std::string > | enumerate () |
| static int | video_dev_file_select (const dirent *entry) |
| static void | newFrame (int fd, void *p) |
Public Attributes | |
| int(V4L2_Base::* | setframerate )(struct v4l2_fract frate, char *errmsg) |
| struct v4l2_fract(V4L2_Base::* | getframerate )() |
Protected Member Functions | |
| int | xioctl (int fd, int request, void *arg, char const *const request_str) |
| int | ioctl_set_format (struct v4l2_format new_fmt, char *errmsg) |
| int | read_frame (char *errsg) |
| int | uninit_device (char *errmsg) |
| int | open_device (const char *devpath, char *errmsg) |
| int | check_device (char *errmsg) |
| int | init_device (char *errmsg) |
| int | init_mmap (char *errmsg) |
| int | errno_exit (const char *s, char *errmsg) |
| void | close_device () |
| void | init_userp (unsigned int buffer_size) |
| void | init_read (unsigned int buffer_size) |
| void | findMinMax () |
| int | stdsetframerate (struct v4l2_fract frate, char *errmsg) |
| int | pwcsetframerate (struct v4l2_fract frate, char *errmsg) |
| struct v4l2_fract | stdgetframerate () |
| bool | is_compressed () const |
| Helper indicating whether current pixel format is compressed or not. | |
Protected Attributes | |
| int | enumeratedInputs |
| int | enumeratedCaptureFormats |
| struct v4l2_capability | cap |
| struct v4l2_cropcap | cropcap |
| struct v4l2_crop | crop |
| struct v4l2_format | fmt |
| struct v4l2_input | input |
| struct v4l2_buffer | buf |
| bool | cancrop |
| bool | cropset |
| bool | cansetrate |
| bool | streamedonce |
| bool | streamactive |
| short | lxstate |
| struct v4l2_queryctrl | queryctrl |
| struct v4l2_querymenu | querymenu |
| bool | has_ext_pix_format |
| WPF * | callback |
| void * | uptr |
| char | dev_name [64] |
| const char * | path |
| bool | m_Native {false} |
| io_method | io |
| int | fd |
| struct buffer * | buffers |
| unsigned int | n_buffers |
| bool | reallocate_buffers |
| struct v4l2_fract | frameRate |
| int | xmax |
| int | xmin |
| int | ymax |
| int | ymin |
| int | selectCallBackID |
| V4L2_Decode * | v4l2_decode |
| V4L2_Decoder * | decoder |
| bool | dodecode |
| int | bpp |
| char | deviceName [MAXINDIDEVICE] |
Friends | |
| class | ::V4L2_Driver |
Definition at line 63 of file v4l2_base.h.
| Enumerator | |
|---|---|
| IO_METHOD_READ | |
| IO_METHOD_MMAP | |
| IO_METHOD_USERPTR | |
Definition at line 69 of file v4l2_base.h.
| INDI::V4L2_Base::V4L2_Base | ( | ) |
Definition at line 136 of file v4l2_base.cpp.
|
virtual |
Definition at line 186 of file v4l2_base.cpp.
| void INDI::V4L2_Base::callFrame | ( | void * | p | ) |
|
protected |
Definition at line 971 of file v4l2_base.cpp.
|
protected |
Definition at line 1336 of file v4l2_base.cpp.
|
virtual |
Definition at line 366 of file v4l2_base.cpp.
|
virtual |
Definition at line 390 of file v4l2_base.cpp.
| void INDI::V4L2_Base::doDecode | ( | bool | d | ) |
Definition at line 361 of file v4l2_base.cpp.
|
static |
Find all /dev/videoXXX devices and open them one by one to query the common of the device. We use this later to match against the device label so that we can automatically open the desired device automatically without having to manually set the device port manually. return a map of pairs common_name:device_path (e.g. {"Logitech D9000", "/dev/video3"})
Definition at line 2992 of file v4l2_base.cpp.
| void INDI::V4L2_Base::enumerate_ctrl | ( | ) |
Definition at line 2019 of file v4l2_base.cpp.
| bool INDI::V4L2_Base::enumerate_ext_ctrl | ( | ) |
Definition at line 2710 of file v4l2_base.cpp.
| void INDI::V4L2_Base::enumerate_menu | ( | ) |
Definition at line 2096 of file v4l2_base.cpp.
|
protected |
Definition at line 350 of file v4l2_base.cpp.
|
protected |
Definition at line 1980 of file v4l2_base.cpp.
| int INDI::V4L2_Base::getBpp | ( | ) |
Definition at line 1826 of file v4l2_base.cpp.
| void INDI::V4L2_Base::getcaptureformats | ( | ISwitchVectorProperty * | captureformatssp | ) |
Definition at line 1459 of file v4l2_base.cpp.
| void INDI::V4L2_Base::getcapturesizes | ( | ISwitchVectorProperty * | capturesizessp, |
| INumberVectorProperty * | capturesizenp | ||
| ) |
Definition at line 1534 of file v4l2_base.cpp.
| int INDI::V4L2_Base::getControl | ( | unsigned int | ctrl_id, |
| double * | value, | ||
| char * | errmsg | ||
| ) |
Definition at line 2625 of file v4l2_base.cpp.
| struct v4l2_rect INDI::V4L2_Base::getcroprect | ( | ) |
Definition at line 1836 of file v4l2_base.cpp.
| char * INDI::V4L2_Base::getDeviceName | ( | ) |
Definition at line 1896 of file v4l2_base.cpp.
| int INDI::V4L2_Base::getFormat | ( | ) |
Definition at line 1831 of file v4l2_base.cpp.
| void INDI::V4L2_Base::getframerates | ( | ISwitchVectorProperty * | frameratessp, |
| INumberVectorProperty * | frameratenp | ||
| ) |
Definition at line 1623 of file v4l2_base.cpp.
| int INDI::V4L2_Base::getHeight | ( | ) |
Definition at line 1818 of file v4l2_base.cpp.
| void INDI::V4L2_Base::getinputs | ( | ISwitchVectorProperty * | inputssp | ) |
Definition at line 1387 of file v4l2_base.cpp.
| float * INDI::V4L2_Base::getLinearY | ( | ) |
Definition at line 1969 of file v4l2_base.cpp.
|
inline |
Definition at line 150 of file v4l2_base.h.
|
virtual |
Definition at line 1901 of file v4l2_base.cpp.
| unsigned char * INDI::V4L2_Base::getMJPEGBuffer | ( | int & | size | ) |
Definition at line 1959 of file v4l2_base.cpp.
| unsigned char * INDI::V4L2_Base::getRGBBuffer | ( | ) |
Definition at line 1964 of file v4l2_base.cpp.
| unsigned char * INDI::V4L2_Base::getU | ( | ) |
Definition at line 1949 of file v4l2_base.cpp.
| unsigned char * INDI::V4L2_Base::getV | ( | ) |
Definition at line 1954 of file v4l2_base.cpp.
| int INDI::V4L2_Base::getWidth | ( | ) |
Definition at line 1810 of file v4l2_base.cpp.
| unsigned char * INDI::V4L2_Base::getY | ( | ) |
Definition at line 1944 of file v4l2_base.cpp.
|
protected |
Definition at line 1311 of file v4l2_base.cpp.
|
protected |
Definition at line 861 of file v4l2_base.cpp.
|
protected |
Definition at line 841 of file v4l2_base.cpp.
|
protected |
Definition at line 926 of file v4l2_base.cpp.
|
protected |
Definition at line 290 of file v4l2_base.cpp.
|
protected |
Helper indicating whether current pixel format is compressed or not.
This function is used in read_frame to check for corrupted frames.
Definition at line 202 of file v4l2_base.cpp.
| bool INDI::V4L2_Base::isLXmodCapable | ( | ) |
Definition at line 408 of file v4l2_base.cpp.
|
inline |
Definition at line 154 of file v4l2_base.h.
|
static |
Definition at line 809 of file v4l2_base.cpp.
|
protected |
Definition at line 1347 of file v4l2_base.cpp.
|
protected |
Definition at line 1862 of file v4l2_base.cpp.
| int INDI::V4L2_Base::query_ctrl | ( | unsigned int | ctrl_id, |
| double & | ctrl_min, | ||
| double & | ctrl_max, | ||
| double & | ctrl_step, | ||
| double & | ctrl_value, | ||
| char * | errmsg | ||
| ) |
Definition at line 2134 of file v4l2_base.cpp.
| void INDI::V4L2_Base::queryControls | ( | INumberVectorProperty * | nvp, |
| unsigned int * | nnumber, | ||
| ISwitchVectorProperty ** | options, | ||
| unsigned int * | noptions, | ||
| const char * | dev, | ||
| const char * | group | ||
| ) |
Definition at line 2180 of file v4l2_base.cpp.
| bool INDI::V4L2_Base::queryExtControls | ( | INumberVectorProperty * | nvp, |
| unsigned int * | nnumber, | ||
| ISwitchVectorProperty ** | options, | ||
| unsigned int * | noptions, | ||
| const char * | dev, | ||
| const char * | group | ||
| ) |
Definition at line 2760 of file v4l2_base.cpp.
| int INDI::V4L2_Base::queryINTControls | ( | INumberVectorProperty * | nvp | ) |
Definition at line 2512 of file v4l2_base.cpp.
|
protected |
Definition at line 470 of file v4l2_base.cpp.
| void INDI::V4L2_Base::registerCallback | ( | WPF * | fp, |
| void * | ud | ||
| ) |
Definition at line 1974 of file v4l2_base.cpp.
| int INDI::V4L2_Base::setcaptureformat | ( | unsigned int | captureformatindex, |
| char * | errmsg | ||
| ) |
Definition at line 1523 of file v4l2_base.cpp.
| int INDI::V4L2_Base::setcapturesize | ( | unsigned int | w, |
| unsigned int | h, | ||
| char * | errmsg | ||
| ) |
Definition at line 1613 of file v4l2_base.cpp.
| void INDI::V4L2_Base::setColorProcessing | ( | bool | quantization, |
| bool | colorconvert, | ||
| bool | linearization | ||
| ) |
Definition at line 1936 of file v4l2_base.cpp.
| int INDI::V4L2_Base::setcroprect | ( | int | x, |
| int | y, | ||
| int | w, | ||
| int | h, | ||
| char * | errmsg | ||
| ) |
Definition at line 1695 of file v4l2_base.cpp.
| void INDI::V4L2_Base::setDeviceName | ( | const char * | name | ) |
Definition at line 2979 of file v4l2_base.cpp.
| int INDI::V4L2_Base::setinput | ( | unsigned int | inputindex, |
| char * | errmsg | ||
| ) |
Definition at line 1429 of file v4l2_base.cpp.
| int INDI::V4L2_Base::setINTControl | ( | unsigned int | ctrl_id, |
| double | new_value, | ||
| char * | errmsg | ||
| ) |
Definition at line 2638 of file v4l2_base.cpp.
|
inline |
Definition at line 145 of file v4l2_base.h.
|
inline |
Definition at line 96 of file v4l2_base.h.
| int INDI::V4L2_Base::setOPTControl | ( | unsigned int | ctrl_id, |
| unsigned int | new_value, | ||
| char * | errmsg | ||
| ) |
Definition at line 2674 of file v4l2_base.cpp.
|
virtual |
Definition at line 1915 of file v4l2_base.cpp.
| int INDI::V4L2_Base::start_capturing | ( | char * | errmsg | ) |
Definition at line 741 of file v4l2_base.cpp.
|
protected |
Definition at line 1877 of file v4l2_base.cpp.
|
protected |
Definition at line 1841 of file v4l2_base.cpp.
| int INDI::V4L2_Base::stop_capturing | ( | char * | errmsg | ) |
Definition at line 706 of file v4l2_base.cpp.
|
protected |
Definition at line 816 of file v4l2_base.cpp.
|
static |
Definition at line 3037 of file v4l2_base.cpp.
|
protected |
Definition at line 246 of file v4l2_base.cpp.
|
friend |
Definition at line 233 of file v4l2_base.h.
|
protected |
Definition at line 231 of file v4l2_base.h.
|
protected |
Definition at line 192 of file v4l2_base.h.
|
protected |
Definition at line 215 of file v4l2_base.h.
|
protected |
Definition at line 208 of file v4l2_base.h.
|
protected |
Definition at line 194 of file v4l2_base.h.
|
protected |
Definition at line 196 of file v4l2_base.h.
|
protected |
Definition at line 187 of file v4l2_base.h.
|
protected |
Definition at line 189 of file v4l2_base.h.
|
protected |
Definition at line 188 of file v4l2_base.h.
|
protected |
Definition at line 195 of file v4l2_base.h.
|
protected |
Definition at line 228 of file v4l2_base.h.
|
protected |
Definition at line 210 of file v4l2_base.h.
|
protected |
Definition at line 235 of file v4l2_base.h.
|
protected |
Definition at line 229 of file v4l2_base.h.
|
protected |
Definition at line 180 of file v4l2_base.h.
|
protected |
Definition at line 179 of file v4l2_base.h.
|
protected |
Definition at line 214 of file v4l2_base.h.
|
protected |
Definition at line 190 of file v4l2_base.h.
|
protected |
Definition at line 222 of file v4l2_base.h.
| struct v4l2_fract(V4L2_Base::* INDI::V4L2_Base::getframerate) () |
Definition at line 101 of file v4l2_base.h.
|
protected |
Definition at line 204 of file v4l2_base.h.
|
protected |
Definition at line 191 of file v4l2_base.h.
|
protected |
Definition at line 213 of file v4l2_base.h.
|
protected |
Definition at line 200 of file v4l2_base.h.
|
protected |
Definition at line 212 of file v4l2_base.h.
|
protected |
Definition at line 216 of file v4l2_base.h.
|
protected |
Definition at line 211 of file v4l2_base.h.
|
protected |
Definition at line 202 of file v4l2_base.h.
|
protected |
Definition at line 203 of file v4l2_base.h.
|
protected |
Definition at line 217 of file v4l2_base.h.
|
protected |
Definition at line 224 of file v4l2_base.h.
| int(V4L2_Base::* INDI::V4L2_Base::setframerate) (struct v4l2_fract frate, char *errmsg) |
Definition at line 101 of file v4l2_base.h.
|
protected |
Definition at line 198 of file v4l2_base.h.
|
protected |
Definition at line 197 of file v4l2_base.h.
|
protected |
Definition at line 209 of file v4l2_base.h.
|
protected |
Definition at line 227 of file v4l2_base.h.
|
protected |
Definition at line 223 of file v4l2_base.h.
|
protected |
Definition at line 223 of file v4l2_base.h.
|
protected |
Definition at line 223 of file v4l2_base.h.
|
protected |
Definition at line 223 of file v4l2_base.h.