#ifndef INC_SRC_H
#define INC_SRC_H
+typedef unsigned char avgbmp_t;
+
+
+#define CLIP(val, min, max) (((val) > (max)) ? (max) : (((val) < (min)) ? (min) : (val)))
+
#define SRC_TYPE_NONE (0)
#define SRC_TYPE_DEVICE (1 << 0) /* Can capture from a device */
#define SRC_TYPE_FILE (1 << 1) /* Can capture from a file */
int (*open)(src_t *);
int (*close)(src_t *);
int (*grab)(src_t *);
- const char *(*query)(src_t *, int*, int*, char **);
+ const char *(*query)(src_t *, uint*, uint*, char **);
} src_mod_t;
extern int src_open(src_t *src, char *source);
extern int src_close(src_t *src);
extern int src_grab(src_t *src);
-extern const char *src_query(src_t *src, char *source, int *width, int *height, char **pixelformat);
+extern const char *src_query(src_t *src, char *source, uint *width, uint *height, char **pixelformatdescription);
extern int src_set_option(src_option_t ***options, char *name, char *value);
extern int src_get_option_by_number(src_option_t **opt, int number, char **name, char **value);