[MPlayer-dev-eng] [PATCH] Extra messages in slave mode

Andras Mohari mayday at mailpont.hu
Mon Dec 5 21:13:07 CET 2005


On Mon, Dec 05, 2005 at 09:04:56PM +0200, Oded Shimon wrote:
> I fail to see the usefulness of some of these messages, but anyway, since 
> identify has already become the pseudo slave output, wouldn't it be better 
> to make all of these with identify instead? (as there already is an 
> ID_PAUSED for ex., and ID_FILENAME)

Well, it would probably be better to have a uniform message format for
parseable output, but I did not want to use ID_ because these messages
have nothing to do with -identify. Also note that the get_* slave
commands respond by printing ANS_ lines, not ID_, but the SLAVE_
lines differ from both of them: these lines are some kind of event
indicators.  And yes, I know about ID_PAUSED, but currently it is only
printed in non-quiet mode and it requires -identify.

> Also, what's the point of SLAVE_PLAYING, it comes right after SLAVE_FILE ? 
> is the point to make sure the file started playing successfully? or to wait 
> for the lag between loading the file until it actually plays?

To wait for the lag, yes, which can be quite long, for example when you
use -idx. Being between SLAVE_FILE and SLAVE_PLAYING indicates that
MPlayer is busy doing its job to start playing the file/DVD/whatever,
and seeing SLAVE_PLAYING indicates that it actually plays. I wanted to
make a distinction between the "starting" and "playing" state. It is not
really useful sending the player commands until you see SLAVE_PLAYING.

> The fflush is useless, there's one in mp_msg already. the fflush a few 
> lines up should be removed.

OK. I've noticed that since I wrote the patch, but I saw that people had
used fflush() so I blindly added them.

> Also, I definetaly agree with reimar's suggestion for a new MSGT_ for 
> identify and slave... If I ever make that patch where you can pick 
> verbosity by MSGT, it would work very well...

If that's the way MSGT should be used, then I'll rework the patch.

-- 
Andras Mohari




More information about the MPlayer-dev-eng mailing list