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 
33 const int SET_PAN = 0;
34 const int SET_TILT = 1;
35 
36 const int GET_PAN = 0;
37 const int GET_TILT = 1;
38 
39 void error_exit(char *what_ioctl);
40 
41 void check_device(int *fd);
42 
43 void not_supported(char *what);
44 
45 void dump_current_settings(int fd);
46 
47 void query_pan_tilt_status(int fd, int *status);
48 
49 void reset_pan_tilt(int fd, int what);
50 
51 void get_pan_or_tilt_limits(int fd, char what, int *min, int *max);
52 
53 void set_pan_or_tilt(int fd, char what, int value);
54 
55 void set_pan_and_tilt(int fd, int pan, int tilt);
56 
57 void set_framerate(int fd, int framerate);
58 
59 void flash_settings(int fd);
60 
61 void restore_settings(int fd);
62 
63 void restore_factory_settings(int fd);
64 
65 void set_compression_preference(int fd, int pref);
66 
67 void set_automatic_gain_control(int fd, int pref);
68 
69 void set_shutter_speed(int fd, int pref);
70 
71 void set_automatic_white_balance_mode(int fd, char *mode);
72 
73 void set_automatic_white_balance_mode_red(int fd, int val);
74 
75 void set_automatic_white_balance_mode_blue(int fd, int val);
76 
77 void set_automatic_white_balance_speed(int fd, int val);
78 
79 void set_automatic_white_balance_delay(int fd, int val);
80 
81 void set_led_on_time(int fd, int val);
82 
83 void set_led_off_time(int fd, int val);
84 
85 void set_sharpness(int fd, int val);
86 
87 void set_backlight_compensation(int fd, int val);
88 
89 void set_antiflicker_mode(int fd, int val);
90 
91 void set_noise_reduction(int fd, int val);
92 
93 #endif

Last updated 12 September 2005 21:38:45