include/avcap/linux/V4L2_IntControl.h

Go to the documentation of this file.
00001 /*
00002  * (c) 2005, 2008 Nico Pranke <Nico.Pranke@googlemail.com>, Robin Luedtke <RobinLu@gmx.de> 
00003  *
00004  * This file is part of avcap.
00005  *
00006  * avcap is free software: you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation, either version 3 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * avcap is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with avcap.  If not, see <http://www.gnu.org/licenses/>.
00018  */
00019 
00020 /* avcap is free for non-commercial use.
00021  * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke@googlemail.com>.
00022  */
00023 
00024 
00025 #ifndef V4L2_INTCONTROL_H_
00026 #define V4L2_INTCONTROL_H_
00027 
00028 #include "V4L2_ControlBase.h"
00029 
00030 namespace avcap
00031 {
00032         class V4L2_DeviceDescriptor;
00033         
00035          
00036         class V4L2_IntControl: public IntegerControl
00037         {
00038         private:
00039                 V4L2_ControlBase        mControlBase;
00040                 Interval                        mInterval;
00041                 
00042         public:
00043                 inline V4L2_IntControl(V4L2_DeviceDescriptor *dd, struct v4l2_queryctrl* query):
00044                         mControlBase(dd, query),
00045                         mInterval(query->minimum, query->maximum, query->step)
00046                         {}
00047 
00048                 virtual inline ~V4L2_IntControl()
00049                         {}
00050                 
00051                 inline const Interval& getInterval() const 
00052                         { return mInterval; }
00053 
00054                 virtual inline int getId() const
00055                         { return mControlBase.getId(); }
00056         
00057                 virtual inline int getDefaultValue() const
00058                         { return mControlBase.getDefaultValue(); }
00059         
00060                 virtual inline const std::string& getName() const
00061                         { return mControlBase.getName(); }
00062         
00063                 virtual inline int setValue(int val)
00064                         { return mControlBase.setValue(val); }
00065         
00066                 virtual inline int getValue() const
00067                         { return mControlBase.getValue(); }
00068                 
00069                 virtual inline int reset() 
00070                         { return mControlBase.reset(); }
00071 
00072         };
00073 }
00074 
00075 #endif // V4L2_INTCONTROL_H_

Generated on Mon Nov 30 11:10:30 2009 for avcap-0.1 by  doxygen 1.5.1