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

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


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