[MPlayer-dev-eng] [PATCH] Fix unpause with key_down_event command

Adrian Stutz adrian at sttz.ch
Thu Mar 5 22:25:44 CET 2009


ping.

It's been almost two months. Any news on this patch?

Greetings
Adrian

On Tue, Jan 6, 2009 at 10:57 PM, Adrian Stutz <adrian at sttz.ch> wrote:

> Currently, it's not possible to unpause MPlayer with the key_down_event
> command (with a key code mapped to the pause command, of course).
>
> Steps to reproduce:
> mplayer -quiet -slave movie.avi
> key_down_event 32
> # MPlayer pauses
> key_down_event 32
> # MPlayer plays a frame and then pauses again
> pause
> # MPlayer unpauses correctly
>
> Here's what happens:
> * The key_down_event command will exit the pause loop without being
> processed
> * The main loop processed the key_down_event and resolves it to the pause
> command
> * The pause command gets processed and re-pauses playback
>
> The attached patch takes advantage of the new run_command in the pause_loop
> and lets it process the key_down_event command.
>
> The only thing the key_down_command does is re-injecting the key into the
> input anyway, so there should be no problems as far as I can tell. This way,
> the key_down_event gets processed as a regular key event, exits the pause
> loop with CMD_PAUSE and is handled correctly. As added benefit,
> key_down_event will no longer exit the pause loop if there's no binding for
> the key code.
>
> (Interestingly, MPlayer OSX is using key_down_event and many users use the
> space bar to pause/unpause movies. That only works because the short time
> MPlayer returns to playback triggers other commands that then exit the pause
> loop.)
>
> Greetings
> Adrian
>



More information about the MPlayer-dev-eng mailing list