Macros | Functions | Variables
v4l2uvc.c File Reference
#include <stdlib.h>
#include <math.h>
#include <float.h>
#include <libv4l2.h>
#include <SDL.h>
#include "luvcview/v4l2uvc.h"
Include dependency graph for v4l2uvc.c:

Go to the source code of this file.

Macros

#define ARRAY_SIZE(a)   (sizeof(a) / sizeof((a)[0]))
 
#define FOURCC_ARGS(c)   (c) & 0xFF, ((c) >> 8) & 0xFF, ((c) >> 16) & 0xFF, ((c) >> 24) & 0xFF
 
#define FOURCC_FORMAT   "%c%c%c%c"
 
#define HEADERFRAME1   0xaf
 

Functions

int check_videoIn (struct vdIn *vd, char *device)
 
int close_v4l2 (struct vdIn *vd)
 
int enum_controls (int vd)
 
int enum_frame_formats (int dev, unsigned int *supported_formats, unsigned int max_formats)
 
int enum_frame_intervals (int dev, __u32 pixfmt, __u32 width, __u32 height)
 
int enum_frame_sizes (int dev, __u32 pixfmt)
 
static void float_to_fraction (float f, int *num, int *den)
 
static int float_to_fraction_recursive (double f, double p, int *num, int *den)
 
static int init_v4l2 (struct vdIn *vd)
 
int init_videoIn (struct vdIn *vd, char *device, int width, int height, float fps, int format, int grabmethod, char *avifilename)
 
static int isv4l2Control (struct vdIn *vd, int control, struct v4l2_queryctrl *queryctrl)
 
int jpeg_decode (unsigned char **pic, unsigned char *buf, int *width, int *height)
 
int load_controls (int vd, const char *filename)
 
int save_controls (int vd, const char *filename)
 
int uvcGrab (struct vdIn *vd)
 
int v4l2DownControl (struct vdIn *vd, int control)
 
int v4l2GetControl (struct vdIn *vd, int control)
 
int v4l2ResetControl (struct vdIn *vd, int control)
 
int v4l2ResetPan (struct vdIn *vd)
 
int v4l2ResetPanTilt (struct vdIn *vd)
 
int v4l2ResetTilt (struct vdIn *vd)
 
int v4l2SetControl (struct vdIn *vd, int control, int value)
 
int v4l2SetLightFrequencyFilter (struct vdIn *vd, int flt)
 
int v4l2ToggleControl (struct vdIn *vd, int control)
 
int v4l2UpControl (struct vdIn *vd, int control)
 
int v4L2UpDownPan (struct vdIn *vd, short inc)
 
int v4L2UpDownPanTilt (struct vdIn *vd, short inc_p, short inc_t)
 
int v4L2UpDownTilt (struct vdIn *vd, short inc)
 
static int video_disable (struct vdIn *vd)
 
static int video_enable (struct vdIn *vd)
 

Variables

static int debug = 0
 

Macro Definition Documentation

#define ARRAY_SIZE (   a)    (sizeof(a) / sizeof((a)[0]))

Definition at line 33 of file v4l2uvc.c.

#define FOURCC_ARGS (   c)    (c) & 0xFF, ((c) >> 8) & 0xFF, ((c) >> 16) & 0xFF, ((c) >> 24) & 0xFF

Definition at line 35 of file v4l2uvc.c.

#define FOURCC_FORMAT   "%c%c%c%c"

Definition at line 34 of file v4l2uvc.c.

#define HEADERFRAME1   0xaf

Function Documentation

int check_videoIn ( struct vdIn vd,
char *  device 
)

Definition at line 68 of file v4l2uvc.c.

int close_v4l2 ( struct vdIn vd)

Definition at line 677 of file v4l2uvc.c.

int enum_controls ( int  vd)

Definition at line 179 of file v4l2uvc.c.

int enum_frame_formats ( int  dev,
unsigned int *  supported_formats,
unsigned int  max_formats 
)

Definition at line 1123 of file v4l2uvc.c.

int enum_frame_intervals ( int  dev,
__u32  pixfmt,
__u32  width,
__u32  height 
)

Definition at line 1042 of file v4l2uvc.c.

int enum_frame_sizes ( int  dev,
__u32  pixfmt 
)

Definition at line 1080 of file v4l2uvc.c.

static void float_to_fraction ( float  f,
int *  num,
int *  den 
)
static

Definition at line 62 of file v4l2uvc.c.

static int float_to_fraction_recursive ( double  f,
double  p,
int *  num,
int *  den 
)
static

Definition at line 44 of file v4l2uvc.c.

static int init_v4l2 ( struct vdIn vd)
static

Definition at line 347 of file v4l2uvc.c.

int init_videoIn ( struct vdIn vd,
char *  device,
int  width,
int  height,
float  fps,
int  format,
int  grabmethod,
char *  avifilename 
)

Definition at line 105 of file v4l2uvc.c.

static int isv4l2Control ( struct vdIn vd,
int  control,
struct v4l2_queryctrl *  queryctrl 
)
static

Definition at line 695 of file v4l2uvc.c.

int jpeg_decode ( unsigned char **  pic,
unsigned char *  buf,
int *  width,
int *  height 
)

Definition at line 282 of file utils.c.

int load_controls ( int  vd,
const char *  filename 
)

Definition at line 321 of file v4l2uvc.c.

int save_controls ( int  vd,
const char *  filename 
)

Definition at line 262 of file v4l2uvc.c.

int uvcGrab ( struct vdIn vd)

Definition at line 562 of file v4l2uvc.c.

int v4l2DownControl ( struct vdIn vd,
int  control 
)

Definition at line 780 of file v4l2uvc.c.

int v4l2GetControl ( struct vdIn vd,
int  control 
)

Definition at line 714 of file v4l2uvc.c.

int v4l2ResetControl ( struct vdIn vd,
int  control 
)

Definition at line 826 of file v4l2uvc.c.

int v4l2ResetPan ( struct vdIn vd)

Definition at line 845 of file v4l2uvc.c.

int v4l2ResetPanTilt ( struct vdIn vd)

Definition at line 885 of file v4l2uvc.c.

int v4l2ResetTilt ( struct vdIn vd)

Definition at line 865 of file v4l2uvc.c.

int v4l2SetControl ( struct vdIn vd,
int  control,
int  value 
)

Definition at line 729 of file v4l2uvc.c.

int v4l2SetLightFrequencyFilter ( struct vdIn vd,
int  flt 
)

Definition at line 1025 of file v4l2uvc.c.

int v4l2ToggleControl ( struct vdIn vd,
int  control 
)

Definition at line 809 of file v4l2uvc.c.

int v4l2UpControl ( struct vdIn vd,
int  control 
)

Definition at line 751 of file v4l2uvc.c.

int v4L2UpDownPan ( struct vdIn vd,
short  inc 
)

Definition at line 906 of file v4l2uvc.c.

int v4L2UpDownPanTilt ( struct vdIn vd,
short  inc_p,
short  inc_t 
)

Definition at line 941 of file v4l2uvc.c.

int v4L2UpDownTilt ( struct vdIn vd,
short  inc 
)

Definition at line 924 of file v4l2uvc.c.

static int video_disable ( struct vdIn vd)
static

Definition at line 547 of file v4l2uvc.c.

static int video_enable ( struct vdIn vd)
static

Definition at line 533 of file v4l2uvc.c.

Variable Documentation

int debug = 0
static

Definition at line 38 of file v4l2uvc.c.



tuw_uvc
Author(s): Markus Bader
autogenerated on Mon Jun 10 2019 15:39:24