| OLD | NEW |
| (Empty) | |
| 1 /* |
| 2 * Copyright (C) 2010 Nokia Corporation <multimedia@maemo.org> |
| 3 |
| 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. |
| 8 * |
| 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 GNU |
| 12 * Lesser General Public License for more details. |
| 13 * |
| 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 |
| 17 */ |
| 18 |
| 19 #ifndef __LIBV4L_PLUGIN_H |
| 20 #define __LIBV4L_PLUGIN_H |
| 21 |
| 22 #include <sys/types.h> |
| 23 |
| 24 /* Structure libv4l_dev_ops holds the calls from libv4ls to video nodes. |
| 25 They can be normal open/close/ioctl etc. or any of them may be replaced |
| 26 with a callback by a loaded plugin. |
| 27 */ |
| 28 |
| 29 struct libv4l_dev_ops { |
| 30 void * (*init)(int fd); |
| 31 void (*close)(void *dev_ops_priv); |
| 32 int (*ioctl)(void *dev_ops_priv, int fd, unsigned long int request, void *ar
g); |
| 33 ssize_t (*read)(void *dev_ops_priv, int fd, void *buffer, size_t n); |
| 34 ssize_t (*write)(void *dev_ops_priv, int fd, const void *buffer, size_t n); |
| 35 /* For future plugin API extension, plugins implementing the current API |
| 36 must set these all to NULL, as future versions may check for these */ |
| 37 void (*reserved1)(void); |
| 38 void (*reserved2)(void); |
| 39 void (*reserved3)(void); |
| 40 void (*reserved4)(void); |
| 41 void (*reserved5)(void); |
| 42 void (*reserved6)(void); |
| 43 void (*reserved7)(void); |
| 44 }; |
| 45 |
| 46 #endif |
| OLD | NEW |