Karl Ramberg uploaded a new version of MorphicExtras to project Etoys:
http://source.squeak.org/etoys/MorphicExtras-kfr.41.mcz ==================== Summary ==================== Name: MorphicExtras-kfr.41 Author: kfr Time: 13 October 2011, 10:47:37 pm UUID: 999c47e0-2257-0249-8f43-87899271a4d4 Ancestors: MorphicExtras-kfr.40 Some more fixing. I'll say this is pretty much good to gow now. Famous last words... =============== Diff against MorphicExtras-kfr.40 =============== Item was changed: ----- Method: WebCamMorph class>>additionsToViewerCategories (in category 'scripting') ----- additionsToViewerCategories "Answer a list of (<categoryName> <list of category specs>) pairs that characterize the phrases this kind of morph wishes to add to various Viewer categories." ^ #( (#'camera settings' ( (slot resolution '160x120, 320x240 or 640x480' WebCamResolution readWrite Player getWebCamResolution Player setWebCamResolution:) (slot cameraIsOn 'Whether the camera is on/off' Boolean readWrite Player getWebCamIsOn Player setWebCamIsOn:) (slot useFrameSize 'Resize the morph to match the cameras frame size' Boolean readWrite Player getUseFrameSize Player setUseFrameSize:) + (slot lastFrame 'A morph with the last frame' Player readOnly Player getLastFrame unused unused) (slot graphic 'The picture currently being worn' Graphic readOnly Player getVideoGraphic unused unused) )) ) ! Item was changed: ----- Method: WebCamMorph>>getLastFrame (in category 'e-toy - settings') ----- getLastFrame + ^ SketchMorph withForm: displayForm deepCopy! - ^ SketchMorph withForm: displayForm ! _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
On 13.10.2011, at 20:47, [hidden email] wrote:
> Karl Ramberg uploaded a new version of MorphicExtras to project Etoys: > http://source.squeak.org/etoys/MorphicExtras-kfr.41.mcz > > ==================== Summary ==================== > > Name: MorphicExtras-kfr.41 > Author: kfr > Time: 13 October 2011, 10:47:37 pm > UUID: 999c47e0-2257-0249-8f43-87899271a4d4 > Ancestors: MorphicExtras-kfr.40 > > Some more fixing. > I'll say this is pretty much good to gow now. > Famous last words... I just committed the Mac CameraPlugin, and tried your code. Worked on first try, great! Things I noticed: The camera stays on when I leave the project. It should turn off - we're not spying on users ;) After loading a project with a "running" camera, it does not restart automatically. For both of these I think we should use the intoWorld/outOfWorld mechanism. See VideoMorph. When I duplicate the camera I get two cameras. When I delete the one camera, the other one stops, too. However, the tile still says it's "on". We should hide the old camera from the object catalog. Maybe just remove it from the "multimedia" page and still leave it in the alphabetical list. And rename the new one to Camera (we don't really have to rename the class, but it would be consistent to do so). Got errors in Player when I tried to rotate the camera. All the getters should use the "getValueFromCostume:" idiom. Similarly, the setters should use "setCostumeSlot:toValue:". The viewer category should simply be named "camera", not "camera settings". Not sure about the "last frame" tile. Do we need that? If so we should find a nicer name. In any case the help balloon should not mention "morph". In Etoys we generally do not distinguish between the player and its costume. (idea: maybe a copy of the camera should just return a sketch) And we should make a test release for others to try this, soonish. - Bert - _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
On Fri, Oct 14, 2011 at 2:53 PM, Bert Freudenberg <[hidden email]> wrote:
> On 13.10.2011, at 20:47, [hidden email] wrote: > >> Karl Ramberg uploaded a new version of MorphicExtras to project Etoys: >> http://source.squeak.org/etoys/MorphicExtras-kfr.41.mcz >> >> ==================== Summary ==================== >> >> Name: MorphicExtras-kfr.41 >> Author: kfr >> Time: 13 October 2011, 10:47:37 pm >> UUID: 999c47e0-2257-0249-8f43-87899271a4d4 >> Ancestors: MorphicExtras-kfr.40 >> >> Some more fixing. >> I'll say this is pretty much good to gow now. >> Famous last words... > > > I just committed the Mac CameraPlugin, and tried your code. Worked on first try, great! Great :-) > > Things I noticed: > > The camera stays on when I leave the project. It should turn off - we're not spying on users ;) > > After loading a project with a "running" camera, it does not restart automatically. > > For both of these I think we should use the intoWorld/outOfWorld mechanism. See VideoMorph. I'll fix this. > > When I duplicate the camera I get two cameras. When I delete the one camera, the other one stops, too. However, the tile still says it's "on". I'm not sure how to fix this yet. > > We should hide the old camera from the object catalog. Maybe just remove it from the "multimedia" page and still leave it in the alphabetical list. And rename the new one to Camera (we don't really have to rename the class, but it would be consistent to do so). Yes. > > Got errors in Player when I tried to rotate the camera. All the getters should use the "getValueFromCostume:" idiom. Similarly, the setters should use "setCostumeSlot:toValue:". I noticed to that some extension method did not use the costume idiom. I'll fix that. > > The viewer category should simply be named "camera", not "camera settings". Yes. > > Not sure about the "last frame" tile. Do we need that? If so we should find a nicer name. In any case the help balloon should not mention "morph". In > Etoys we generally do not distinguish between the player and its costume. (idea: maybe a copy of the camera should just return a sketch) The lastFrame returns a SketchMorph. It's easier to get a player than to get just the graphics. Then you can just add it to a holder or something like that without converting etc. I'll look into it a bit more. > > And we should make a test release for others to try this, soonish. > Yes, this need testing. Thanks for feedback. Karl _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
In reply to this post by Bert Freudenberg
On Fri, Oct 14, 2011 at 2:53 PM, Bert Freudenberg <[hidden email]> wrote:
> On 13.10.2011, at 20:47, [hidden email] wrote: > >> Karl Ramberg uploaded a new version of MorphicExtras to project Etoys: >> http://source.squeak.org/etoys/MorphicExtras-kfr.41.mcz >> >> ==================== Summary ==================== >> >> Name: MorphicExtras-kfr.41 >> Author: kfr >> Time: 13 October 2011, 10:47:37 pm >> UUID: 999c47e0-2257-0249-8f43-87899271a4d4 >> Ancestors: MorphicExtras-kfr.40 >> >> Some more fixing. >> I'll say this is pretty much good to gow now. >> Famous last words... > > > I just committed the Mac CameraPlugin, and tried your code. Worked on first try, great! > > Things I noticed: > > The camera stays on when I leave the project. It should turn off - we're not spying on users ;) > > After loading a project with a "running" camera, it does not restart automatically. > > For both of these I think we should use the intoWorld/outOfWorld mechanism. See VideoMorph. > > When I duplicate the camera I get two cameras. When I delete the one camera, the other one stops, too. However, the tile still says it's "on". > > We should hide the old camera from the object catalog. Maybe just remove it from the "multimedia" page and still leave it in the alphabetical list. And rename the new one to Camera (we don't really have to rename the class, but it would be consistent to do so). > > Got errors in Player when I tried to rotate the camera. All the getters should use the "getValueFromCostume:" idiom. Similarly, the setters should use "setCostumeSlot:toValue:". I get problems with the plugin when I rotate player. If I turn the plugin of it cant be turned on again. The image crashed when I manually tried to get a frame from the plugin. Karl > > The viewer category should simply be named "camera", not "camera settings". > > Not sure about the "last frame" tile. Do we need that? If so we should find a nicer name. In any case the help balloon should not mention "morph". In Etoys we generally do not distinguish between the player and its costume. (idea: maybe a copy of the camera should just return a sketch) > > And we should make a test release for others to try this, soonish. > > - Bert - > > > _______________________________________________ > etoys-dev mailing list > [hidden email] > http://lists.squeakland.org/mailman/listinfo/etoys-dev > etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
On 15/10/11 02:00, karl ramberg wrote:
> On Fri, Oct 14, 2011 at 2:53 PM, Bert Freudenberg > <[hidden email]> wrote: > > On 13.10.2011, at 20:47, [hidden email] wrote: > > > >> Karl Ramberg uploaded a new version of MorphicExtras to project > >> Etoys: http://source.squeak.org/etoys/MorphicExtras-kfr.41.mcz > >> > >> ==================== Summary ==================== > >> > >> Name: MorphicExtras-kfr.41 Author: kfr Time: 13 October 2011, > >> 10:47:37 pm UUID: 999c47e0-2257-0249-8f43-87899271a4d4 Ancestors: > >> MorphicExtras-kfr.40 > >> > >> Some more fixing. I'll say this is pretty much good to gow now. > >> Famous last words... > > > > > > I just committed the Mac CameraPlugin, and tried your code. Worked > > on first try, great! > > > > Things I noticed: > > > > The camera stays on when I leave the project. It should turn off - > > we're not spying on users ;) > > > > After loading a project with a "running" camera, it does not > > restart automatically. > > > > For both of these I think we should use the intoWorld/outOfWorld > > mechanism. See VideoMorph. > > > > When I duplicate the camera I get two cameras. When I delete the > > one camera, the other one stops, too. However, the tile still says > > it's "on". > > > > We should hide the old camera from the object catalog. Maybe just > > remove it from the "multimedia" page and still leave it in the > > alphabetical list. And rename the new one to Camera (we don't > > really have to rename the class, but it would be consistent to do > > so). > > > > Got errors in Player when I tried to rotate the camera. All the > > getters should use the "getValueFromCostume:" idiom. Similarly, the > > setters should use "setCostumeSlot:toValue:". > > I get problems with the plugin when I rotate player. If I turn the > plugin of it cant be turned on again. The image crashed when I > manually tried to get a frame from the plugin. Oops, I never needed to rotate, sorry for the omission. On the original webcam morph in Player I am now using "^ self getValueFromCostume: #" and "^ self getValueFromCostume:toValue:" on the getters/setters and "costume renderedMorph <whatever>" (correct?) in takeSnapshot/updateDisplay. That seems to solve these problems. Atm snapshots are getting added to the holder but not displayed so I still need to solve that before updating. -D > > Karl > > > > The viewer category should simply be named "camera", not "camera > > settings". > > > > Not sure about the "last frame" tile. Do we need that? If so we > > should find a nicer name. In any case the help balloon should not > > mention "morph". In Etoys we generally do not distinguish between > > the player and its costume. (idea: maybe a copy of the camera > > should just return a sketch) > > > > And we should make a test release for others to try this, soonish. > > > > - Bert - > > > > > > _______________________________________________ etoys-dev mailing > > list [hidden email] > > http://lists.squeakland.org/mailman/listinfo/etoys-dev > > > _______________________________________________ etoys-dev mailing > list [hidden email] > http://lists.squeakland.org/mailman/listinfo/etoys-dev _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
In reply to this post by Karl Ramberg
Karl, atm I'm working on the original webcam morph in a 4.2 image. After
doing changes to accommodate the TransformationMorph I then discover that the ImageMorph's "isOpaque" defaults to false. Setting to true gets me good snapshots (and in my case also remembering to set table layout on my holder lets me see the actual results, doh). I don't know if any of this is related to your problems but I'll get all this reloaded into a recent etoys image in the next few days and see how it compares to what you have. -D On 15/10/11 02:00, karl ramberg wrote: > On Fri, Oct 14, 2011 at 2:53 PM, Bert Freudenberg<[hidden email]> wrote: >> On 13.10.2011, at 20:47, [hidden email] wrote: >> >>> Karl Ramberg uploaded a new version of MorphicExtras to project Etoys: >>> http://source.squeak.org/etoys/MorphicExtras-kfr.41.mcz >>> >>> ==================== Summary ==================== >>> >>> Name: MorphicExtras-kfr.41 >>> Author: kfr >>> Time: 13 October 2011, 10:47:37 pm >>> UUID: 999c47e0-2257-0249-8f43-87899271a4d4 >>> Ancestors: MorphicExtras-kfr.40 >>> >>> Some more fixing. >>> I'll say this is pretty much good to gow now. >>> Famous last words... >> >> I just committed the Mac CameraPlugin, and tried your code. Worked on first try, great! >> >> Things I noticed: >> >> The camera stays on when I leave the project. It should turn off - we're not spying on users ;) >> >> After loading a project with a "running" camera, it does not restart automatically. >> >> For both of these I think we should use the intoWorld/outOfWorld mechanism. See VideoMorph. >> >> When I duplicate the camera I get two cameras. When I delete the one camera, the other one stops, too. However, the tile still says it's "on". >> >> We should hide the old camera from the object catalog. Maybe just remove it from the "multimedia" page and still leave it in the alphabetical list. And rename the new one to Camera (we don't really have to rename the class, but it would be consistent to do so). >> >> Got errors in Player when I tried to rotate the camera. All the getters should use the "getValueFromCostume:" idiom. Similarly, the setters should use "setCostumeSlot:toValue:". > I get problems with the plugin when I rotate player. If I turn the > plugin of it cant be turned on again. > The image crashed when I manually tried to get a frame from the plugin. > > Karl >> The viewer category should simply be named "camera", not "camera settings". >> >> Not sure about the "last frame" tile. Do we need that? If so we should find a nicer name. In any case the help balloon should not mention "morph". In Etoys we generally do not distinguish between the player and its costume. (idea: maybe a copy of the camera should just return a sketch) >> >> And we should make a test release for others to try this, soonish. >> >> - Bert - >> >> >> _______________________________________________ >> etoys-dev mailing list >> [hidden email] >> http://lists.squeakland.org/mailman/listinfo/etoys-dev >> > _______________________________________________ > etoys-dev mailing list > [hidden email] > http://lists.squeakland.org/mailman/listinfo/etoys-dev _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
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 :-( Karl On Mon, Oct 17, 2011 at 12:16 AM, Derek O'Connell <[hidden email]> wrote: > Karl, atm I'm working on the original webcam morph in a 4.2 image. After > doing changes to accommodate the TransformationMorph I then discover that > the ImageMorph's "isOpaque" defaults to false. Setting to true gets me good > snapshots (and in my case also remembering to set table layout on my holder > lets me see the actual results, doh). I don't know if any of this is related > to your problems but I'll get all this reloaded into a recent etoys image in > the next few days and see how it compares to what you have. > > -D > > > On 15/10/11 02:00, karl ramberg wrote: >> >> On Fri, Oct 14, 2011 at 2:53 PM, Bert Freudenberg<[hidden email]> >> wrote: >>> >>> On 13.10.2011, at 20:47, [hidden email] wrote: >>> >>>> Karl Ramberg uploaded a new version of MorphicExtras to project Etoys: >>>> http://source.squeak.org/etoys/MorphicExtras-kfr.41.mcz >>>> >>>> ==================== Summary ==================== >>>> >>>> Name: MorphicExtras-kfr.41 >>>> Author: kfr >>>> Time: 13 October 2011, 10:47:37 pm >>>> UUID: 999c47e0-2257-0249-8f43-87899271a4d4 >>>> Ancestors: MorphicExtras-kfr.40 >>>> >>>> Some more fixing. >>>> I'll say this is pretty much good to gow now. >>>> Famous last words... >>> >>> I just committed the Mac CameraPlugin, and tried your code. Worked on >>> first try, great! >>> >>> Things I noticed: >>> >>> The camera stays on when I leave the project. It should turn off - we're >>> not spying on users ;) >>> >>> After loading a project with a "running" camera, it does not restart >>> automatically. >>> >>> For both of these I think we should use the intoWorld/outOfWorld >>> mechanism. See VideoMorph. >>> >>> When I duplicate the camera I get two cameras. When I delete the one >>> camera, the other one stops, too. However, the tile still says it's "on". >>> >>> We should hide the old camera from the object catalog. Maybe just remove >>> it from the "multimedia" page and still leave it in the alphabetical list. >>> And rename the new one to Camera (we don't really have to rename the class, >>> but it would be consistent to do so). >>> >>> Got errors in Player when I tried to rotate the camera. All the getters >>> should use the "getValueFromCostume:" idiom. Similarly, the setters should >>> use "setCostumeSlot:toValue:". >> >> I get problems with the plugin when I rotate player. If I turn the >> plugin of it cant be turned on again. >> The image crashed when I manually tried to get a frame from the plugin. >> >> Karl >>> >>> The viewer category should simply be named "camera", not "camera >>> settings". >>> >>> Not sure about the "last frame" tile. Do we need that? If so we should >>> find a nicer name. In any case the help balloon should not mention "morph". >>> In Etoys we generally do not distinguish between the player and its costume. >>> (idea: maybe a copy of the camera should just return a sketch) >>> >>> And we should make a test release for others to try this, soonish. >>> >>> - Bert - >>> >>> >>> _______________________________________________ >>> etoys-dev mailing list >>> [hidden email] >>> http://lists.squeakland.org/mailman/listinfo/etoys-dev >>> >> _______________________________________________ >> etoys-dev mailing list >> [hidden email] >> http://lists.squeakland.org/mailman/listinfo/etoys-dev > > _______________________________________________ > etoys-dev mailing list > [hidden email] > http://lists.squeakland.org/mailman/listinfo/etoys-dev > etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
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 _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev webcam-fixes.1.cs (6K) Download Attachment |
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 <[hidden email]> 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 > > etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
I loaded the code here: 'http://www.squeaksource.com/WebCamMorph'
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 <[hidden email]> 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 <[hidden email]> 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 >> >> > etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
On Mon, Oct 17, 2011 at 8:13 PM, karl ramberg <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 >>> >>> >> > etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
It seems problems go away with more delay when starting the camera.
Karl On Mon, Oct 17, 2011 at 8:14 PM, karl ramberg <[hidden email]> wrote: > On Mon, Oct 17, 2011 at 8:13 PM, karl ramberg <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 >>>> >>>> >>> >> > etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
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 <[hidden email]> > wrote: > > On Mon, Oct 17, 2011 at 8:13 PM, karl ramberg > > <[hidden email]> 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 > >> <[hidden email]> 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 > >>> <[hidden email]> 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 > >>>> > >>>> > >>> > >> > > _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
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. Karl On Tue, Oct 18, 2011 at 12:22 AM, Derek O'Connell <[hidden email]> 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 <[hidden email]> >> wrote: >> > On Mon, Oct 17, 2011 at 8:13 PM, karl ramberg >> > <[hidden email]> 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 >> >> <[hidden email]> 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 >> >>> <[hidden email]> 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 >> >>>> >> >>>> >> >>> >> >> >> > > > > etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
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 > <[hidden email]> 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) > > > > > > > > (2) http://info.scratch.mit.edu/Linux_installer/Linux_Camera_Plug-in > > > > > >> > >> Karl > >> > >> On Mon, Oct 17, 2011 at 8:14 PM, karl ramberg > >> <[hidden email]> wrote: > >>> On Mon, Oct 17, 2011 at 8:13 PM, karl ramberg > >>> <[hidden email]> 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 > >>>> <[hidden email]> 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 > >>>>> <[hidden email]> 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 > >>>>>> > >>>>>> > >>>>> > >>>> > >>> > > > > > > _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
On 18.10.2011, at 00:57, Derek O'Connell wrote:
> 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). Why would it fail with a different camera? It might fail if there is no camera, but the code should take that into account. When I save a project with a "running" camera and load it on another machine that has a camera too, it should run again. If there is no camera then it can't, of course. If there are multiple cameras, it would hopefully pick a default. - Bert - _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
On Tue, Oct 18, 2011 at 10:47 AM, Bert Freudenberg <[hidden email]> wrote:
> On 18.10.2011, at 00:57, Derek O'Connell wrote: > >> 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). > > Why would it fail with a different camera? > > It might fail if there is no camera, but the code should take that into account. When I save a project with a "running" camera and load it on another machine that has a camera too, it should run again. If there is no camera then it can't, of course. If there are multiple cameras, it would hopefully pick a default. Is there any way to avoid intoWorld: and outOfWorld: getting called when flexing ? Karl _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
On 18.10.2011, at 11:09, karl ramberg wrote:
> Is there any way to avoid intoWorld: and outOfWorld: getting called > when flexing ? It should only be called if it actually gets into a new world. Otherwise it's a bug. - Bert - _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
In reply to this post by Bert Freudenberg
On 18/10/11 09:47, Bert Freudenberg wrote:
> On 18.10.2011, at 00:57, Derek O'Connell wrote: > > > 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). > > Why would it fail with a different camera? > > It might fail if there is no camera, but the code should take that > into account. When I save a project with a "running" camera and load > it on another machine that has a camera too, it should run again. If > there is no camera then it can't, of course. If there are multiple > cameras, it would hopefully pick a default. change. In my version the extents are chosen from pre-sets which should be common to most webcams and scaled for the morph itself (from which snapshots are taken). I'm attaching some quick edits to restart any cam/s that were on prior to shut-down. Not much time atm so only tested on one machine. PS: needs do-it: WebCamMorph initialize -D > > - Bert - > > _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev webcam-restart.2.cs (3K) Download Attachment |
In reply to this post by Bert Freudenberg
On Tue, Oct 18, 2011 at 11:56 AM, Bert Freudenberg <[hidden email]> wrote:
> On 18.10.2011, at 11:09, karl ramberg wrote: > >> Is there any way to avoid intoWorld: and outOfWorld: getting called >> when flexing ? > > > It should only be called if it actually gets into a new world. Otherwise it's a bug. > > - Bert - > > I think its because the WebCamMorph loses it's owner during the process, so world becomes nil. I'll look into it. Karl _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
Free forum by Nabble | Edit this page |