[MPlayer-dev-eng] [PATCH] VFCTRL_PAUSE_UPDATE

Jason Tackaberry tack at sault.org
Thu Sep 15 19:49:35 CEST 2005


Hi Reimar,

On Thu, 2005-09-15 at 18:56 +0200, Reimar Döffinger wrote:
> Actually I'd like to suggest the attached patch instead. I didn't test
> it though and vf_overlay must be changed a bit to work with it, but

I updated vf_overlay to work with your changes and everything seems
good.  Your approach is much better, because it moves flip_page() out of
the filter and into mplayer.c, which is where it ought to be, otherwise
with more than one filter handling the VFCTRL you'd see a flicker as
each filter flipped the page.

There is a problem with double buffering, though.  If you flip_page()
while mplayer is in the sleep code and double buffering is used, there
will be a most unpleasant flicker.  I don't know enough about mplayer's
architecture to see how to fix this bug.

In the vf_overlay docs I've just stated that if double buffering is
enabled, then the update rate of the overlay is tied to the video
framerate.  In the code, it checks if vo_doublebuffering is true, and if
it is, it won't flip the page unless the video is paused.  So this logic
should probably be in periodic_update() since this is a limitation that
would be faced by all filters.

I was first going to suggest that if -1 is passed for time_avail, it
indicates the video is paused, but it does look as if time_avail could
legitimately be negative.  So perhaps add another parameter is_paused.
And instead of:

+  if (res == CONTROL_OK && vo_config_count)
+    vo->flip_page();

this:

   if (res == CONTROL_OK && vo_control_count && (is_paused || !vo_doublebuffering))
     vo->flip_page();

Cheers,
Jason.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 229 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20050915/aac10344/attachment.pgp>


More information about the MPlayer-dev-eng mailing list