[MPlayer-dev-eng] Better handling of low FPS and still images
Uoti Urpala
uoti.urpala at pp1.inet.fi
Wed Aug 22 15:40:52 CEST 2007
I've done some work to allow handling events independently of frame
updates, which should make possible better low-FPS and still image
handling.
The original input code on Unix had 3 separate select() calls in
different places, meaning that while it was listening on one set of file
descriptors events in the others would go unnoticed until later. Also X
input wasn't part of any of them and was only polled occasionally. I
combined those into a single select() and added the X fd to the listen
set to create a function that can be used to sleep while still
responding immediately to events. Currently only xv has code to add the
X fd, but doing that from other X11 VOs is trivial.
Attached patches 1-8 improve the input system as described above. They
don't change visible behavior much as MPlayer will still use plain
sleep() for timing. I'll commit those once they've had some testing
(mainly that they don't completely break on Windows which I can't easily
test myself).
Patch 9 is test code that's not meant to be committed as is. It makes
MPlayer sleep in the input select() and run commands immediately, and
allows updating the visible OSD contents without waiting for a new
frame. The OSD update is currently only implemented for xv with YV12
colorspace and works by drawing an ugly black box over the previous
contents. Try running patched MPlayer with "-nosound -speed 0.01
-correct-pts" and compare responsiveness of seeking and other commands
with an unpatched one. -correct-pts is useful here because without it
decoder lag causes empty frames which are very visible at low FPS.
all.patch.bz2 contains all the changes 1-9 in a single patch to make
applying them easier.
I'm considering removing the forced unpause when running any keyboard or
slave commands. Is there any good reason to keep it? Slave mode
functionality changes can affect frontends though so it might be good to
give their authors some advance warning before significant behavior
changes. Do frontend authors read this list?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Use-bitfield-instead-of-manual-bit-fiddling-in-input.patch
Type: text/x-patch
Size: 5894 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070822/e700f7cf/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Remove-unused-function.patch
Type: text/x-patch
Size: 1439 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070822/e700f7cf/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Make-terminal-input-work-more-like-VO-key-input.patch
Type: text/x-patch
Size: 4894 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070822/e700f7cf/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Clean-up-getch2-code-somewhat.patch
Type: text/x-patch
Size: 7557 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070822/e700f7cf/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-Use-a-single-select-for-both-key-and-slave-input.patch
Type: text/x-patch
Size: 10551 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070822/e700f7cf/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-Add-separate-event-input-type-for-terminal-vo.patch
Type: text/x-patch
Size: 2823 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070822/e700f7cf/attachment-0005.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-Watch-X11-fd-in-main-input-select-if-using-vo-xv.patch
Type: text/x-patch
Size: 994 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070822/e700f7cf/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008-Handle-queued-commands-from-input-event-functions-im.patch
Type: text/x-patch
Size: 1066 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070822/e700f7cf/attachment-0007.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0009-some-test-code.patch
Type: text/x-vhdl
Size: 10838 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070822/e700f7cf/attachment-0008.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: all.patch.bz2
Type: application/x-bzip
Size: 9375 bytes
Desc:
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070822/e700f7cf/attachment-0009.bin>
More information about the MPlayer-dev-eng
mailing list