Fawkes API  Fawkes Development Version
v4l.h
1 
2 /***************************************************************************
3  * v4l.h - General Video4Linux access
4  *
5  * Generated: Sat Jul 5 16:16:16 2008
6  * Copyright 2008 Tobias Kellner
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version. A runtime exception applies to
14  * this software (see LICENSE.GPL_WRE file mentioned below for details).
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22  */
23 
24 #ifndef _FIREVISION_CAMS_V4L_H_
25 #define _FIREVISION_CAMS_V4L_H_
26 
27 #include <fvcams/camera.h>
28 //#include <sys/types.h>
29 
30 namespace firevision {
31 
32 class CameraArgumentParser;
33 
34 class V4LCamera : public Camera
35 {
36 public:
37  V4LCamera(const char *device_name = "/dev/video0");
39  virtual ~V4LCamera();
40 
41  virtual void open();
42  virtual void start();
43  virtual void stop();
44  virtual void close();
45  virtual void flush();
46  virtual void capture();
47  virtual void print_info();
48  virtual bool ready();
49 
50  virtual unsigned char *buffer();
51  virtual unsigned int buffer_size();
52  virtual void dispose_buffer();
53 
54  virtual unsigned int pixel_width();
55  virtual unsigned int pixel_height();
56  virtual colorspace_t colorspace();
57 
58  virtual void set_image_number(unsigned int n);
59 
60 private:
61  Camera *_v4l_cam;
62  char * _device_name;
63 };
64 
65 } // end namespace firevision
66 
67 #endif //FIREVISION_CAMS_V4L_H__
firevision::V4LCamera::pixel_width
virtual unsigned int pixel_width()
Definition: v4l.cpp:197
firevision::V4LCamera::open
virtual void open()
Definition: v4l.cpp:91
firevision::V4LCamera::print_info
virtual void print_info()
Definition: v4l.cpp:165
firevision::V4LCamera::pixel_height
virtual unsigned int pixel_height()
Definition: v4l.cpp:206
firevision::V4LCamera::close
virtual void close()
Definition: v4l.cpp:144
firevision::V4LCamera::start
virtual void start()
Definition: v4l.cpp:126
firevision::V4LCamera::V4LCamera
V4LCamera(const char *device_name="/dev/video0")
Constructor.
Definition: v4l.cpp:61
firevision::V4LCamera::ready
virtual bool ready()
Definition: v4l.cpp:172
firevision::V4LCamera::stop
virtual void stop()
Definition: v4l.cpp:135
firevision::V4LCamera::~V4LCamera
virtual ~V4LCamera()
Destructor.
Definition: v4l.cpp:83
firevision::V4LCamera::capture
virtual void capture()
Definition: v4l.cpp:158
firevision::CameraArgumentParser
Definition: camargp.h:39
firevision::V4LCamera::flush
virtual void flush()
Definition: v4l.cpp:151
firevision::V4LCamera::set_image_number
virtual void set_image_number(unsigned int n)
Definition: v4l.cpp:221
firevision::V4LCamera::colorspace
virtual colorspace_t colorspace()
Definition: v4l.cpp:215
firevision::V4LCamera::buffer_size
virtual unsigned int buffer_size()
Definition: v4l.cpp:184
firevision::V4LCamera::buffer
virtual unsigned char * buffer()
Definition: v4l.cpp:178
firevision::V4LCamera::dispose_buffer
virtual void dispose_buffer()
Definition: v4l.cpp:190
firevision::Camera
Definition: camera.h:36