Fawkes API
Fawkes Development Version
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
v4l1.h
1
2
/***************************************************************************
3
* v4l1.h - This header defines a Video4Linux cam
4
*
5
* Generated: Fri Mar 11 17:46:31 2005
6
* Copyright 2005 Tim Niemueller [www.niemueller.de]
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_V4L1_H_
25
#define __FIREVISION_CAMS_V4L1_H_
26
27
#include <fvcams/camera.h>
28
29
namespace
firevision {
30
#if 0
/* just to make Emacs auto-indent happy */
31
}
32
#endif
33
34
class
CameraArgumentParser;
35
class
V4L1CameraData;
36
37
class
V4L1Camera
:
public
Camera
38
{
39
friend
class
V4LCamera
;
40
41
public
:
42
V4L1Camera
(
const
char
*device_name =
"/dev/video0"
);
43
V4L1Camera
(
const
CameraArgumentParser
*cap);
44
virtual
~
V4L1Camera
();
45
46
virtual
void
open();
47
virtual
void
start();
48
virtual
void
stop();
49
virtual
void
close();
50
virtual
void
flush();
51
virtual
void
capture();
52
virtual
void
print_info();
53
virtual
bool
ready();
54
55
virtual
unsigned
char
* buffer();
56
virtual
unsigned
int
buffer_size();
57
virtual
void
dispose_buffer();
58
59
virtual
unsigned
int
pixel_width();
60
virtual
unsigned
int
pixel_height();
61
virtual
colorspace_t colorspace();
62
63
virtual
void
set_image_number(
unsigned
int
n);
64
65
protected
:
66
V4L1Camera
(
const
char
*device_name,
int
dev);
67
68
private
:
69
virtual
void
post_open();
70
71
private
:
72
73
static
const
int
MMAP = 1;
74
static
const
int
READ = 2;
75
76
V4L1CameraData *__data;
77
78
bool
opened;
79
bool
started;
80
81
int
capture_method;
82
83
int
dev;
84
unsigned
char
*frame_buffer;
85
86
87
};
88
89
}
// end namespace firevision
90
91
#endif
src
libs
fvcams
v4l1.h
Generated by
1.8.1.1