setpwc_api.h
00001 /* The GPL applies to this program.
00002   In addition, as a special exception, the copyright holders give
00003   permission to link the code of portions of this program with the
00004   OpenSSL library under certain conditions as described in each
00005   individual source file, and distribute linked combinations
00006   including the two.
00007   You must obey the GNU General Public License in all respects
00008   for all of the code used other than OpenSSL.  If you modify
00009   file(s) with this exception, you may extend this exception to your
00010   version of the file(s), but you are not obligated to do so.  If you
00011   do not wish to do so, delete this exception statement from your
00012   version.  If you delete this exception statement from all source
00013   files in the program, then also delete it here.
00014 */
00015 
00016 #ifndef SETPWC_FUNCTIONS
00017 #define SETPWC_FUNCTIONS
00018 
00019 #include <errno.h>
00020 #include <string.h>
00021 #include <stdio.h>
00022 #include <stdlib.h>
00023 #include <sys/ioctl.h>
00024 #include <sys/types.h>
00025 #include <sys/stat.h>
00026 #include <fcntl.h>
00027 #include <unistd.h>
00028 #define _LINUX_TIME_H 1 /* to get things compile on kernel 2.6.x */
00029 #include <linux/videodev.h>
00030 
00031 #include "pwc-ioctl.h"
00032 
00033 const int SET_PAN  = 0;
00034 const int SET_TILT = 1;
00035 
00036 const int GET_PAN  = 0;
00037 const int GET_TILT = 1;
00038 
00039 void error_exit(char *what_ioctl);
00040 
00041 void check_device(int *fd);
00042 
00043 void not_supported(char *what);
00044 
00045 void dump_current_settings(int fd);
00046 
00047 void query_pan_tilt_status(int fd, int *status);
00048 
00049 void reset_pan_tilt(int fd, int what);
00050 
00051 void get_pan_or_tilt_limits(int fd, char what, int *min, int *max);
00052 
00053 void set_pan_or_tilt(int fd, char what, int value);
00054 
00055 void set_pan_and_tilt(int fd, int pan, int tilt);
00056 
00057 void set_framerate(int fd, int framerate);
00058 
00059 void flash_settings(int fd);
00060 
00061 void restore_settings(int fd);
00062 
00063 void restore_factory_settings(int fd);
00064 
00065 void set_compression_preference(int fd, int pref);
00066 
00067 void set_automatic_gain_control(int fd, int pref);
00068 
00069 void set_shutter_speed(int fd, int pref);
00070 
00071 void set_automatic_white_balance_mode(int fd, char *mode);
00072 
00073 void set_automatic_white_balance_mode_red(int fd, int val);
00074 
00075 void set_automatic_white_balance_mode_blue(int fd, int val);
00076 
00077 void set_automatic_white_balance_speed(int fd, int val);
00078 
00079 void set_automatic_white_balance_delay(int fd, int val);
00080 
00081 void set_led_on_time(int fd, int val);
00082 
00083 void set_led_off_time(int fd, int val);
00084 
00085 void set_sharpness(int fd, int val);
00086 
00087 void set_backlight_compensation(int fd, int val);
00088 
00089 void set_antiflicker_mode(int fd, int val);
00090 
00091 void set_noise_reduction(int fd, int val);
00092 
00093 #endif

Last updated 12 September 2005 21:38:45