CameraPlugin on mac

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

CameraPlugin on mac

Bob Arning-2

The CameraPlugin works fine in Etoys 5.0, but I could not get the code (CameraInterface & WebCamMorph) to show anything in Squeak 5.1. When it took the raw CameraPlugin from Etoys and used it in Squeak 5.1 instead of the CameraPlugin.bundle, video started appearing. Sometime I guess old code (2011) is better than new (2016). ;-)



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CameraPlugin on mac

Bob Arning-2

Well, mostly better. When it tries to close the camera after a #videoTest:, it crashes the VM. Any pointer to a compatible set of pieces is welcome.


On 12/25/16 5:39 AM, Bob Arning wrote:

The CameraPlugin works fine in Etoys 5.0, but I could not get the code (CameraInterface & WebCamMorph) to show anything in Squeak 5.1. When it took the raw CameraPlugin from Etoys and used it in Squeak 5.1 instead of the CameraPlugin.bundle, video started appearing. Sometime I guess old code (2011) is better than new (2016). ;-)




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CameraPlugin on mac

Yoshiki Ohshima-3
I would not be too surprised to hear that it has some instability, but
it used to work okay on my computer.  (Beside the fact that
Squeak5.1-16548-32bit does not even run, but also as keyboard input
does not work, I have hard time to even do a simple debugging).

My test code that used to work is attached here.  Hope this helps.

On Sun, Dec 25, 2016 at 3:20 AM, Bob Arning <[hidden email]> wrote:

> Well, mostly better. When it tries to close the camera after a #videoTest:,
> it crashes the VM. Any pointer to a compatible set of pieces is welcome.
>
>
> On 12/25/16 5:39 AM, Bob Arning wrote:
>
> The CameraPlugin works fine in Etoys 5.0, but I could not get the code
> (CameraInterface & WebCamMorph) to show anything in Squeak 5.1. When it took
> the raw CameraPlugin from Etoys and used it in Squeak 5.1 instead of the
> CameraPlugin.bundle, video started appearing. Sometime I guess old code
> (2011) is better than new (2016). ;-)
>
>
>
>
>


--
-- Yoshiki



CameraMorph.st (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CameraPlugin on mac

Bob Arning-2

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.


On 12/25/16 1:09 PM, Yoshiki Ohshima wrote:
I would not be too surprised to hear that it has some instability, but
it used to work okay on my computer.  (Beside the fact that
Squeak5.1-16548-32bit does not even run, but also as keyboard input
does not work, I have hard time to even do a simple debugging).

My test code that used to work is attached here.  Hope this helps.

On Sun, Dec 25, 2016 at 3:20 AM, Bob Arning [hidden email] wrote:
Well, mostly better. When it tries to close the camera after a #videoTest:,
it crashes the VM. Any pointer to a compatible set of pieces is welcome.


On 12/25/16 5:39 AM, Bob Arning wrote:

The CameraPlugin works fine in Etoys 5.0, but I could not get the code
(CameraInterface & WebCamMorph) to show anything in Squeak 5.1. When it took
the raw CameraPlugin from Etoys and used it in Squeak 5.1 instead of the
CameraPlugin.bundle, video started appearing. Sometime I guess old code
(2011) is better than new (2016). ;-)










    



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CameraPlugin on mac

timrowledge

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



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CameraPlugin on mac

Bob Arning-2

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 [hidden email] 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; [hidden email]; http://www.rowledge.org/tim
Strange OpCodes: YVR: Branch to Vancouver






Loading...