Hello, I'm trying to add a popup/progressbox in the audio player (using mplayer) when doing the server connection/cache filling but all I get is a lock in the main thread. The popup also does no hide away when I call the hide()/destroy() method of the popup.
Attached is my diff against audio/player.py and audio/plugins/mplayer.py Maybe someone has a clue with this behavior. Thanks.
Index: src/audio/plugins/mplayer.py =================================================================== --- src/audio/plugins/mplayer.py (revisión: 10851) +++ src/audio/plugins/mplayer.py (copia de trabajo) @@ -40,7 +40,9 @@ from event import * +from gui import PopupBox + class PluginInterface(plugin.Plugin): """ Mplayer plugin for the audio player. Use mplayer to play all audio @@ -333,6 +335,19 @@ self.item.info[ keywords[1] ] = line[titleStart:] break + if self.item.network_play: + if line.startswith("Cache fill:"): + if self.player.playerGUI.pbox: + pass + else: + self.player.playerGUI.pbox = PopupBox(text=_('Filling cache...')) + self.player.playerGUI.pbox.show() + elif line.startswith("Starting playback"): + _debug_("Starting") + if self.player.playerGUI.pbox: + self.player.playerGUI.pbox.hide() + + def stderr_cb(self, line): if line.startswith('Failed to open') and \ (not self.item or not self.item.elapsed): Index: src/audio/player.py =================================================================== --- src/audio/player.py (revisión: 10851) +++ src/audio/player.py (copia de trabajo) @@ -50,8 +50,8 @@ self.item = item self.player = None self.running = False + self.pbox = None - def play(self, player=None): global _player_ if _player_ and _player_.player and _player_.player.is_playing():
signature.asc
Description: Digital signature
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________ Freevo-devel mailing list Freevo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-devel