I made a little improvement to the logic of the gui. I now has two buttons. One to open up a file and one to play or stop. I had to make some ugly code to make this work:
videoPlayerProcess ifNil:[ video _ true] ifNotNil:[(videoPlayerProcess suspendedContext asString = 'UndefinedObject>>DoIt') ifTrue:[ video _ true] ifFalse:[ video _ false]].
Maybe someone knows a better way to signal that the process has terminated ? Because it's still referred to it hangs around but referred to as a UndefinedObject>>DoIt.
Are there some examples of the new layout system ? I love to make use of them but it's easiest to learn if I can read some code :-)
In MPEGPlayer2>>playVideo: you can find the lines "fum displayAt: self videoMorph topLeft." videoMorph changed.
I love to get some feedback on playback speed on these two different mechanisms.
Thanks to Joshua Gargus for some fixing to make this still work under the new layout rules.
I made a little improvement to the logic of the gui. I now has two buttons. One to open up a file and one to play or stop. I had to make some ugly code to make this work:
videoPlayerProcess ifNil:[ video _ true] ifNotNil:[(videoPlayerProcess suspendedContext asString = 'UndefinedObject>>DoIt') ifTrue:[ video _ true] ifFalse:[ video _ false]].
Maybe someone knows a better way to signal that the process has terminated ? Because it's still referred to it hangs around but referred to as a UndefinedObject>>DoIt.
Karl, I think in the latest code I posted I had a fix for this. What really happens after the termination of the player loop either by hitting stop or by terminating the loop by running out of data I set the videoPlayerProcess to nil.
I also had a method to see if the player was still running, see if the playerProcess instance variables aren't nil. However in theory you can have the play say it is done, but the Sound system still will be playing the last few seconds/milliseconds of the sound buffer.
squeak-dev@lists.squeakfoundation.org