setpwc_api.h
1/* The GPL applies to this program.
2 In addition, as a special exception, the copyright holders give
3 permission to link the code of portions of this program with the
4 OpenSSL library under certain conditions as described in each
5 individual source file, and distribute linked combinations
6 including the two.
7 You must obey the GNU General Public License in all respects
8 for all of the code used other than OpenSSL. If you modify
9 file(s) with this exception, you may extend this exception to your
10 version of the file(s), but you are not obligated to do so. If you
11 do not wish to do so, delete this exception statement from your
12 version. If you delete this exception statement from all source
13 files in the program, then also delete it here.
14*/
15
16#ifndef SETPWC_FUNCTIONS
17#define SETPWC_FUNCTIONS
18
19#include <errno.h>
20#include <string.h>
21#include <stdio.h>
22#include <stdlib.h>
23#include <sys/ioctl.h>
24#include <sys/types.h>
25#include <sys/stat.h>
26#include <fcntl.h>
27#include <unistd.h>
28#define _LINUX_TIME_H 1 /* to get things compile on kernel 2.6.x */
29#include <linux/videodev.h>
30
31#include "pwc-ioctl.h"
32
33const int SET_PAN = 0;
34const int SET_TILT = 1;
35
36const int GET_PAN = 0;
37const int GET_TILT = 1;
38
39void error_exit(char *what_ioctl);
40
41void check_device(int *fd);
42
43void not_supported(char *what);
44
45void dump_current_settings(int fd);
46
47void query_pan_tilt_status(int fd, int *status);
48
49void reset_pan_tilt(int fd, int what);
50
51void get_pan_or_tilt_limits(int fd, char what, int *min, int *max);
52
53void set_pan_or_tilt(int fd, char what, int value);
54
55void set_pan_and_tilt(int fd, int pan, int tilt);
56
57void set_framerate(int fd, int framerate);
58
59void flash_settings(int fd);
60
61void restore_settings(int fd);
62
63void restore_factory_settings(int fd);
64
65void set_compression_preference(int fd, int pref);
66
67void set_automatic_gain_control(int fd, int pref);
68
69void set_shutter_speed(int fd, int pref);
70
71void set_automatic_white_balance_mode(int fd, char *mode);
72
73void set_automatic_white_balance_mode_red(int fd, int val);
74
75void set_automatic_white_balance_mode_blue(int fd, int val);
76
77void set_automatic_white_balance_speed(int fd, int val);
78
79void set_automatic_white_balance_delay(int fd, int val);
80
81void set_led_on_time(int fd, int val);
82
83void set_led_off_time(int fd, int val);
84
85void set_sharpness(int fd, int val);
86
87void set_backlight_compensation(int fd, int val);
88
89void set_antiflicker_mode(int fd, int val);
90
91void set_noise_reduction(int fd, int val);
92
93#endif