mpv/video/decode
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
..
dec_video.c dvd, bluray, cdda: add demux_disc containing all related hacks 2014-07-05 17:07:15 +02:00
dec_video.h video: don't keep multiple pointers to hwdec info struct 2014-08-11 23:09:39 +02:00
lavc.h video: warn if an emulated hwdec API is used 2014-05-28 02:08:45 +02:00
vaapi.c video: move display and timing to a separate thread 2014-08-12 23:24:08 +02:00
vd.h
vd_lavc.c video: don't keep multiple pointers to hwdec info struct 2014-08-11 23:09:39 +02:00
vda.c vda: only support the new hwaccel 1.2 API (remove old code) 2014-08-01 10:38:18 +02:00
vdpau.c video: warn if an emulated hwdec API is used 2014-05-28 02:08:45 +02:00