If you download an older version of XCode (the last version of 3 or 4 depending on if you want 10.6 or 10.7 SDKs) from the Apple developer site (https://developer.apple.com/downloads/), it will contain the 10.6 and/or 10.7 SDKs (inside the package).
You can extract the SDKs without installing the full package (which will be disallowed on 10.9). There are several ways to do this, but the easiest I've found is to use Pacifist http://www.charlessoft.com/.
Then place both of those sdks in your XCode 5 SDKs folder at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs folder and to use them with XCode 5.
Then restart XCode and choose the 10.6 or 10.7 SDK in the build settings. Remember to change the SDK for BOTH your project AND the openFrameworksLib project.
Also, to ensure the correct aspect ratio, make sure you are initializing your camera with a specific size (e.g. grabber.initGrabber(1280, 720);
if you are trying to get a 16:9 aspect from the camera. By default you are not guaranteed to get the camera's "best" native resolution.
For documentation purposes, here are the steps currently needed to get ofxUVC control over the Logitech c920 camera:
- Add ofxUVC and ofxYAML to the openframeworks addons folder
- in UVCCameraControl.h set UVC_PROCESSING_UNIT to 3 (
#define UVC_PROCESSING_UNIT_ID 0x03
) - in UVCCameraControl.m's setData and getData modify the wIndex to use the selector instead of the unitID (
controlRequest.wValue = (selector << 8) | interfaceNum;
) - Update the camera definition in the .yaml file
Logitech c920 definition:
- name: Logitech Camera
vendorId : 0x046d
productId: 0x82d
interfaceNum: 0x03
# 1280x720 (this is 1/2 res)
width: 1280
height: 720
Note that the Logitech Camera is the id listed by the ofQTKitVideoGrabber in this case
and the cameraToUse
at the top of the yaml file is set to 6(c920's yaml 0 based index).
This was succesfully tested on osx 10.7, 10.8 and 10.9