| 1 |
/* |
| 2 |
# (C) 2008-2009 Elmar Kleijn <[email protected]> |
| 3 |
# (C) 2008-2009 Sjoerd Piepenbrink <[email protected]> |
| 4 |
# (C) 2008-2009 Hans de Goede <[email protected]> |
| 5 |
|
| 6 |
# This program is free software; you can redistribute it and/or modify |
| 7 |
# it under the terms of the GNU Lesser General Public License as published by |
| 8 |
# the Free Software Foundation; either version 2.1 of the License, or |
| 9 |
# (at your option) any later version. |
| 10 |
# |
| 11 |
# This program is distributed in the hope that it will be useful, |
| 12 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 |
# GNU Lesser General Public License for more details. |
| 15 |
# |
| 16 |
# You should have received a copy of the GNU Lesser General Public License |
| 17 |
# along with this program; if not, write to the Free Software |
| 18 |
# Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA |
| 19 |
*/ |
| 20 |
|
| 21 |
#ifndef __LIBV4LPROCESSING_H |
| 22 |
#define __LIBV4LPROCESSING_H |
| 23 |
|
| 24 |
#include "../libv4lsyscall-priv.h" |
| 25 |
#if defined(__OpenBSD__) |
| 26 |
#include <sys/videoio.h> |
| 27 |
#else |
| 28 |
#include <linux/videodev2.h> |
| 29 |
#endif |
| 30 |
|
| 31 |
struct v4lprocessing_data; |
| 32 |
struct v4lcontrol_data; |
| 33 |
|
| 34 |
struct v4lprocessing_data *v4lprocessing_create(int fd, struct v4lcontrol_data *data); |
| 35 |
void v4lprocessing_destroy(struct v4lprocessing_data *data); |
| 36 |
|
| 37 |
/* Prepare to process 1 frame, returns 1 if processing is necesary, |
| 38 |
return 0 if no processing will be done */ |
| 39 |
int v4lprocessing_pre_processing(struct v4lprocessing_data *data); |
| 40 |
|
| 41 |
/* Do the actual processing, this is a nop if v4lprocessing_pre_processing() |
| 42 |
returned 0, or if called more than 1 time after a single |
| 43 |
v4lprocessing_pre_processing() call. */ |
| 44 |
void v4lprocessing_processing(struct v4lprocessing_data *data, |
| 45 |
unsigned char *buf, const struct v4l2_format *fmt); |
| 46 |
|
| 47 |
#endif |