baudm / mplayer.py

Lightweight Python wrapper for MPlayer
http://pypi.python.org/pypi/mplayer.py
GNU Lesser General Public License v3.0
117 stars 32 forks source link

Ability to to see if player is finished playing current file. #16

Closed baudm closed 9 years ago

baudm commented 9 years ago

Original issue 13 created by baudm on 2013-04-01T22:35:20.000Z:

I'd like to be able to see on the Player class if the player is done playing current file or list.

Actually, even better would be if there was a callback that fires when the player is done playing. That would save me the trouble of checking periodically if the player is done.

baudm commented 9 years ago

Comment #1 originally posted by baudm on 2013-04-02T05:31:27.000Z:

Hi, you can already do that with the current version:

  1. Make MPlayer more verbose (add '-msglevel global=6' to args)
  2. Connect a handler (callback) to Player.stdout which checks for 'EOF code:' string

For more info, see gtk2.py or qt4.py. Or better yet, use QPlayerView (for Qt) or GtkPlayerView (for GTK).