So, can we have a primitive to tell us which flavor of a primitive it is? ;-)


On 12/25/16 2:47 PM, tim Rowledge wrote:

      
On 25-12-2016, at 10:44 AM, Bob Arning <arning315@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@rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: YVR: Branch to Vancouver