1 /* 2 # (C) 2008-2009 Elmar Kleijn <elmar_kleijn@hotmail.com> 3 # (C) 2008-2009 Sjoerd Piepenbrink <need4weed@gmail.com> 4 # (C) 2008-2009 Radjnies Bhansingh <radjnies@gmail.com> 5 # (C) 2008-2009 Hans de Goede <hdegoede@redhat.com> 6 7 # This program is free software; you can redistribute it and/or modify 8 # it under the terms of the GNU Lesser General Public License as published by 9 # the Free Software Foundation; either version 2.1 of the License, or 10 # (at your option) any later version. 11 # 12 # This program is distributed in the hope that it will be useful, 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 # GNU Lesser General Public License for more details. 16 # 17 # You should have received a copy of the GNU Lesser General Public License 18 # along with this program; if not, write to the Free Software 19 # Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA 20 */ 21 22 #ifndef __LIBV4LCONTROL_PRIV_H 23 #define __LIBV4LCONTROL_PRIV_H 24 25 #include "libv4l-plugin.h" 26 27 #define V4LCONTROL_SHM_SIZE 4096 28 29 #define V4LCONTROL_SUPPORTS_NEXT_CTRL 0x01 30 #define V4LCONTROL_MEMORY_IS_MALLOCED 0x02 31 32 struct v4lcontrol_flags_info; 33 34 struct v4lcontrol_data { 35 int fd; /* Device fd */ 36 int bandwidth; /* Connection bandwidth (0 = unknown) */ 37 int flags; /* Flags for this device */ 38 int priv_flags; /* Internal use only flags */ 39 int controls; /* Which controls to use for this device */ 40 unsigned int *shm_values; /* shared memory control value store */ 41 unsigned int old_values[V4LCONTROL_COUNT]; /* for controls_changed() */ 42 const struct v4lcontrol_flags_info *flags_info; 43 void *dev_ops_priv; 44 const struct libv4l_dev_ops *dev_ops; 45 }; 46 47 struct v4lcontrol_flags_info { 48 unsigned short vendor_id; 49 unsigned short product_id; 50 unsigned short product_mask; 51 const char *dmi_board_vendor; 52 const char *dmi_board_name; 53 /* We could also use the USB manufacturer and product strings some devices have 54 const char *manufacturer; 55 const char *product; */ 56 int flags; 57 int default_gamma; 58 /* Some seldom used dmi strings (for notebooks with bogus info in the board 59 entries, but usefull info elsewhere). We keep this at the end as to not 60 polute the initalizers for the normal case. */ 61 /* System (product) vendor / name */ 62 const char *dmi_system_vendor; 63 const char *dmi_system_name; 64 /* Board and System versions */ 65 const char *dmi_board_version; 66 const char *dmi_system_version; 67 }; 68 69 struct v4lcontrol_usb_id { 70 unsigned short vendor_id; 71 unsigned short product_id; 72 }; 73 74 struct v4lcontrol_upside_down_table { 75 const char **board_vendor; 76 const char **board_name; 77 const struct v4lcontrol_usb_id *camera_id; 78 }; 79 80 #endif 81