16 #ifndef SETPWC_FUNCTIONS
17 #define SETPWC_FUNCTIONS
23 #include <sys/ioctl.h>
24 #include <sys/types.h>
28 #define _LINUX_TIME_H 1
29 #include <linux/videodev.h>
31 #include "pwc-ioctl.h"
33 const int SET_PAN = 0;
34 const int SET_TILT = 1;
36 const int GET_PAN = 0;
37 const int GET_TILT = 1;
39 void error_exit(
char *what_ioctl);
41 void check_device(
int *fd);
43 void not_supported(
char *what);
45 void dump_current_settings(
int fd);
47 void query_pan_tilt_status(
int fd,
int *status);
49 void reset_pan_tilt(
int fd,
int what);
51 void get_pan_or_tilt_limits(
int fd,
char what,
int *
min,
int *
max);
53 void set_pan_or_tilt(
int fd,
char what,
int value);
55 void set_pan_and_tilt(
int fd,
int pan,
int tilt);
57 void set_framerate(
int fd,
int framerate);
59 void flash_settings(
int fd);
61 void restore_settings(
int fd);
63 void restore_factory_settings(
int fd);
65 void set_compression_preference(
int fd,
int pref);
67 void set_automatic_gain_control(
int fd,
int pref);
69 void set_shutter_speed(
int fd,
int pref);
71 void set_automatic_white_balance_mode(
int fd,
char *mode);
73 void set_automatic_white_balance_mode_red(
int fd,
int val);
75 void set_automatic_white_balance_mode_blue(
int fd,
int val);
77 void set_automatic_white_balance_speed(
int fd,
int val);
79 void set_automatic_white_balance_delay(
int fd,
int val);
81 void set_led_on_time(
int fd,
int val);
83 void set_led_off_time(
int fd,
int val);
85 void set_sharpness(
int fd,
int val);
87 void set_backlight_compensation(
int fd,
int val);
89 void set_antiflicker_mode(
int fd,
int val);
91 void set_noise_reduction(
int fd,
int val);
T min(T a, T b)
Return the minimum of a, b.
Definition: utility.h:113
Request to get an integer property.
Definition: player.h:458
#define PLAYER_DIO_CMD_VALUES
Data: input values (PLAYER_DIO_DATA_VALUES)
Definition: player_interfaces.h:1987
uint32_t data_count
Size of data as stored in buffer (bytes)
Definition: player_interfaces.h:3447
String Property Class.
Definition: property.h:170
#define PLAYER_MSG1(level, msg, a)
Error message macros.
Definition: error.h:106
static bool MatchMessage(player_msghdr_t *hdr, int type, int subtype, player_devaddr_t addr)
Helper for message processing.
Definition: message.h:159
int player_sd_register(player_sd_t *sd, const char *name, player_devaddr_t addr)
Register the named device.
#define PLAYER_SET_STRPROP_REQ
String property set request subtype.
Definition: player.h:440
Generic message header.
Definition: player.h:161
virtual int MainSetup(void)
Sets up the resources needed by the driver thread.
Definition: driver.h:658
virtual void MainQuit(void)
Cleanup method for driver thread (called when main exits)
Definition: driver.h:664
Encapsulates a device (i.e., a driver bound to an interface)
Definition: device.h:74
const char * ReadString(int section, const char *name, const char *value)
Read a string value.
virtual void Main(void)=0
Main method for driver thread.
int ReadInt(int section, const char *name, int value)
Read an integer value.
#define PLAYER_OPAQUE_DATA_STATE
Data subtype: generic state.
Definition: player_interfaces.h:3429
#define PLAYER_MSGTYPE_DATA
A data message.
Definition: player.h:95
#define PLAYER_ERROR2(msg, a, b)
Error message macros.
Definition: error.h:83
uint32_t digout
output bitfield
Definition: player_interfaces.h:2011
int32_t value
The property value.
Definition: player.h:465
#define PLAYER_MSGTYPE_RESP_ACK
A positive response message.
Definition: player.h:112
void player_register_drivers()
Register available drivers.
Definition: playertcp.h:138
virtual int ProcessMessage(QueuePointer &resp_queue, player_msghdr *hdr, void *data)
Message handler.
#define PLAYER_MSGTYPE_REQ
A request message.
Definition: player.h:106
#define PLAYER_MSGTYPE_RESP_NACK
A negative response message.
Definition: player.h:125
Integer property class.
Definition: property.h:114
Command: output values (PLAYER_DIO_CMD_VALUES)
Definition: player_interfaces.h:2006
Data: input values (PLAYER_DIO_DATA_VALUES)
Definition: player_interfaces.h:1994
Class for loading configuration file information.
Definition: configfile.h:196
bool WarnUnused()
Check for unused fields and print warnings.
#define PLAYER_SD_NAME_MAXLEN
A device, represented by its name and address.
Definition: playersd.h:69
An autopointer for the message queue.
Definition: message.h:73
char * key
The property key.
Definition: player.h:485
#define PLAYER_ERROR1(msg, a)
Error message macros.
Definition: error.h:82
uint32_t count
the command
Definition: player_interfaces.h:2009
#define PLAYER_ERROR(msg)
Error message macros.
Definition: error.h:81
Base class for drivers which oeprate with a thread.
Definition: driver.h:552
#define PLAYERTCP_DEFAULT_PORT
Default TCP port.
Definition: playertcp.h:122
char * key
The property key.
Definition: player.h:463
#define PLAYER_WARN(msg)
Warning message macros.
Definition: error.h:89
#define PLAYER_MSGTYPE_CMD
A command message.
Definition: player.h:99
#define PLAYER_OPAQUE_CMD_DATA
Cmd subtype: generic command.
Definition: player_interfaces.h:3432
data
Definition: player_interfaces.h:3444
#define PLAYER_DIO_DATA_VALUES
Data: input values (PLAYER_DIO_DATA_VALUES)
Definition: player_interfaces.h:1984
Base class for all drivers.
Definition: driver.h:108
Request to get a string property.
Definition: player.h:480
#define PLAYER_MSG0(level, msg)
General messages.
Definition: error.h:105
bool Load(const char *filename)
Load config from file.
#define PLAYER_SET_INTPROP_REQ
Integer property set request subtype.
Definition: player.h:432
#define PLAYER_MSGQUEUE_DEFAULT_MAXLEN
Default maximum length for a message queue.
Definition: player.h:76
T max(T a, T b)
Return the maximum of a, b.
Definition: utility.h:126
uint8_t * data
The data we will be sending.
Definition: player_interfaces.h:3449