[MacRuby-devel] MacRuby challenge
Jordan K. Hubbard
jkh at apple.com
Tue Dec 20 05:53:31 PST 2011
Yeah, I figured as much and was able to fix it by making that change right after reporting the bug, but shouldn't we be able to some how make this camera resolution independent?
I'm no expert on the AvCapture class, but AVCaptureSessionPresetHigh is another preset which at least does not hard-code the resolution of the camera, leaving as the sole exercise to the reader the size of the frame. I'm not sure how to query that bit of info, and on the MacBook Air the 720p resolution results in the same incorrect offset for mustache, glasses and hat - only 640x480 delivers the correct results there. Clearly, we haven't quite made this hardware independent yet, but we're getting closer I think!
P.S. Kudos to Matt for posting such an interesting and amusing challenge! I've already learned far more about the AVCaptureSession class than I would have ever been motivated to learn otherwise, and I work for the company! :)
On Dec 20, 2011, at 2:24 PM, Paul Vinieratos wrote:
> oh.. I changed the preset. replace all 1280 with 640 and all 720 with 480 and check again.
> On 20 Δεκ 2011, at 15:20, "Jordan K. Hubbard" <jkh at apple.com> wrote:
>> On Dec 20, 2011, at 11:34 AM, Pavlos Vinieratos wrote:
>>> how is that? :)
>> Now broken on the MacBook Air. :-)
>> 2011-12-20 14:19:52.115 macruby[4131:60b] *** Can't add <AVCaptureDeviceInput: 0x401336a00 [FaceTime Camera (Built-in)]> because the device does not support AVCaptureSessionPreset1280x720. Use -[AVCaptureDevice supportsAVCaptureSessionPreset:].
>> - Jordan
>> MacRuby-devel mailing list
>> MacRuby-devel at lists.macosforge.org
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the MacRuby-devel