summaryrefslogtreecommitdiff
path: root/2005/i/robert/src/video4linux/video4linux.hh
diff options
context:
space:
mode:
Diffstat (limited to '2005/i/robert/src/video4linux/video4linux.hh')
-rw-r--r--2005/i/robert/src/video4linux/video4linux.hh14
1 files changed, 9 insertions, 5 deletions
diff --git a/2005/i/robert/src/video4linux/video4linux.hh b/2005/i/robert/src/video4linux/video4linux.hh
index 32f382f..4fd9949 100644
--- a/2005/i/robert/src/video4linux/video4linux.hh
+++ b/2005/i/robert/src/video4linux/video4linux.hh
@@ -4,6 +4,7 @@
// robert - programme du robot 2005. {{{
//
// Copyright (C) 2005 Nicolas Schodet
+// Modified by Olivier Gaillard
//
// Robot APB Team/Efrei 2005.
// Web: http://assos.efrei.fr/robot/
@@ -25,24 +26,27 @@
//
// }}}
#include "image/image_reader.hh"
+#include <linux/videodev.h>
#define VIDIOCQCSADAPTIVE _IOWR('v',227, int)
/// Classe d'accés à Video4Linux. C'est un ImageReader.
class Video4Linux : public ImageReader
{
private:
- int fd_;
int width_, height_;
+ int fd_;
unsigned bufSize_;
Image::PixelFormat pixelFormat_;
bool rgb_;
int brightness_, contrast_;
- unsigned bpp_;
+ double bpp_;
+ void *map_;
+ video_mmap mmap_;
public:
/// Constructeur.
- Video4Linux (const char *dev, Image::PixelFormat pixelFormat,
- int brightness = 58000);
+ Video4Linux (const char *dev, int width, int height,
+ Image::PixelFormat pixelFormat, int brightness = 58000);
/// Destructeur.
~Video4Linux (void);
/// Récupère les paramètres de l'image.
@@ -56,7 +60,7 @@ class Video4Linux : public ImageReader
/// Attend qu'une image soit disponible, retourne true si oui.
bool wait (int timeout = -1);
/// Active/désactive la calibration automatique de la luminosité
- void setAdaptive (int a);
+ //void setAdaptive (int a);
protected:
/// Ouvre le périphérique.
void open (const char *dev);