Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef MJPG_STREAMER_H
00024 #define MJPG_STREAMER_H
00025 #define SOURCE_VERSION "2.0"
00026
00027
00028 #define MAX_INPUT_PLUGINS 10
00029 #define MAX_OUTPUT_PLUGINS 10
00030 #define MAX_PLUGIN_ARGUMENTS 32
00031
00032 #include <linux/types.h>
00033 #include <linux/videodev2.h>
00034
00035 #ifdef DEBUG
00036 #define DBG(...) fprintf(stderr, " DBG(%s, %s(), %d): ", __FILE__, __FUNCTION__, __LINE__); fprintf(stderr, __VA_ARGS__)
00037 #else
00038 #define DBG(...)
00039 #endif
00040
00041 #define LOG(...) { char _bf[1024] = {0}; snprintf(_bf, sizeof(_bf)-1, __VA_ARGS__); fprintf(stderr, "%s", _bf); syslog(LOG_INFO, "%s", _bf); }
00042
00043 #include "input.h"
00044 #include "output.h"
00045
00046
00047 typedef struct _globals globals;
00048
00049
00050 typedef enum {
00051 Dest_Input = 0,
00052 Dest_Output = 1,
00053 Dest_Program = 2,
00054 } command_dest;
00055
00056
00057 typedef enum _cmd_group {
00058 IN_CMD_GENERIC = 0,
00059 IN_CMD_V4L2 = 1,
00060 IN_CMD_RESOLUTION = 2,
00061 IN_CMD_JPEG_QUALITY = 3,
00062 IN_CMD_PWC = 4,
00063 } cmd_group;
00064
00065 typedef struct _control {
00066 struct v4l2_queryctrl ctrl;
00067 int value;
00068 struct v4l2_querymenu *menuitems;
00069
00070
00071
00072
00073 int class_id;
00074 int group;
00075 } control;
00076
00077 struct _globals {
00078 int stop;
00079
00080
00081 input in[MAX_INPUT_PLUGINS];
00082 int incnt;
00083
00084
00085 output out[MAX_OUTPUT_PLUGINS];
00086 int outcnt;
00087
00088
00089
00090 };
00091
00092 #endif