libuvcc  0.41a
simple uvc implementation for os x
 All Data Structures Functions Variables Typedefs Enumerations Groups Pages
1 /* by sluggo, ( )
2  * to use libuvcc from source you need to import the IOKit framework
3  */
5 #ifndef __LIBUVCC_H__
6 #define __LIBUVCC_H__
8 #include <CoreFoundation/CoreFoundation.h>
9 #include <IOKit/usb/IOUSBLib.h>
10 #include "libuvcc-defs.h"
12 /* name stored in uvccCam->regName if no name is found, edit as you please */
13 #define UVCC_UNKNOWN_CAM_REG_NAME "Unknown camera"
26 int uvccInit();
30 void uvccExit();
35 CFStringRef uvccVersion();
41 int uvccGetCamList(uvccCam ***list);
48 int uvccGetCamWithQTUniqueID(CFStringRef uId, uvccCam **cam);
55 int uvccGetCamsWithModelID(struct uvccModelID *mID, uvccCam ***list);
61 void uvccReleaseCamList(uvccCam **list, int len);
66 void uvccReleaseCam(uvccCam *cam);
72 CFStringRef uvccCamQTUniqueID(uvccCam *cam);
81 CFStringRef uvccCamManufacturer(uvccCam *cam);
85 CFStringRef uvccCamProduct(uvccCam *cam);
89 CFStringRef uvccCamSerialNumber(uvccCam *cam);
97 uint8_t uvccCamSupportsRequest(uvccCam *cam, enum uvccRequest request);
106 int uvccUni2Char(UniChar *src, char *dst, int len, int errChar);
112 int uvccOpenCam(uvccCam *cam);
117 void uvccCloseCam(uvccCam *cam);
126 int uvccSendRequest(uvccCam *cam, uint8_t bRequest, enum uvccRequest uvccReq, void *pData);
138 int uvccSendEURequest(uvccCam *cam, uint8_t euIndex, uint8_t reqIndex, uint8_t bRequest, uint16_t wLength, void *pData);
145 int uvccSendRawRequest(uvccCam *cam, IOUSBDevRequest *request);
153 int uvccSendInfoRequest(uvccCam *cam, enum uvccRequest uvccReq, int8_t *pData);
158 CFStringRef uvccErrorStr();
169 int uvccMSLifeCamExposureTimeSpan(uint32_t min, uint32_t max, uint32_t **list);
177 int uvccExposureTimeToMsLifeCamValue(uint32_t value, uint32_t *msList, int listLength);
187 int uvccRWScanningMode(uvccCam *cam, uint8_t request, uint8_t *value);
189 int uvccRWAutoExposureMode(uvccCam *cam, uint8_t request, int8_t *value);
191 int uvccRWAutoExposurePrio(uvccCam *cam, uint8_t request, uint8_t *value);
193 int uvccRWExposure(uvccCam *cam, uint8_t request, uint32_t *value);
194 /* TODO: relative exposure */
202 int uvccRWAutoFocus(uvccCam *cam, uint8_t request, uint8_t *value);
204 int uvccRWFocus(uvccCam *cam, uint8_t request, uint16_t *value);
205 /* TODO: relative focus */
207 int uvccRWIris(uvccCam *cam, uint8_t request, int16_t *value);
209 /* TODO: relative iris */
210 int uvccRWBacklightCompensation(uvccCam *cam, uint8_t request, uint16_t *value);
212 int uvccRWBrightness(uvccCam *cam, uint8_t request, int16_t *value);
214 int uvccRWContrast(uvccCam *cam, uint8_t request, uint16_t *value);
216 int uvccRWGain(uvccCam *cam, uint8_t request, uint16_t *value);
218 int uvccRWPowerLineFrequency(uvccCam *cam, uint8_t request, uint8_t *value);
220 int uvccRWAutoHue(uvccCam *cam, uint8_t request, uint8_t *value);
222 int uvccRWHue(uvccCam *cam, uint8_t request, int16_t *value);
224 int uvccRWSaturation(uvccCam *cam, uint8_t request, uint16_t *value);
226 int uvccRWSharpness(uvccCam *cam, uint8_t request, uint16_t *value);
228 int uvccRWGamma(uvccCam *cam, uint8_t request, uint16_t *value);
230 int uvccRWAutoWhiteBalanceTemp(uvccCam *cam, uint8_t request, uint8_t *value);
232 int uvccRWWhiteBalanceTemp(uvccCam *cam, uint8_t request, uint16_t *value);
234 int uvccRWAutoWhiteBalanceComponent(uvccCam *cam, uint8_t request, uint8_t *value);
243 int uvccRWWhiteBalanceComponent(uvccCam *cam, uint8_t request, uint16_t *blue, uint16_t *red);
298 #endif