[MPlayer-dev-eng] [PATCH] VFCTRL_PERIODIC_UPDATE

Jason Tackaberry tack at urandom.ca
Fri Jan 12 00:41:50 CET 2007


On Thu, 2007-01-11 at 10:07 -0500, Jason Tackaberry wrote:
> 3 is admittedly low.  So would it be more acceptable to change
> mp_input_get_cmd time to 10, and only sleep (for the current 20ms) if
> the periodic update vfctrl isn't consumed?

Actually, even this isn't good enough.  The problem is that just because
the overlay doesn't need to be updated now doesn't mean it won't need to
be updated in 10ms.  So if we sleep for 20ms we can produce choppy
motion on the overlay.

So I propose that periodic_update() can return 3 values:

        1: filter updated the frame and requests it be flipped, and do
        not sleep longer than 10ms.  Corresponds to CONTROL_TRUE.
        
        0: filter did not update the frame, so no need to flip, but may
        need to update soon, so do not sleep for longer than 10ms.
        Corresponds to CONTROL_FALSE.
        
        -1: no filter wants to consume VFCTRL_PERIODIC_UPDATE; do not
        flip and sleep as usual.  Corresponds to CONTROL_UNKNOWN (and is
        the default return value).

-1 is the default case, so the amount mplayer sleeps will not be
affected.  Therefore mplayer will not wake up more often than it already
does unless the user specifically wants it to (by adding a filter that
handles VFCTRL_PERIODIC_UPDATE).  This is the aspect I want to stress
about what I propose for this patch, because I think it is an important
consideration.

Comments?

Cheers,
Jason.




More information about the MPlayer-dev-eng mailing list