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

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Fri Feb 1 16:28:34 CET 2008


Hello,
On Fri, Feb 01, 2008 at 08:51:41AM +0800, Ulion wrote:
> An osd msg currently will be put into osd stack, and if it match the
> osd_level when update_osd_msgs get called, it will be choose and
> displayed. Normally an osd msg will keep in the osd stack for 5
> seconds.
> Check these lines of my patch:
> 
> +    // Force to disable osd msgs.
> +    if (mpctx->force_osd_level == 0)
> +        return;
> +    // Force to display osd msgs matching the force_osd_level.
> +    if (mpctx->force_osd_level > 0 && level <= mpctx->force_osd_level)
> +        level = 0;
> 
> This is expected behavior, but your patch missed it.

Actually, I now think that the approach is fundamentally flawed.
Why not making the specified osd_level the level of the OSD components
related to the command instead of changing the global OSD level.
At least the above code would the just become
> if (mpctx->cmd_osd_level)
>   level = mpctx->cmd_osd_level;

I remains to be seen if the other parts fit well into this model as
well.



More information about the MPlayer-dev-eng mailing list