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

Ulion ulion2002 at gmail.com
Sat Feb 2 05:11:21 CET 2008


2008/2/2, Uoti Urpala <uoti.urpala at pp1.inet.fi>:
> On Sat, 2008-02-02 at 10:01 +0800, Ulion wrote:
> > > Note that it is untested (only much too slow remote X to my devel
> > > machine here), but I was thinking like in attached patch.
> >
> > Still missing the part of code I replied earlier to your previous patch.
> > You'd better test them with different osd_level, I mean before run
> > commands, osd could be disabled, or max verbose, or just enabled at
> > level 1. Then run 'osd_level N' commands, too see whether you got
> > expected output osd msgs:
> > For 'osd_level 0' prefix, nomatter how you change osd level by key
> > 'o', there should not display any osd msgs related to your command,
> > else it's not expected behavior.
>
> osd_level does not mean that in Reimar's patch. Instead of specifying
> the level to compare against it specifies the level to use for all
> messages generated by the command. To avoid displaying messages under
> that system you'd specify a HIGH osd_level. (The documentation part of
> the patch still says max 3 - I think it would make sense to allow higher
> values which would not be displayed if the user currently has OSD
> visibility level 3).

Oh, now I got it. Although it makes sense, but it missed these compare
with my patch:
1. For the frontend users the usage of the prefix command is tricky,
they have to known 'the internal usage of osd msg's level', and use
the prefix set it, that level is different with normal osd level we
referred.
2. All osd msgs and osd bar have same internal level in Reimar's
patch, while in my patch, they just keeping use their preset internal
level, and when a 'osd_level N' prefix (N>=1) is used with a command,
which osd msg get displayed, which not displayed, will be decided by N
and the msg's preset internal level, so some msg could be displayed,
some could not because it's internal level is larger than N. My patch
supply more accurate control on this point.
3. Reimar's patch still has some bugs:
  a. not only seek command will trigger the 'seek action' and osd
msgs/bar in mplayer.c, but the patch only works for seek command. that
means when use osd_level prefix with other commands causing a 'seek
action', the osd msgs/bar are not displayed as expected osd level.
Check what my patch does in command.c to see how I fix this problem.
  b. osd_function variable is related with the left top corner's OSD
symbol, when we reject the osd bar request generated by the 'seek
action', the osd_function will never get reset to PLAY status, also
the osd symbol. Check my patch code after the 'seek action' in
mplayer.c to see how I fix this.


-- 
Ulion



More information about the MPlayer-dev-eng mailing list