|
int | uvccInit () |
|
void | uvccExit () |
|
CFStringRef | uvccVersion () |
|
int | uvccGetCamList (uvccCam ***list) |
|
int | uvccGetCamsWithModelID (struct uvccModelID *mID, uvccCam ***list) |
|
void | uvccReleaseCamList (uvccCam **list, int len) |
|
void | uvccReleaseCam (uvccCam *cam) |
|
uint8_t | uvccCamSupportsRequest (uvccCam *cam, enum uvccRequest request) |
|
int | uvccUni2Char (UniChar *src, char *dst, int len, int errChar) |
|
int | uvccOpenCam (uvccCam *cam) |
|
void | uvccCloseCam (uvccCam *cam) |
|
int | uvccSendRequest (uvccCam *cam, uint8_t bRequest, enum uvccRequest uvccReq, void *pData) |
|
int | uvccSendEURequest (uvccCam *cam, uint8_t euIndex, uint8_t reqIndex, uint8_t bRequest, uint16_t wLength, void *pData) |
|
int | uvccSendRawRequest (uvccCam *cam, IOUSBDevRequest *request) |
|
int | uvccSendInfoRequest (uvccCam *cam, enum uvccRequest uvccReq, int8_t *pData) |
|
CFStringRef | uvccErrorStr () |
|
Functions to get, release, open, close and send requests to cams.
Check if cam supports a given request, note that cam does not need to be open for this.
- Parameters
-
- Returns
- 1 if camera supports request, 0 if not.
CFStringRef uvccErrorStr |
( |
| ) |
|
Retrieves description of last error together with the function that caused it and the corresponding OS X error code. Note that returned CFStringRef (NSString*) must be released.
- Returns
- CFStringRef to description or NULL on error
int uvccGetCamList |
( |
uvccCam *** |
list | ) |
|
Populates list with all usb connected cams that have a video control interface. List needs to be released by uvccReleaseCamList(), note that list of length 0 is not allocated and should therefor not be released.
- Parameters
-
list | cam double pointer to hold cams |
- Returns
- Length of list or -1
Populates list with all usb connected cams that have are identified by modelID. List needs to be released by uvccReleaseCamList(), note that list of length 0 is not allocated and should therefor not be released.
- Parameters
-
mId | modelID identifying cam |
list | cam double pointer to hold cams |
- Returns
- Length of list or -1
Init uvcc.
- Returns
- 0 on success
Open cam to be able send requests to it, this takes control over it and does not let any other process send requests while you have it opened.
- Parameters
-
- Returns
- 0 on success != 0 otherwise
void uvccReleaseCam |
( |
uvccCam * |
cam | ) |
|
Release single cam.
- Parameters
-
void uvccReleaseCamList |
( |
uvccCam ** |
list, |
|
|
int |
len |
|
) |
| |
Release and free list of cams.
- Parameters
-
list | list of cams |
len | length of list |
int uvccSendEURequest |
( |
uvccCam * |
cam, |
|
|
uint8_t |
euIndex, |
|
|
uint8_t |
reqIndex, |
|
|
uint8_t |
bRequest, |
|
|
uint16_t |
wLength, |
|
|
void * |
pData |
|
) |
| |
Send extension unit (EU) request to cam. EUs are basically where the manufacturer can stuff their super secret proprietary functions. The only way to find out what they do is to send requests and see what happens. Each EU may support several different requests and a cam may have several EUs. The number of EUs on a cam is uvccCam::nEUs, the number of requests EU n
supports is uvccCam::nEUReqs[n]
.
Note: According to the UVC standard if bRequest = UVC_GET_LEN
(see UVC bRequest values) then wLength = 2
.
- Parameters
-
cam | |
euIndex | zero-based index of the EU |
reqIndex | zero-based index of the request in the EU |
bRequest | uvc request to send, valid values are those in UVC bRequest values |
wLength | length of the data |
pData | data to send or buf to receive data in |
- Returns
- 0 on success or error code
Kind of wrapper for UVC_GET_INFO. Result can be &'ed with Info flags to see what operations are supported.
- Parameters
-
cam | |
uvccReq | to get info about |
pData | buf to hold result |
- Returns
- 0 on success or error code
int uvccSendRawRequest |
( |
uvccCam * |
cam, |
|
|
IOUSBDevRequest * |
request |
|
) |
| |
For the brave.. send a raw request on the default control pipe of the video ctrl interface of the cam!
- Parameters
-
- Returns
- 0 on success or error code
int uvccSendRequest |
( |
uvccCam * |
cam, |
|
|
uint8_t |
bRequest, |
|
|
enum uvccRequest |
uvccReq, |
|
|
void * |
pData |
|
) |
| |
Send predefined uvcc request to cam.
- Parameters
-
cam | |
bRequest | uvc request to send, valid values are those in UVC bRequest values |
uvccReq | uvcc request to send, valid values are those in uvccRequest |
pData | data to send or buf to receive data in |
- Returns
- 0 on success or error code
int uvccUni2Char |
( |
UniChar * |
src, |
|
|
char * |
dst, |
|
|
int |
len, |
|
|
int |
errChar |
|
) |
| |
Convert from UniChar to char.
- Parameters
-
src | source |
dst | destination |
len | number of UniChars to convert |
errChar | char to set if src[i] is non-ascii or 0 to skip them |
- Returns
- Length of dst
CFStringRef uvccVersion |
( |
| ) |
|
uvcc version (CFStringRef can be safely casted to NSString*).
- Returns
- uvcc version string