[MPlayer-users] Use of -slave option in latest CVS

Tom Bednarchuk tom.bednarchuk at sympatico.ca
Sat Feb 23 23:29:01 CET 2002


Hi Alban,
> Hi Tom Bednarchuk,
>
> on Sat, 23 Feb 2002 00:18:19 -0500 you wrote:
>
> > [Automatic answer: RTFM (read DOCS, FAQ), also read
DOCS/bugreports.html]
> > Hi again Alban:
> >
> > I tried the following PERL with MPlayer and only the quit command
worked.
> > Can you take a look?
> >
> > #!/usr/bin/perl -w
> > print "Hello there !"
> >
> > open(MPPIPE, "|mplayer -slave -vo x11 /mnt/cdrom/bootyl~2.mpg");
> > sleep 40;
> > print MPPIPE "stop\n";
> > sleep 10;
> > print MPPIPE "play\n";
> > sleep 40;
> > print MPPIPE "quit\n";
> >
> > The video plays for the 90 or so seconds taken up by the sleep() total
but
> > the stop doesn't seem to work. I put in some printf 's in mplayer.c
where
> > the command is parsed and after the video stops, the printf 's show up
on
> > the console but mpayer seems not to care.
> Neither stop or play are part of the actual command list.
> But you can try to use this in place : stop = "seek 0\npause\n" and play =
"pause\n".
> It shoud do the job, except it will not close the window.
> Albeu
I don't quite understand. In mplayer.c , (search for /* slave mode */) there
are lines to the effect

if (!strcmp("play\n", buffer)) {
    osd_function=OSD_PLAY;
}   else if (!strcmp("stop\n, buffer)) {
    osd_function=OSD_PAUSE;
} ......................

So I don't understand how "seek 0\npause\n" will work since they aren't
valid parse lines. Or have I missed something, again ?
If I put printf's in the above, they are output but only after the video
stops. "quit\n" is the only command that I can get to work, probably because
it calls exit_player() directly. I'm not quite sure how the osd_function is
supposed to work, any hints would be appreciated.

Thanks,

Tom





More information about the MPlayer-users mailing list