1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-16 20:05:07 +00:00
mpv/options
wm4 df58e82237 video: move display and timing to a separate thread
The VO is run inside its own thread. It also does most of video timing.
The playloop hands the image data and a realtime timestamp to the VO,
and the VO does the rest.

In particular, this allows the playloop to do other things, instead of
blocking for video redraw. But if anything accesses the VO during video
timing, it will block.

This also fixes vo_sdl.c event handling; but that is only a side-effect,
since reimplementing the broken way would require more effort.

Also drop --softsleep. In theory, this option helps if the kernel's
sleeping mechanism is too inaccurate for video timing. In practice, I
haven't ever encountered a situation where it helps, and it just burns
CPU cycles. On the other hand it's probably actively harmful, because
it prevents the libavcodec decoder threads from doing real work.

Side note:

Originally, I intended that multiple frames can be queued to the VO. But
this is not done, due to problems with OSD and other certain features.
OSD in particular is simply designed in a way that it can be neither
timed nor copied, so you do have to render it into the video frame
before you can draw the next frame. (Subtitles have no such restriction.
sd_lavc was even updated to fix this.) It seems the right solution to
queuing multiple VO frames is rendering on VO-backed framebuffers, like
vo_vdpau.c does. This requires VO driver support, and is out of scope
of this commit.

As consequence, the VO has a queue size of 1. The existing video queue
is just needed to compute frame duration, and will be moved out in the
next commit.
2014-08-12 23:24:08 +02:00
..
m_config.c build: include <strings.h> for strcasecmp() 2014-07-10 08:29:32 +02:00
m_config.h options: remove a global variable 2014-06-11 00:39:14 +02:00
m_option.c options: fix key-value-list options 2014-08-05 02:24:45 +02:00
m_option.h options: support setting start time relative to start PTS 2014-06-29 20:39:49 +02:00
m_property.c command: redo the property type 2014-06-13 02:11:39 +02:00
m_property.h command: redo the property type 2014-06-13 02:11:39 +02:00
options.c video: move display and timing to a separate thread 2014-08-12 23:24:08 +02:00
options.h video: move display and timing to a separate thread 2014-08-12 23:24:08 +02:00
parse_commandline.c options: fix "-" (stdin) input 2014-05-06 01:06:07 +02:00
parse_commandline.h msg: remove global state 2013-12-21 23:11:12 +01:00
parse_configfile.c config: adjust config parser messages 2014-07-13 20:11:46 +02:00
parse_configfile.h encode: don't apply default config options 2014-04-19 22:05:17 +02:00
path.c config: use the same signature for win32/OSX specific path functions 2014-06-26 19:56:45 +02:00
path.h Basic xdg directory implementation 2014-06-26 19:37:25 +02:00