[MPlayer-users] current position

Vinay Reddy vinayvinay at gmail.com
Fri Aug 12 19:34:25 CEST 2005

> There is code in the Kaa project
> (http://freevo.sourceforge.net/cgi-bin/freevo-2.0/Kaa) that may be
> useful to you.  I just recently added kaa-mplayer module and it's not
> near feature complete, but it will give you an idea of how to do this.
> The code is tightly coupled to the Kaa framework, but all the basic
> logic will be the same.

I tried going through the code, but got lost (I am writing my first
python program). Currently I am doing the following:
I set mplayerOut to non-blocking I/O and am calling a statusQuery
function every 1 second using gobject.timeout_add.
In my statusQuery function, to get the last status line, I do the following:

status = None
     try: # get the last line of output
          for status in self.mplayerOut:
              if not status: break
     except StandardError:

I am not getting any status lines (the "A:" lines). I only get the
lines which mplayer dumps at the start and replies to commands that I
give. I printed all the lines that I read from mplayerOut. I didn't
see any status line :-(
Does it have anything to do with the \r that mplayer uses for printing
status lines?

This seems to be becoming a python question...


More information about the MPlayer-users mailing list