2
# (C) 2008 Hans de Goede <hdegoede@redhat.com>
4
# This program is free software; you can redistribute it and/or modify
5
# it under the terms of the GNU Lesser General Public License as published by
6
# the Free Software Foundation; either version 2.1 of the License, or
7
# (at your option) any later version.
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
# GNU Lesser General Public License for more details.
14
# You should have received a copy of the GNU Lesser General Public License
15
# along with this program; if not, write to the Free Software
16
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24
#endif /* __cplusplus */
31
#define LIBV4L_PUBLIC __attribute__ ((visibility("default")))
36
/* Point this to a FILE opened for writing when you want to log error and
37
status messages to a file, when NULL errors will get send to stderr */
38
LIBV4L_PUBLIC extern FILE *v4l1_log_file;
40
/* Just like your regular open/close/etc, except that when opening a v4l2
41
capture only device, full v4l1 emulation is done including emulating the
42
often not implemented in v4l2 drivers CGMBUF ioctl and v4l1 style mmap call
45
Format conversion is done if necessary when capturing. That is if you
46
(try to) set a capture format which is not supported by the cam, but is
47
supported by libv4lconvert then SPICT will succeed and on SYNC / read the
48
data will be converted for you and returned in the request format.
50
Note that currently libv4l1 depends on the kernel v4l1 compatibility layer
51
for: 1) Devices which are not capture only, 2) Emulation of many basic
52
v4l1 ioctl's which require no driver specific handling.
54
Note that no functionality is added to v4l1 devices, so if for example an
55
obscure v4l1 device is opened which only supports some weird capture format
56
then libv4l1 will not be of any help (in this case it would be best to get
57
the driver converted to v4l2, as v4l2 has been designed to include weird
58
capture formats, like hw specific bayer compression methods).
61
LIBV4L_PUBLIC int v4l1_open (const char *file, int oflag, ...);
62
LIBV4L_PUBLIC int v4l1_close(int fd);
63
LIBV4L_PUBLIC int v4l1_dup(int fd);
64
LIBV4L_PUBLIC int v4l1_ioctl (int fd, unsigned long int request, ...);
65
LIBV4L_PUBLIC ssize_t v4l1_read (int fd, void* buffer, size_t n);
66
LIBV4L_PUBLIC void *v4l1_mmap(void *start, size_t length, int prot, int flags, int fd,
68
LIBV4L_PUBLIC int v4l1_munmap(void *_start, size_t length);
72
#endif /* __cplusplus */