TwiceAsNice
2019-02-18
|
#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 () |
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 * | 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 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. More... | |
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 |
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 |
INDI::V4L2_Base::V4L2_Base | ( | ) |
|
virtual |
void INDI::V4L2_Base::callFrame | ( | void * | p | ) |
|
protected |
|
protected |
|
virtual |
|
virtual |
void INDI::V4L2_Base::doDecode | ( | bool | d | ) |
void INDI::V4L2_Base::enumerate_ctrl | ( | ) |
bool INDI::V4L2_Base::enumerate_ext_ctrl | ( | ) |
void INDI::V4L2_Base::enumerate_menu | ( | ) |
|
protected |
|
protected |
int INDI::V4L2_Base::getBpp | ( | ) |
void INDI::V4L2_Base::getcaptureformats | ( | ISwitchVectorProperty * | captureformatssp | ) |
void INDI::V4L2_Base::getcapturesizes | ( | ISwitchVectorProperty * | capturesizessp, |
INumberVectorProperty * | capturesizenp | ||
) |
int INDI::V4L2_Base::getControl | ( | unsigned int | ctrl_id, |
double * | value, | ||
char * | errmsg | ||
) |
struct v4l2_rect INDI::V4L2_Base::getcroprect | ( | ) |
char * INDI::V4L2_Base::getDeviceName | ( | ) |
int INDI::V4L2_Base::getFormat | ( | ) |
void INDI::V4L2_Base::getframerates | ( | ISwitchVectorProperty * | frameratessp, |
INumberVectorProperty * | frameratenp | ||
) |
int INDI::V4L2_Base::getHeight | ( | ) |
void INDI::V4L2_Base::getinputs | ( | ISwitchVectorProperty * | inputssp | ) |
float * INDI::V4L2_Base::getLinearY | ( | ) |
|
inline |
|
virtual |
unsigned char * INDI::V4L2_Base::getRGBBuffer | ( | ) |
unsigned char * INDI::V4L2_Base::getU | ( | ) |
unsigned char * INDI::V4L2_Base::getV | ( | ) |
int INDI::V4L2_Base::getWidth | ( | ) |
unsigned char * INDI::V4L2_Base::getY | ( | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Helper indicating whether current pixel format is compressed or not.
This function is used in read_frame to check for corrupted frames.
bool INDI::V4L2_Base::isLXmodCapable | ( | ) |
|
inline |
|
static |
|
protected |
|
protected |
int INDI::V4L2_Base::query_ctrl | ( | unsigned int | ctrl_id, |
double & | ctrl_min, | ||
double & | ctrl_max, | ||
double & | ctrl_step, | ||
double & | ctrl_value, | ||
char * | errmsg | ||
) |
void INDI::V4L2_Base::queryControls | ( | INumberVectorProperty * | nvp, |
unsigned int * | nnumber, | ||
ISwitchVectorProperty ** | options, | ||
unsigned int * | noptions, | ||
const char * | dev, | ||
const char * | group | ||
) |
bool INDI::V4L2_Base::queryExtControls | ( | INumberVectorProperty * | nvp, |
unsigned int * | nnumber, | ||
ISwitchVectorProperty ** | options, | ||
unsigned int * | noptions, | ||
const char * | dev, | ||
const char * | group | ||
) |
int INDI::V4L2_Base::queryINTControls | ( | INumberVectorProperty * | nvp | ) |
|
protected |
void INDI::V4L2_Base::registerCallback | ( | WPF * | fp, |
void * | ud | ||
) |
int INDI::V4L2_Base::setcaptureformat | ( | unsigned int | captureformatindex, |
char * | errmsg | ||
) |
int INDI::V4L2_Base::setcapturesize | ( | unsigned int | w, |
unsigned int | h, | ||
char * | errmsg | ||
) |
void INDI::V4L2_Base::setColorProcessing | ( | bool | quantization, |
bool | colorconvert, | ||
bool | linearization | ||
) |
int INDI::V4L2_Base::setcroprect | ( | int | x, |
int | y, | ||
int | w, | ||
int | h, | ||
char * | errmsg | ||
) |
void INDI::V4L2_Base::setDeviceName | ( | const char * | name | ) |
int INDI::V4L2_Base::setinput | ( | unsigned int | inputindex, |
char * | errmsg | ||
) |
int INDI::V4L2_Base::setINTControl | ( | unsigned int | ctrl_id, |
double | new_value, | ||
char * | errmsg | ||
) |
|
inline |
int INDI::V4L2_Base::setOPTControl | ( | unsigned int | ctrl_id, |
unsigned int | new_value, | ||
char * | errmsg | ||
) |
|
virtual |
int INDI::V4L2_Base::start_capturing | ( | char * | errmsg | ) |
|
protected |
|
protected |
int INDI::V4L2_Base::stop_capturing | ( | char * | errmsg | ) |
|
protected |
|
protected |
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
struct v4l2_fract(V4L2_Base::* INDI::V4L2_Base::getframerate) () |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
int(V4L2_Base::* INDI::V4L2_Base::setframerate) (struct v4l2_fract frate, char *errmsg) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |