[MPlayer-dev-eng] Patch for better pause support.

Robert Cummings robert at interjinn.com
Sat Aug 2 06:34:46 CEST 2008


Hi,

I'm working on a wrapper for mplayer that probes using get_time_pos.
Unfortunately (or fortunately depending on how you view my patch :), the
pausing_keep feature of the command system still caused the media to
advance a frame when probing. Since this kind of sucked I downloaded the
source from SVN and took a look through and developed a patch. This
patch adds a new variable to the command map structure: stay_pause_loop.
When set the command will be handled from within the pause loop and
depending on various status information from execution of the command
(which should keep everything backward compatible), will either remain
in the pause loop or exit back to the caller. In addition to better
pause support by adding this flag to the get_time_pos command, I also
added support for the command "is_paused" that takes advantage of this
new flag. It could easily be added to many other commands I'm sure, but
thought I'd be conservative and let you decide which commands to enable
it on. I set the stay_pause_loop as the 3rd element in the struct so
that the value could easily be seen when viewing the map definition,
otherwise it would be lost in a sea of argument definitions. This
required that every element in the command map change to facilitate this
new value as you will see in the patch. I've tried to keep with the
existing coding style (although the code is a mess :).

Let me know if you have any comments.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP
-------------- next part --------------
A non-text attachment was scrubbed...
Name: better_pause_support.patch
Type: text/x-patch
Size: 24274 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20080802/b59d33e0/attachment.bin>


More information about the MPlayer-dev-eng mailing list