[squeak-dev] CameraPlugin on mac

tim Rowledge tim at rowledge.org
Sun Dec 25 19:47:29 UTC 2016


> On 25-12-2016, at 10:44 AM, Bob Arning <arning315 at comcast.net> wrote:
> 
> Thank you for that - looks like the answer.
> 
> The CameraInterface I was testing had this:
> 
> videoTest: camNum
>     "A quick test of video input. Displays video on the screen until the mouse is pressed."
>     "self videoTest: 1"
>     "self videoTest: 2"
> 
> and doing the videoTest: 1 would turn on the camera light, but report that no camera was present.
> 
> Your code has
> 
>     self openCamera: 0 width: 640 height: 480.
> and it works fine. So zero seems to be the right camera number, at least for this version of the plugin.

The first ‘valid’ number is supposed to be 1. Indeed the Win32 plugin explicitly fails for 0, the linux version subtracts 1 from the provided number and would fail with 0, and the RISC OS version… doesn’t exist.

In platforms/iOS/plugins/CameraPlugin/AVFoundationVideoGrabber.m it looks like the list of available devices is left 0-based and this would probably explain your problem.

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: YVR: Branch to Vancouver




More information about the Squeak-dev mailing list