uvcvideo.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 # Linux-UVC streaming input-plugin for MJPG-streamer                           #
00003 #                                                                              #
00004 # This package work with the Logitech UVC based webcams with the mjpeg feature #
00005 #                                                                              #
00006 # Copyright (C) 2005 2006 Laurent Pinchart &&  Michel Xhaard                   #
00007 #                    2007 Lucas van Staden                                     #
00008 #                    2007 Tom Stöveken                                         #
00009 #                                                                              #
00010 # This program is free software; you can redistribute it and/or modify         #
00011 # it under the terms of the GNU General Public License as published by         #
00012 # the Free Software Foundation; either version 2 of the License, or            #
00013 # (at your option) any later version.                                          #
00014 #                                                                              #
00015 # This program is distributed in the hope that it will be useful,              #
00016 # but WITHOUT ANY WARRANTY; without even the implied warranty of               #
00017 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
00018 # GNU General Public License for more details.                                 #
00019 #                                                                              #
00020 # You should have received a copy of the GNU General Public License            #
00021 # along with this program; if not, write to the Free Software                  #
00022 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA    #
00023 #                                                                              #
00024 *******************************************************************************/
00025 #ifndef _USB_VIDEO_H_
00026 #define _USB_VIDEO_H_
00027 
00028 #include <linux/kernel.h>
00029 #include <linux/videodev2.h>
00030 
00031 /* Compatibility */
00032 #include "uvc_compat.h"
00033 
00034 /*
00035  * Private V4L2 control identifiers.
00036  */
00037 
00038 #ifndef V4L2_CID_BACKLIGHT_COMPENSATION
00039 #define V4L2_CID_BACKLIGHT_COMPENSATION         (V4L2_CID_PRIVATE_BASE+0)
00040 #endif
00041 
00042 #ifndef V4L2_CID_POWER_LINE_FREQUENCY
00043 #define V4L2_CID_POWER_LINE_FREQUENCY           (V4L2_CID_PRIVATE_BASE+1)
00044 #endif
00045 
00046 #ifndef V4L2_CID_SHARPNESS
00047 #define V4L2_CID_SHARPNESS                      (V4L2_CID_PRIVATE_BASE+2)
00048 #endif
00049 
00050 #ifndef V4L2_CID_HUE_AUTO
00051 #define V4L2_CID_HUE_AUTO                       (V4L2_CID_PRIVATE_BASE+3)
00052 #endif
00053 
00054 #ifndef V4L2_CID_FOCUS_AUTO
00055 #define V4L2_CID_FOCUS_AUTO                     (V4L2_CID_PRIVATE_BASE+4)
00056 #endif
00057 
00058 #ifndef V4L2_CID_FOCUS_ABSOLUTE
00059 #define V4L2_CID_FOCUS_ABSOLUTE                 (V4L2_CID_PRIVATE_BASE+5)
00060 #endif
00061 
00062 #ifndef V4L2_CID_FOCUS_RELATIVE
00063 #define V4L2_CID_FOCUS_RELATIVE                 (V4L2_CID_PRIVATE_BASE+6)
00064 #endif
00065 
00066 #ifndef V4L2_CID_PAN_RELATIVE
00067 #define V4L2_CID_PAN_RELATIVE                   (V4L2_CID_PRIVATE_BASE+7)
00068 #endif
00069 
00070 #ifndef V4L2_CID_TILT_RELATIVE
00071 #define V4L2_CID_TILT_RELATIVE                  (V4L2_CID_PRIVATE_BASE+8)
00072 #endif
00073 
00074 #ifndef V4L2_CID_PANTILT_RESET
00075 #define V4L2_CID_PANTILT_RESET                  (V4L2_CID_PRIVATE_BASE+9)
00076 #endif
00077 
00078 #ifndef V4L2_CID_EXPOSURE_AUTO
00079 #define V4L2_CID_EXPOSURE_AUTO                  (V4L2_CID_PRIVATE_BASE+10)
00080 #endif
00081 
00082 #ifndef V4L2_CID_EXPOSURE_ABSOLUTE
00083 #define V4L2_CID_EXPOSURE_ABSOLUTE              (V4L2_CID_PRIVATE_BASE+11)
00084 #endif
00085 
00086 #ifndef V4L2_CID_EXPOSURE_AUTO_PRIORITY
00087 #define V4L2_CID_EXPOSURE_AUTO_PRIORITY         (V4L2_CID_PRIVATE_BASE+14)
00088 #endif
00089 
00090 #ifndef V4L2_CID_WHITE_BALANCE_TEMPERATURE_AUTO
00091 #define V4L2_CID_WHITE_BALANCE_TEMPERATURE_AUTO (V4L2_CID_PRIVATE_BASE+12)
00092 #endif
00093 
00094 #ifndef V4L2_CID_WHITE_BALANCE_TEMPERATURE
00095 #define V4L2_CID_WHITE_BALANCE_TEMPERATURE      (V4L2_CID_PRIVATE_BASE+13)
00096 #endif
00097 
00098 #ifndef V4L2_CID_PRIVATE_LAST
00099 #define V4L2_CID_PRIVATE_LAST                   V4L2_CID_EXPOSURE_AUTO_PRIORITY
00100 #endif
00101 /*
00102  * Dynamic controls
00103  */
00104 /* Data types for UVC control data */
00105 enum uvc_control_data_type {
00106         UVC_CTRL_DATA_TYPE_RAW = 0,
00107         UVC_CTRL_DATA_TYPE_SIGNED,
00108         UVC_CTRL_DATA_TYPE_UNSIGNED,
00109         UVC_CTRL_DATA_TYPE_BOOLEAN,
00110         UVC_CTRL_DATA_TYPE_ENUM,
00111         UVC_CTRL_DATA_TYPE_BITMASK,
00112 };
00113 
00114 #define UVC_CONTROL_SET_CUR     (1 << 0)
00115 #define UVC_CONTROL_GET_CUR     (1 << 1)
00116 #define UVC_CONTROL_GET_MIN     (1 << 2)
00117 #define UVC_CONTROL_GET_MAX     (1 << 3)
00118 #define UVC_CONTROL_GET_RES     (1 << 4)
00119 #define UVC_CONTROL_GET_DEF     (1 << 5)
00120 /* Control should be saved at suspend and restored at resume. */
00121 #define UVC_CONTROL_RESTORE     (1 << 6)
00122 
00123 #define UVC_CONTROL_GET_RANGE   (UVC_CONTROL_GET_CUR | UVC_CONTROL_GET_MIN | \
00124                                  UVC_CONTROL_GET_MAX | UVC_CONTROL_GET_RES | \
00125                                  UVC_CONTROL_GET_DEF)
00126 
00127 struct uvc_xu_control_info {
00128         __u8 entity[16];
00129         __u8 index;
00130         __u8 selector;
00131         __u16 size;
00132         __u32 flags;
00133 };
00134 
00135 struct uvc_xu_control_mapping {
00136         __u32 id;
00137         __u8 name[32];
00138         __u8 entity[16];
00139         __u8 selector;
00140 
00141         __u8 size;
00142         __u8 offset;
00143         enum v4l2_ctrl_type v4l2_type;
00144         enum uvc_control_data_type data_type;
00145 };
00146 
00147 struct uvc_xu_control {
00148         __u8 unit;
00149         __u8 selector;
00150         __u16 size;
00151         __u8 __user *data;
00152 };
00153 
00154 #define UVCIOC_CTRL_ADD         _IOW  ('U', 1, struct uvc_xu_control_info)
00155 #define UVCIOC_CTRL_MAP         _IOWR ('U', 2, struct uvc_xu_control_mapping)
00156 #define UVCIOC_CTRL_GET         _IOWR ('U', 3, struct uvc_xu_control)
00157 #define UVCIOC_CTRL_SET         _IOW  ('U', 4, struct uvc_xu_control)
00158 
00159 
00160 
00161 #endif
00162 


corobot_pantilt
Author(s):
autogenerated on Wed Aug 26 2015 11:10:04