Re: [Mplayerplug-in-devel] mplayerplug-in leaving zombies
Brought to you by:
kdekorte
From: Forest B. <fo...@al...> - 2007-10-03 13:15:09
|
Hi Kevin, On Wed, Oct 03, 2007 at 06:14:28AM -0600, Kevin DeKorte wrote: > Forest Bond wrote: > > On Mon, Oct 01, 2007 at 09:38:38AM -0600, Kevin DeKorte wrote: > >> Forest Bond wrote: > >>> As you may remember, my application uses the mplayer plug-in to displ= ay > >>> television channels. I am conducting some testing where my code > >>> continuously changes the television channel on a delay loop. The cha= nnel is > >>> changed by calling Stop(), SetURL(), and then Play(). > >> might want to try calling "quit()" instead of stop. As that should kill > >> mplayer where Stop might try to pause the media. Also instead of > >> "SetURL" you might try "Open" or "filename =3D "tv://x" where x is your > >> channel. > >=20 > > Why are there so many different ways to do these things? >=20 > Compatibility with different plugins. And also how some of this stuff wor= ks. Ok, that makes some sense, although I suspect things could be simplified at least a little bit, maybe. > > On the other hand, I'm not entirely clear as to why the player process = is being > > killed at all. Why not keep the slave mplayer process alive for the en= tire > > duration of the plugin instance's life? That would certainly simplify = some of > > the thread/process management issues, and would also result in shorter = delay > > between play, stop, etc. >=20 > The main reason is this. When a media file is over in mplayer "-idle" > mode. Mplayer doesn't say that the file is over. It just quits sending > output. I've asked them to add this feature or even to add a property > that can be queried to see if the file is complete. But so far no good. There is such a property: ---------------------------------------------------------------------------= ----- get_property filename ANS_filename=3Dtest.mpg ---------------------------------------------------------------------------= ----- But after the file has finished playing: ---------------------------------------------------------------------------= ----- get_property filename ---------------------------------------------------------------------------= ----- > > Also, I've found that things go bad when I do this: > >=20 > > mplayer.filename =3D 'foo'; > > mplayer.Play(); > > mplayer.filename =3D 'bar'; > >=20 > > This seems to be necessary, instead: > >=20 > > mplayer.filename =3D 'foo'; > > mplayer.Play(); > > mplayer.Stop(); > > # delay here ... > > mplayer.filename =3D 'bar'; > > mplayer.Play(); > >=20 >=20 > Have you tried "quit()" instead of "Stop()"? They actually do different > things. Yes, I believe I tried it. Both require a delay that is much too long for = my application. Using the loadfile command to mplayer reduces that delay significantly (a power of ten or more, rough estimate). What do quit and Stop do differently? Thanks, Forest --=20 Forest Bond http://www.alittletooquiet.net |