[MPlayer-dev-eng] [PATCH] support run command with specific osd_level

Ulion ulion2002 at gmail.com
Fri Feb 1 04:05:27 CET 2008


2008/2/1, Uoti Urpala <uoti.urpala at pp1.inet.fi>:
> On Fri, 2008-02-01 at 00:26 +0800, Ulion wrote:
> > In some frontend, such as MPlayer OSX, when adjust volume, seek in
> > window mode, it did not want any osd msg or progress bar get
> > displayed, or when it batch run some commands to apply some
> > preference, it also not want the osd. Current implement of it use 'osd
> > 0' prefix the command(s) and 'osd 1' after it(them), this will break
> > the original osd level. Indeed it only want to run some command(s)
> > without osd, so I write those patches for fixing these code after days
> > ago Diego reported the osd_level loss problem.
>
> That only requires disabling OSD messages. Is there any use for the
> parts of the patch that allow forcing display of percent position for
> seeks?

yes, only 'osd_level 0' prefix is used for this case, but as an common
feature, 'osd_level N' could be implemented together to support a full
feature -- set osd_level for certain command.
Indeed the osd_level is not set for the moment the command running, it
should affect all osd msgs generated when the command is running, the
msgs should just be discarded for 'osd_level 0' prefix and be enabled
for a higher enough 'osd_level N' (N>=1) prefix. the state affected by
osd_level prefix should keep until the osd msgs out of the duration (5
seconds for normal osd msgs). As the seek, it's a special case, since
the osd msgs and bar generated by a seek operation is not pushed into
osd stack during the command running, the seek operation is some delay
operation -- set seek parameters when the command running, and
implement real seek some whereelse in the mplayer's loop. But the osd
msgs and osd bar generated by the seek command (also other commands
cause a seek operation) should follow the osd_level prefix set in the
command string, because they are 'generated' by the command. If
frontend does not want the seek command triger any osd msgs or osd
bar, it will use 'osd_level 0' prefix for the seek command, only after
we handle the delayed seek with the desired osd_level, the frontend
get what it wants, else the osd bar and msgs would still dispear on
the play window. The osd_show_percentage INDEED is 'the osd msgs
generated by a seek operation', so it should also follow the osd_level
prefix if set, that means do not show the percentage when the
'osd_level 0' prefix is used for the seek command, and always show the
percentage (for 1 second) when 'osd_level N' (N>=2) prefix is set even
before and after the seek command the osd_level is disabled.

Try run some 'osd_level N' prefix command on mplayer with different
osd_level preset, you will known what I mean and what's the desired
behavior.

-- 
Ulion



More information about the MPlayer-dev-eng mailing list