#include <stdio.h>#include <string.h>#include <fcntl.h>#include <unistd.h>#include <errno.h>#include <sys/ioctl.h>#include <sys/mman.h>#include <sys/select.h>#include <linux/types.h>#include <linux/videodev2.h>#include "mjpg_streamer.h"

Go to the source code of this file.
Classes | |
| struct | context |
| struct | vdIn |
Defines | |
| #define | CLOSE_VIDEO(fd) close(fd) |
| #define | IOCTL_RETRY 4 |
| #define | IOCTL_VIDEO(fd, req, value) ioctl(fd, req, value) |
| #define | NB_BUFFER 4 |
| #define | OPEN_VIDEO(fd, flags) open(fd, flags) |
Typedefs | |
| typedef enum _streaming_state | streaming_state |
Enumerations | |
| enum | _streaming_state { STREAMING_OFF = 0, STREAMING_ON = 1, STREAMING_PAUSED = 2 } |
Functions | |
| int | close_v4l2 (struct vdIn *vd) |
| void | control_readed (struct vdIn *vd, struct v4l2_queryctrl *ctrl, globals *pglobal, int id) |
| void | enumerateControls (struct vdIn *vd, globals *pglobal, int id) |
| int | init_videoIn (struct vdIn *vd, char *device, int width, int height, int fps, int format, int grabmethod, globals *pglobal, int id, v4l2_std_id vstd) |
| int | memcpy_picture (unsigned char *out, unsigned char *buf, int size) |
| int | setResolution (struct vdIn *vd, int width, int height) |
| 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 | v4l2SetControl (struct vdIn *vd, int control, int value, int plugin_number, globals *pglobal) |
| int | v4l2ToggleControl (struct vdIn *vd, int control) |
| int | v4l2UpControl (struct vdIn *vd, int control) |
| int | xioctl (int fd, int IOCTL_X, void *arg) |
Variables | |
| context | cams [MAX_INPUT_PLUGINS] |
| #define CLOSE_VIDEO | ( | fd | ) | close(fd) |
| #define IOCTL_RETRY 4 |
| #define IOCTL_VIDEO | ( | fd, | |
| req, | |||
| value | |||
| ) | ioctl(fd, req, value) |
| #define OPEN_VIDEO | ( | fd, | |
| flags | |||
| ) | open(fd, flags) |
| typedef enum _streaming_state streaming_state |
| enum _streaming_state |
| int close_v4l2 | ( | struct vdIn * | vd | ) |
| void control_readed | ( | struct vdIn * | vd, |
| struct v4l2_queryctrl * | ctrl, | ||
| globals * | pglobal, | ||
| int | id | ||
| ) |
| void enumerateControls | ( | struct vdIn * | vd, |
| globals * | pglobal, | ||
| int | id | ||
| ) |
| int init_videoIn | ( | struct vdIn * | vd, |
| char * | device, | ||
| int | width, | ||
| int | height, | ||
| int | fps, | ||
| int | format, | ||
| int | grabmethod, | ||
| globals * | pglobal, | ||
| int | id, | ||
| v4l2_std_id | vstd | ||
| ) |
| int memcpy_picture | ( | unsigned char * | out, |
| unsigned char * | buf, | ||
| int | size | ||
| ) |
| int setResolution | ( | struct vdIn * | vd, |
| int | width, | ||
| int | height | ||
| ) |
| int v4l2DownControl | ( | struct vdIn * | vd, |
| int | control | ||
| ) |
| int v4l2GetControl | ( | struct vdIn * | vd, |
| int | control | ||
| ) |
| int v4l2ResetControl | ( | struct vdIn * | vd, |
| int | control | ||
| ) |
| int v4l2SetControl | ( | struct vdIn * | vd, |
| int | control, | ||
| int | value, | ||
| int | plugin_number, | ||
| globals * | pglobal | ||
| ) |
| int v4l2ToggleControl | ( | struct vdIn * | vd, |
| int | control | ||
| ) |
| int v4l2UpControl | ( | struct vdIn * | vd, |
| int | control | ||
| ) |