[etoys-dev] Etoys: MorphicExtras-kfr.41.mcz

Derek O'Connell doc at doconnel.f9.co.uk
Mon Oct 17 18:57:22 EDT 2011


On 17/10/11 23:34, karl ramberg wrote:
>  I committed the code changes you sent and a little fix I had to the
>  squeaksource repository. http://www.squeaksource.com/WebCamMorph
>
>  I had turned the waiting for camera start up down to 1 sec. That
>  caused trouble. Now I use 2 sec and thing seems to work fine.
>
>
>  I have added intoWorld: and outOfWorld: methods to the version for
>  Etoys, so the web cam shuts down when you leave the project. But
>  these methods get called when adding TransformationMorph to the web
>  cam.

I'm not familiar with into/outOfWorld: but are they being used to cover 
the case when the webcam morph is deleted? Wouldn't they also cause 
problems in other situations, eg, dragging? I'm guessing the camera 
should be turned off when the morph enters the bin, when the project is 
exited and on exiting etoys. Latter case at least should already be 
catered for. Trying to re-instate a camera on start-up might fail on a 
different machine with a different camera (or more than one video device).

-D

>
>
>  Karl
>
>
>
>
>  On Tue, Oct 18, 2011 at 12:22 AM, Derek O'Connell
>  <doc at doconnel.f9.co.uk> wrote:
> > On 17/10/11 19:44, karl ramberg wrote:
> >>
> >> It seems problems go away with more delay when starting the
> >> camera.
> >
> > Yes, another dodgy area in working with webcams. John has/had a 2s
> > delay in the original plug-in (used in a video test) and this is
> > replicated in webcam morph. I don't recall exact reason why needed
> > but probably true extents are unknown until frames are actually
> > available, which won't be the case immediately after opening. A
> > delay is also useful due to auto-gain control on many cameras. Had
> > you removed the delay completely?
> >
> > Btw, I'm only guilty for the Linux version :-) I don't know if it's
> > the same on Windows but on Linux the amount of buffering is
> > determined by V4L (not libv4l2 but that also adds buffering) and is
> > dependent on the capabilities of the particular camera. This also
> > explains why frame-skipping may be needed which I describe in (1).
> > Also today the Scratch wiki page that I created has been
> > re-instated (2) and some of the links provide good background
> > reading.
> >
> > (1)
> > 
http://www.assembla.com/code/scratchonlinux/subversion/nodes/trunk/scratch/src/plugins/camera/sqCamera-linux.README
> >
> >
> >
(2) http://info.scratch.mit.edu/Linux_installer/Linux_Camera_Plug-in
> >
> >
> >>
> >> Karl
> >>
> >> On Mon, Oct 17, 2011 at 8:14 PM, karl ramberg
> >> <karlramberg at gmail.com> wrote:
> >>> On Mon, Oct 17, 2011 at 8:13 PM, karl ramberg
> >>> <karlramberg at gmail.com> wrote:
> >>>> I loaded the code here:
> >>>> 'http://www.squeaksource.com/WebCamMorph'
> >>> Together with the fixes in previous mail.
> >>>
> >>>> That crashes the image because changing the instance
> >>>> variables in the on method give wrong dimension to the
> >>>> captureForm. There seems to be some issues with the plugin
> >>>> here too.
> >>>>
> >>>> WebCamMorph>>on ... frameExtent := CameraPlugin frameExtent:
> >>>> camNum. captureForm := Form extent: (CameraPlugin
> >>>> frameExtent: camNum) depth: 32. ...
> >>>>
> >>>> Karl
> >>>>
> >>>>
> >>>> On Mon, Oct 17, 2011 at 7:59 PM, karl ramberg
> >>>> <karlramberg at gmail.com> wrote:
> >>>>> Hi I run under Win 7. Using the code from latest Etoys
> >>>>> repository, morphic extras http://source.squeak.org/etoys
> >>>>>
> >>>>> If I rotate the Camera player and change the resolution,
> >>>>> the image crashes.
> >>>>>
> >>>>> I don't have gdb.
> >>>>>
> >>>>> I'll test your code to see if the crashing happens there
> >>>>> too.
> >>>>>
> >>>>> Karl
> >>>>>
> >>>>> On Mon, Oct 17, 2011 at 1:30 PM, Derek O'Connell
> >>>>> <doc at doconnel.f9.co.uk> wrote:
> >>>>>> Hi Karl,
> >>>>>>
> >>>>>>> I have not figured this out on my side. Rotating the
> >>>>>>> morph get the plugin into bogus state and eventual
> >>>>>>> crashes. Must be some problems with rotated forms. But
> >>>>>>> I get no good debug info, just crash :-(
> >>>>>>
> >>>>>> Can you give me the details of your set-up and a better
> >>>>>> idea of what happens just before the crash? Also, if it's
> >>>>>> not too much hassle, could you run Etoys via gdb to see
> >>>>>> where exactly it hangs? I'm attaching the change-set from
> >>>>>> my recent edits which allow me to rotate the morph and
> >>>>>> take snapshots (ImageMorphs) in case it's any help.
> >>>>>>
> >>>>>> -D
> >>>>>>
> >>>>>>
> >>>>>
> >>>>
> >>>
> >
> >
> >




More information about the etoys-dev mailing list