2009/9/11 Jason Tackaberry <t...@urandom.ca>: > On Fri, 2009-09-11 at 11:42 +0800, peng tian wrote: >> Calling player.pause() before player.play() causes the play inprogress >> won't finish and the playback won't start, >> and the mplayer process won't start either. > > Can you try this with popcorn2? (It's in WIP/popcorn2) > > It's not complete yet, but the architecture should be much cleaner. > > In particular, in your example, the line where you have commented "this > line causes the problem" should, with popcorn2, raise an exception > because the player is not in the appropriate state for pause() > (STATE_PLAYING). Also, player.resume() should raise because the player > is not in STATE_PAUSED. > > The original kaa.popcorn tried to be clever in handling these various > scenarios (calling methods not appropriate for the given state), but, as > you can see, was not clever enough. > > kaa.popcorn2 does what I think is much more sensible and raises when the > state doesn't make sense.
Ahh, if you raise exception I agree. if the callee requires an appropriate state let the caller know. In original kaa.popcorn it appears safe to call those methods in a wrong state. > A proper UI would have the pause button disabled when the player isn't > in the appropriate states anyway, don't you think? In most cases it's true. but sometimes the pause operation is not caused by pressing the 'pause' button, for example in freevo i play a video while the music is in background. I know in this case the caller must handle more details to avoid getting an exception raised. > Thanks for your feedback. If you have any more, especially about > popcorn2, please let me know. I didn't know popcorn2 before. I will try to use it and look into it, and if possible make some suggestions. ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Freevo-devel mailing list Freevo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-devel