2
Copyright (C) 2005 by Jasem Mutlaq
4
Some code based on qastrocam
6
This library is free software; you can redistribute it and/or
7
modify it under the terms of the GNU Lesser General Public
8
License as published by the Free Software Foundation; either
9
version 2.1 of the License, or (at your option) any later version.
11
This library is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
Lesser General Public License for more details.
16
You should have received a copy of the GNU Lesser General Public
17
License along with this library; if not, write to the Free Software
18
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
28
#include "eventloop.h"
37
virtual int connectCam(const char * devpath, char *errmsg);
38
virtual void disconnectCam();
39
char * getDeviceName();
47
void setContrast(int val);
48
void setBrightness(int val);
49
void setColor(int val);
51
void setWhiteness(int val);
54
static void updateFrame(int d, void * p);
56
void setPictureSettings();
57
void getPictureSettings();
62
void checkSize(int & x, int & y);
63
virtual bool setSize(int x, int y);
64
virtual void getMaxMinSize(int & xmax, int & ymax, int & xmin, int & ymin);
70
void init(int preferedPalette);
76
unsigned char * mmapFrame();
77
unsigned char * getY();
78
unsigned char * getU();
79
unsigned char * getV();
80
unsigned char * getColorBuffer();
82
int start_capturing(char *errmsg);
83
int stop_capturing(char *errmsg);
84
void registerCallback(WPF *fp, void *ud);
91
unsigned long options;
93
struct video_capability capability;
94
struct video_window window;
95
struct video_picture picture_format;
96
struct video_mbuf mmap_buffer;
98
unsigned char * buffer_start;
100
long mmap_sync_buffer;
101
long mmap_capture_buffer;
105
int selectCallBackID;
106
unsigned char * YBuf,*UBuf,*VBuf, *colorBuffer;