[MPlayer-dev-eng] [PATCH] OSD menu #if 0 define remove and pause key bug fix

Ulion ulion2002 at gmail.com
Mon Nov 12 16:55:54 CET 2007


2007/11/11, Ulion <ulion2002 at gmail.com>:
> 2007/11/11, Alban Bedel <albeu at free.fr>:
> > No, I mean using the normal binding while paused but outside of the menu
> > and still having the OSD beeing drawn correctly. I know that more
> > changes are needed, but for a correctly working OSD the first step is
> > having the last video frame captured as the pause filter is doing.
>
> I still not got exactly what you mean. You said 'OSD' standalone with
> the word 'menu', did you mean osd, or osd menu? And you said 'outside
> of the menu', did it mean bindings outside of hardcoded in libmenu or
> it mean when menu is not showing.
> At least I got the meaning that capture the last frame as pause frame,
> then I will have a look to the current code to see whether we can do
> better for it. Indeed I can see by my eyes that the pause filter
> currently not correctly capture the last frame before pause, it
> normally captures a frame before the last frame.
>
> >
> > > 2. In the pause filter there's a delay hack, why it's there? Without
> > > the delay, seems everything works fine. It is imported at the
> > > beginning of svn log, so may you explain why it's there and whether we
> > > can remove it now safely? I don't like the delay, specially when osd
> > > menu is not showing, it's not necessary, isn't it?
> >
> > iirc (that was really a long time ago) I had some extra code in main()
> > to allow seeking when paused. It would go out of pause, seek and pause
> > again. In such case sometimes it ended up showing the wrong frame
> > (one from the old position), so I added this delay hack to ensure it
> > showed one of the new ones. So yes, it can be removed. Or go2pause
> > could be changed to get something like this:
> >
> > go2pause > 2  : skip the frame, go2pause--
> > go2pause == 2 : capture the frame and resend a pause cmd, go2pause = 1
> > go2pause == 1 : let the resent pause go through, go2pause = 0
> >
> > That would still allow the cmd filter to choose to skip some extra
> > frame if needed while getting us rid of this hack.
> >
>
> I check the pause filter code, found it will have problem when filter
> the PAUSE cmd while there's cmds in the queue. Current vf_menu queue a
> pause cmd to the cmd queue, it's not clean. And also now cmd has a
> pausing property, which are not handled by pause filter by now.
> Anyway, I will try to dig it deeper to find some clean way for the
> purpose -- copy the last frame before pause.
>

Here's my new patch for pause filter, the pause filter is removed by
implement the purpose in a clean way, no cmd queue hack to capture the
last frame before pause. If it didn't capture the frame because some
reason such as too slow frame rate or other reason, just use the frame
captured last time, that's not a big deal with a wrong frame. By now I
don't see such situation, it works even better than the original pause
filter, since it captured the 'last frame' correctly normally. And
finally, we get rid of the cmd queue hack to eat a pause cmd and
requeue one, that break things.

This patch works fine for me, if no objects, I will commit it after a
week, please try it if possible.

Alban, if you have any suggest or object, please let me know. And, any
response to the property version of select sub by source
patch: http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2007-November/054683.html
?


-- 
Ulion
-------------- next part --------------
A non-text attachment was scrubbed...
Name: osdmenu_pause_filter_fix.diff
Type: text/x-diff
Size: 3336 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20071112/32c1d81f/attachment.diff>


More information about the MPlayer-dev-eng mailing list