[MPlayer-dev-eng] [PATCH] Patch for better pause support.
Robert Cummings
robert at interjinn.com
Thu Sep 4 18:45:58 CEST 2008
On Thu, 2008-09-04 at 11:51 -0400, Robert Cummings wrote:
> On Thu, 2008-09-04 at 09:57 +0200, Reimar Döffinger wrote:
> > On Wed, Sep 03, 2008 at 11:19:10PM -0400, Robert Cummings wrote:
> > > Specifically it doesn't set the pause status before entry
> > > into run_command().
> >
> > What is the purpose of setting that (except your is_paused command)?
> > The reason I dislike it is because the variable is called "was_paused",
> > which implies it actually is no longer paused when it is set.
> > It may work well like that for now, but it seems like the kind of thing
> > that is guaranteed to be misunderstood and broken someonewhen in the
> > future.
> > And thanks for testing.
>
> The was_paused variable as you said is necessary for the is_paused
> command, but additionally the run_command() function uses it at the end
> when handling cmd->pausing status. Specifically pausing_toggle and
> pausing_keep. Perhaps it could be changed to is_paused to better reflect
> it's purpose (is that considered cosmetic?). Either way, I think being
> able to probe the current pause status of mplayer is a valuable asset
> for wrapper scripts.
I took a look through the code some more. The is_paused command can use
mpctx->osd_function == OSD_PAUSE instead to get it's pause status (patch
attached). This would mean setting mpctx->was_paused can be skipped
within the pause_loop. That said, I still think for consistency that
mpctx->was_paused should be changed to mpctx->is_paused and this should
still be set within the pause_loop (patch attached - merge with
pausing_keep_force patch).
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP
-------------- next part --------------
A non-text attachment was scrubbed...
Name: is_paused.2.patch
Type: text/x-patch
Size: 1450 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20080904/71fd0e16/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pkf.new.2.diff
Type: text/x-patch
Size: 3112 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20080904/71fd0e16/attachment-0001.bin>
More information about the MPlayer-dev-eng
mailing list