[MPlayer-users] Re: New Mplayer Release???

D Richard Felker III dalias at aerifal.cx
Fri Jul 11 03:06:09 CEST 2003


On Thu, Jul 10, 2003 at 09:55:47PM +0200, Martin Grim  wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> Hi,
> 
> > > c) of the -slave option together with a test program (the test program
> > >    structure?) (test_program | mplayer -slave somefile.mpg).
> 
> > Such progam just need to print command on it's stdout.
> 
> I've tried this. My test_program wrote "pause" to stdout every 5 seconds. Thus, 
> I expected mplayer to play first 5 seconds of "somefile.mpg", then to halt for 
> 5 seconds, then to play 5 seconds of "somefile.mpg" again. 
> 
> Unfortunately, this was not what happened: mplayer kept playing and paused only 
> once (after 23 seconds).
> 
> I retried this with "seek 10 type=2" and then "seek 30 type=2". Thus, first 
> (after initial wait to let mplayer start and cashe the mpg) jump to the 
> position of 10 seconds. Again, after a little wait, jump to position af 30 
> seconds.
> 
> This test failed as well. I've checked the documentation and the bug reports, 
> but I could not find any hints. I'm quite sure of my test_program (tested this 
> with another proggy which took data from stdin and wrote this to a file: all 
> was well). So, where is the error? Do I expect something of MPEG2 files which 
> it cannot or is something wrong with mplayer?

You're probably ignoring buffering in your test program. You either
need to do low level io (with write() rather than stdio.h functions)
or else disable buffering on stdout or fflush stdout after each write.

Rich



More information about the MPlayer-users mailing list