00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __CAPTURE_H__
00021 #define __CAPTURE_H__
00022
00023 #define NUM_CAPTURE_BUFS 2
00024
00025 struct capture_;
00026 typedef struct capture_ capture;
00027
00028 typedef void (*capture_callback) (capture * cap, const unsigned char *frame_data,
00029 size_t length, void *user_data);
00030
00031 capture *capture_open(const char *device_name, int width, int height);
00032
00033 capture *capture_open_userio(const char *device_name, int width, int height);
00034
00035 void capture_close(capture * cap);
00036
00037 void capture_start_capturing(capture * cap);
00038
00039 void capture_stop_capturing(capture * cap);
00040
00041 void capture_get_frame(capture * cap, capture_callback cb,
00042 void *user_data);
00043
00044 void capture_queue_buffer(capture * cap, const void * buffer_data);
00045
00046
00047
00048
00049 int capture_get_width(capture * cap);
00050 int capture_get_height(capture * cap);
00051 unsigned int capture_get_pixel_format(capture * cap);
00052
00053 #endif