Hi,
I want play a movie, so that after end this movie, it must close it self. So I do that: |movie| movie_MPEGPlayer playFile:'simul1.mpg'. movie playStreamWaitTilDone:0 . movie stopAndClose.
All work fine but after the movie finished to play, his screen stay in squeak und don't want to close. I want that after playing, this screen must closing and nothing is showed.(no movie screen!). Have someone an idea. (Try please the code und you will understand what I mean- I hope- my englisch is :-( )
Thanks. Radouane
Nice to see someone working with this. I'll note from a history perspective.
MPEGFIle is the api interface to the LibMPEG3.
MPEGPlayer is a proof of concept interface I wrote to enable the playback of sound or audio when I was testing the api. Originally it used the text to sound playback logic to play sound buffers since that was the only existing class that let you play a ring buffer structure. but I believe John Maloney wrote the StreamingMP3Sound class to provide a cleaner interface which then was integrated into MPEGPlayer.
Although MPEGPlayer has logic to playback video it's an experimental interface and should be reviewed for performance and delay/sync issues if you want to depend on it.
For example privatePlayVideoStream: has logic to fiddle with sound/ video delay syncing, and then figuring out which frame to render based on the wall clock.
For video playback people usually use the MPEGMoviePlayerMorphic which drives the video display logic via morphic ticking I believe the logic in it works *perhaps* better.
I'll note that sound playback has never been a problem, even slow machines have sufficient CPU power to ensure the StreamingMP3Sound has sufficient buffers of decoded sound for playback.
In Sophie we support a tweak based player we wrote that provides for player logic using MPEGFile, or quicktime based player that use a polling quicktime api, or an interrupt based api via a quicktime plugin that signals when a frame has been rended by quicktime. Of course for sound we just say play and quicktime looks after all the nasty details. I'll note in testing I've run say 450KBytes/sec of audio channels (8) in a Sophie book from the internet without any dropout.
On Mar 8, 2007, at 7:34 AM, radouane el Marjani wrote:
Hi,
I want play a movie, so that after end this movie, it must close it self. So I do that: |movie| movie_MPEGPlayer playFile:'simul1.mpg'. movie playStreamWaitTilDone:0 . movie stopAndClose.
All work fine but after the movie finished to play, his screen stay in squeak und don't want to close. I want that after playing, this screen must closing and nothing is showed.(no movie screen!). Have someone an idea. (Try please the code und you will understand what I mean- I hope- my englisch is :-( )
Thanks. Radouane
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
squeak-dev@lists.squeakfoundation.org