1 | /*
|
---|
2 | Phlips webcam driver for V4L 1
|
---|
3 | Copyright (C) 2005 by Jasem Mutlaq <mutlaqja@ikarustech.com>
|
---|
4 |
|
---|
5 | This library is free software; you can redistribute it and/or
|
---|
6 | modify it under the terms of the GNU Lesser General Public
|
---|
7 | License as published by the Free Software Foundation; either
|
---|
8 | version 2.1 of the License, or (at your option) any later version.
|
---|
9 |
|
---|
10 | This library is distributed in the hope that it will be useful,
|
---|
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
13 | Lesser General Public License for more details.
|
---|
14 |
|
---|
15 | You should have received a copy of the GNU Lesser General Public
|
---|
16 | License along with this library; if not, write to the Free Software
|
---|
17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
---|
18 |
|
---|
19 | */
|
---|
20 |
|
---|
21 | #ifndef V4L1_PWC_H
|
---|
22 | #define V4L1_PWC_H
|
---|
23 |
|
---|
24 | #include <stdio.h>
|
---|
25 | #include <stdlib.h>
|
---|
26 | #include "videodev.h"
|
---|
27 | #include "v4l1_base.h"
|
---|
28 |
|
---|
29 | class V4L1_PWC : public V4L1_Base
|
---|
30 | {
|
---|
31 | public:
|
---|
32 | V4L1_PWC();
|
---|
33 | ~V4L1_PWC();
|
---|
34 |
|
---|
35 | int connectCam(const char * devpath, char *errmsg);
|
---|
36 |
|
---|
37 | /* Philips related, from QAstrocam */
|
---|
38 | int saveSettings(char *errmsg);
|
---|
39 | void restoreSettings();
|
---|
40 | void restoreFactorySettings();
|
---|
41 | int setGain(int value, char *errmsg);
|
---|
42 | int getGain();
|
---|
43 | int setExposure(int val, char *errmsg);
|
---|
44 | void setCompression(int value);
|
---|
45 | int getCompression();
|
---|
46 | int setNoiseRemoval(int value, char *errmsg);
|
---|
47 | int getNoiseRemoval();
|
---|
48 | int setSharpness(int value, char *errmsg);
|
---|
49 | int getSharpness();
|
---|
50 | int setBackLight(bool val, char *errmsg);
|
---|
51 | bool getBackLight();
|
---|
52 | int setFlicker(bool val, char *errmsg);
|
---|
53 | bool getFlicker();
|
---|
54 | void setGama(int value);
|
---|
55 | int getGama();
|
---|
56 | int setFrameRate(int value, char *errmsg);
|
---|
57 | int getFrameRate();
|
---|
58 | int setWhiteBalance(char *errmsg);
|
---|
59 | int getWhiteBalance();
|
---|
60 | int setWhiteBalanceMode(int val, char *errmsg);
|
---|
61 | int setWhiteBalanceRed(int val, char *errmsg);
|
---|
62 | int setWhiteBalanceBlue(int val, char *errmsg);
|
---|
63 |
|
---|
64 | /* TODO consider the SC modded cam after this
|
---|
65 | void setLongExposureTime(const QString& str);
|
---|
66 | void setFrameRateMultiplicateur(int value);*/
|
---|
67 |
|
---|
68 |
|
---|
69 | /* Updates */
|
---|
70 | //void updateFrame(int d, void *p);
|
---|
71 |
|
---|
72 | /* Image Size */
|
---|
73 | void checkSize(int & x, int & y);
|
---|
74 | bool setSize(int x, int y);
|
---|
75 |
|
---|
76 |
|
---|
77 | private:
|
---|
78 | int whiteBalanceMode_;
|
---|
79 | int whiteBalanceRed_;
|
---|
80 | int whiteBalanceBlue_;
|
---|
81 | int lastGain_;
|
---|
82 | int multiplicateur_;
|
---|
83 | int skippedFrame_;
|
---|
84 | int type_;
|
---|
85 |
|
---|
86 |
|
---|
87 | };
|
---|
88 |
|
---|
89 | #endif
|
---|