summaryrefslogtreecommitdiffstats
path: root/options
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-08-12 23:02:08 +0200
committerwm4 <wm4@nowhere>2014-08-12 23:24:08 +0200
commitdf58e822377af0a3802bba862de80eafaea732cb (patch)
tree05a5bfc611612c4397bdaec4c9127c537498bcec /options
parenta1be3cf147e18a49c88c613d65478ede9676a744 (diff)
downloadmpv-df58e822377af0a3802bba862de80eafaea732cb.tar.bz2
mpv-df58e822377af0a3802bba862de80eafaea732cb.tar.xz
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.
Diffstat (limited to 'options')
-rw-r--r--options/options.c2
-rw-r--r--options/options.h1
2 files changed, 0 insertions, 3 deletions
diff --git a/options/options.c b/options/options.c
index b5578218d3..f8a18f891a 100644
--- a/options/options.c
+++ b/options/options.c
@@ -494,8 +494,6 @@ const m_option_t mp_opts[] = {
OPT_CHOICE_OR_INT("autosync", autosync, 0, 0, 10000,
({"no", -1})),
- OPT_FLAG("softsleep", softsleep, 0),
-
OPT_CHOICE("term-osd", term_osd, 0,
({"force", 1},
{"auto", 2},
diff --git a/options/options.h b/options/options.h
index 20b35d6864..92e3ca0637 100644
--- a/options/options.h
+++ b/options/options.h
@@ -136,7 +136,6 @@ typedef struct MPOpts {
float audio_delay;
float default_max_pts_correction;
int autosync;
- int softsleep;
int frame_dropping;
int term_osd;
int term_osd_bar;