dummy.cpp

00001
00002 /***************************************************************************
00003  *  dummy.cpp - controller that controls nothing, sounds like a stupid
00004  *                    idea but this avoids NULL checks in software using
00005  *                    a camera controller
00006  *
00007  *  Created: Tue May 12 19:07:59 2009
00008  *  Copyright  2005-2009  Tim Niemueller [www.niemueller.de]
00009  *
00010  ****************************************************************************/
00011
00012 /*  This program is free software; you can redistribute it and/or modify
00013  *  it under the terms of the GNU General Public License as published by
00014  *  the Free Software Foundation; either version 2 of the License, or
00015  *  (at your option) any later version. A runtime exception applies to
00016  *  this software (see LICENSE.GPL_WRE file mentioned below for details).
00017  *
00018  *  This program is distributed in the hope that it will be useful,
00019  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021  *  GNU Library General Public License for more details.
00022  *
00023  *  Read the full text in the LICENSE.GPL_WRE file in the doc directory.
00024  */
00025
00026 #include <cams/control/dummy.h>
00027 
00028 /** @class DummyCameraControl <cams/control/dummy.h>
00029  * Dummy camera control.
00030  * This control supports every control type, but the operations are NOOPs.
00031  * This is useful to instantiate the dummy control to avoid NULL checks.
00032  * @author Tim Niemueller
00033  */
00034
00035 bool DummyCameraControl::auto_gain()
00036 {
00037   return true;
00038 }
00039
00040 void DummyCameraControl::set_auto_gain(bool enabled)
00041 {
00042 }
00043
00044 bool DummyCameraControl::auto_white_balance()
00045 {
00046   return true;
00047 }
00048
00049 void DummyCameraControl::set_auto_white_balance(bool enabled)
00050 {
00051 }
00052
00053 bool DummyCameraControl::auto_exposure()
00054 {
00055   return true;
00056 }
00057
00058 void DummyCameraControl::set_auto_exposure(bool enabled)
00059 {
00060 }
00061
00062
00063 int DummyCameraControl::red_balance()
00064 {
00065   return 0;
00066 }
00067
00068 void DummyCameraControl::set_red_balance(int red_balance)
00069 {
00070 }
00071
00072 int DummyCameraControl::blue_balance()
00073 {
00074   return 0;
00075 }
00076
00077 void DummyCameraControl::set_blue_balance(int blue_balance)
00078 {
00079 }
00080
00081
00082 int DummyCameraControl::u_balance()
00083 {
00084   return 0;
00085 }
00086
00087 void DummyCameraControl::set_u_balance(int u_balance)
00088 {
00089 }
00090
00091 int DummyCameraControl::v_balance()
00092 {
00093   return 0;
00094 }
00095
00096 void DummyCameraControl::set_v_balance(int v_balance)
00097 {
00098 }
00099
00100
00101 unsigned int DummyCameraControl::brightness()
00102 {
00103   return 0;
00104 }
00105
00106 void DummyCameraControl::set_brightness(unsigned int brightness)
00107 {
00108 }
00109
00110 unsigned int DummyCameraControl::contrast()
00111 {
00112   return 0;
00113 }
00114
00115 void DummyCameraControl::set_contrast(unsigned int contrast)
00116 {
00117 }
00118
00119 unsigned int DummyCameraControl::saturation()
00120 {
00121   return 0;
00122 }
00123
00124 void DummyCameraControl::set_saturation(unsigned int saturation)
00125 {
00126 }
00127
00128 int DummyCameraControl::hue()
00129 {
00130   return 0;
00131 }
00132
00133 void DummyCameraControl::set_hue(int hue)
00134 {
00135 }
00136
00137 unsigned int DummyCameraControl::exposure()
00138 {
00139   return 0;
00140 }
00141
00142 void DummyCameraControl::set_exposure(unsigned int exposure)
00143 {
00144 }
00145
00146 unsigned int DummyCameraControl::gain()
00147 {
00148   return 0;
00149 }
00150
00151 void DummyCameraControl::set_gain(unsigned int gain)
00152 {
00153 }
00154
00155   // From CameraControlImage
00156 const char * DummyCameraControl::format()
00157 {
00158   return "";
00159 }
00160
00161 void DummyCameraControl::set_format(const char *format)
00162 {
00163 }
00164
00165 unsigned int DummyCameraControl::width()
00166 {
00167   return 0;
00168 }
00169
00170 unsigned int DummyCameraControl::height()
00171 {
00172   return 0;
00173 }
00174
00175 void DummyCameraControl::size(unsigned int &width, unsigned int &height)
00176 {
00177   width = height = 0;
00178 }
00179
00180 void DummyCameraControl::set_size(unsigned int width,
00181                                 unsigned int height)
00182 {
00183 }
00184
00185 bool DummyCameraControl::horiz_mirror()
00186 {
00187   return false;
00188 }
00189
00190 bool DummyCameraControl::vert_mirror()
00191 {
00192   return false;
00193 }
00194
00195 void DummyCameraControl::mirror(bool &horiz, bool &vert)
00196 {
00197   horiz = vert = false;
00198 }
00199
00200 void DummyCameraControl::set_horiz_mirror(bool enabled)
00201 {
00202 }
00203
00204 void DummyCameraControl::set_vert_mirror(bool enabled)
00205 {
00206 }
00207
00208 void DummyCameraControl::set_mirror(bool horiz, bool vert)
00209 {
00210 }
00211
00212
00213 unsigned int DummyCameraControl::fps()
00214 {
00215   return 0;
00216 }
00217
00218 void DummyCameraControl::set_fps(unsigned int fps)
00219 {
00220 }
00221
00222
00223 unsigned int DummyCameraControl::lens_x_corr()
00224 {
00225   return 0;
00226 }
00227
00228 unsigned int DummyCameraControl::lens_y_corr()
00229 {
00230   return 0;
00231 }
00232
00233 void DummyCameraControl::lens_corr(unsigned int &x_corr, unsigned int &y_corr)
00234 {
00235   x_corr = y_corr = 0;
00236 }
00237
00238 void DummyCameraControl::set_lens_x_corr(unsigned int x_corr)
00239 {
00240 }
00241
00242 void DummyCameraControl::set_lens_y_corr(unsigned int y_corr)
00243 {
00244 }
00245
00246 void DummyCameraControl::set_lens_corr(unsigned int x_corr, unsigned int y_corr)
00247 {
00248 }
00249
00250 void DummyCameraControl::process_pantilt()
00251 {
00252 }
00253
00254
00255 bool DummyCameraControl::supports_pan()
00256 {
00257   return false;
00258 }
00259
00260 bool DummyCameraControl::supports_tilt()
00261 {
00262   return false;
00263 }
00264
00265 void DummyCameraControl::set_pan(int pan)
00266 {
00267 }
00268
00269 void DummyCameraControl::set_tilt(int tilt)
00270 {
00271 }
00272
00273 void DummyCameraControl::set_pan_tilt(int pan, int tilt)
00274 {
00275 }
00276
00277 void DummyCameraControl::set_pan_tilt_rad(float pan, float tilt)
00278 {
00279 }
00280
00281 int DummyCameraControl::pan()
00282 {
00283   return 0;
00284 }
00285
00286 int DummyCameraControl::tilt()
00287 {
00288   return 0;
00289 }
00290
00291 void DummyCameraControl::start_get_pan_tilt()
00292 {
00293 }
00294
00295 void DummyCameraControl::pan_tilt(int &pan, int &tilt)
00296 {
00297   pan = tilt = 0;
00298 }
00299
00300 void DummyCameraControl::pan_tilt_rad(float &pan, float &tilt)
00301 {
00302   pan = tilt = 0.f;
00303 }
00304
00305 int DummyCameraControl::min_pan()
00306 {
00307   return 0;
00308 }
00309
00310 int DummyCameraControl::max_pan()
00311 {
00312   return 0;
00313 }
00314
00315 int DummyCameraControl::min_tilt()
00316 {
00317   return 0;
00318 }
00319
00320 int DummyCameraControl::max_tilt()
00321 {
00322   return 0;
00323 }
00324
00325 void DummyCameraControl::reset_pan_tilt()
00326 {
00327 }
00328
00329 void DummyCameraControl::set_pan_tilt_limit(int pan_left, int pan_right,
00330                                             int tilt_up, int tilt_down)
00331 {
00332 }
00333
00334 void DummyCameraControl::reset_pan_tilt_limit()
00335 {
00336 }
00337
00338 void DummyCameraControl::reset_zoom()
00339 {
00340 }
00341
00342 void DummyCameraControl::set_zoom(unsigned int zoom)
00343 {
00344 }
00345
00346 unsigned int DummyCameraControl::zoom()
00347 {
00348   return 0;
00349 }
00350
00351 unsigned int DummyCameraControl::zoom_max()
00352 {
00353   return 0;
00354 }
00355
00356 unsigned int DummyCameraControl::zoom_min()
00357 {
00358   return 0;
00359 }
00360
00361 void DummyCameraControl::set_zoom_speed_tele(unsigned int speed)
00362 {
00363 }
00364
00365 void DummyCameraControl::set_zoom_speed_wide(unsigned int speed)
00366 {
00367 }
00368
00369 void DummyCameraControl::set_zoom_digital_enabled(bool enabled)
00370 {
00371 }
00372
00373 bool DummyCameraControl::supports_effect(unsigned int effect)
00374 {
00375   return false;
00376 }
00377
00378 void DummyCameraControl::set_effect(unsigned int effect)
00379 {
00380 }
00381
00382 unsigned int DummyCameraControl::effect()
00383 {
00384   return EFFECT_NONE;
00385 }
00386
00387 void DummyCameraControl::reset_effect()
00388 {
00389 }
00390
00391 bool DummyCameraControl::auto_focus()
00392 {
00393   return true;
00394 }
00395
00396 void DummyCameraControl::set_auto_focus(bool enabled)
00397 {
00398 }
00399
00400 unsigned int DummyCameraControl::focus()
00401 {
00402   return 0;
00403 }
00404
00405 void DummyCameraControl::set_focus(unsigned int focus)
00406 {
00407 }
00408
00409 unsigned int DummyCameraControl::focus_min()
00410 {
00411   return 0;
00412 }
00413
00414 unsigned int DummyCameraControl::focus_max()
00415 {
00416   return 0;
00417 }
00418