00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef V4L1_CONTROL_H_
00025 #define V4L1_CONTROL_H_
00026
00027 #include <string>
00028 #include <list>
00029
00030 #include "Control_avcap.h"
00031
00032 namespace avcap
00033 {
00034
00035 class V4L1_DeviceDescriptor;
00036
00038
00042 class V4L1_Control: public IntegerControl
00043 {
00044 public:
00045 enum Ctrl {
00046 BRIGHTNESS = 0,
00047 HUE,
00048 COLOUR,
00049 CONTRAST,
00050 WHITENESS,
00051 DEPTH
00052 };
00053
00054 private:
00055 static std::string mNames[6];
00056
00057 V4L1_DeviceDescriptor* mDescriptor;
00058 Ctrl mType;
00059 int mDefaultValue;
00060 Interval mInterval;
00061
00062 public:
00063 V4L1_Control(V4L1_DeviceDescriptor* dd, Ctrl type, __u16 def);
00064
00065 virtual inline ~V4L1_Control()
00066 {}
00067
00068 virtual inline int getId() const
00069 { return mType; }
00070
00071 virtual inline int getDefaultValue() const
00072 { return mDefaultValue; }
00073
00074 virtual const std::string& getName() const;
00075
00076 virtual int setValue(int val);
00077
00078 virtual int getValue() const;
00079
00080 virtual int reset();
00081
00082 virtual inline const Interval& getInterval() const
00083 { return mInterval; }
00084 };
00085 }
00086
00087 #endif // V4L1_CONTROL_H_
00088