mpv/video/out
wm4 d2bdb72b69 options: add a thread-safe way to notify option updates
So far, we had a thread-safe way to read options, but no option update
notification mechanism. Everything was funneled though the main thread's
central mp_option_change_callback() function. For example, if the
panscan options were changed, the function called vo_control() with
VOCTRL_SET_PANSCAN to manually notify the VO thread of updates. This
worked, but's pretty inconvenient. Most of these problems come from the
fact that MPlayer was written as a single-threaded program.

This commit works towards a more flexible mechanism. It adds an update
callback to m_config_cache (the thing that is already used for
thread-safe access of global options).

This alone would still be rather inconvenient, at least in context of
VOs. Add another mechanism on top of it that uses mp_dispatch_queue, and
takes care of some annoying synchronization issues. We extend
mp_dispatch_queue itself to make this easier and slightly more
efficient.

As a first application, use this to reimplement certain VO scaling and
renderer options. The update_opts() function translates these to the
"old" VOCTRLs, though.

An annoyingly subtle issue is that m_config_cache's destructor now
releases pending notifications, and must be released before the
associated dispatch queue. Otherwise, it could happen that option
updates during e.g. VO destruction queue or run stale entries, which is
not expected.

Rather untested. The singly-linked list code in dispatch.c is probably
buggy, and I bet some aspects about synchronization are not entirely
sane.
2017-08-22 15:50:33 +02:00
..
cocoa osx: code cleanups and cosmetic fixes 2017-08-18 19:47:47 +02:00
opengl options: add a thread-safe way to notify option updates 2017-08-22 15:50:33 +02:00
wayland video/out/wayland/buffer.c: Add missing free() 2017-05-26 08:52:12 +01:00
win32 droptarget: fix style and refactor 2017-03-26 00:41:16 +11:00
aspect.c aspect: change license to LGPL 2017-06-17 17:08:51 +02:00
aspect.h aspect: change license to LGPL 2017-06-17 17:08:51 +02:00
bitmap_packer.c
bitmap_packer.h
cocoa_common.h osx: change license of OSX and cocoa files to LGPL 2017-06-24 16:29:22 +02:00
cocoa_common.m osx: code cleanups and cosmetic fixes 2017-08-18 19:47:47 +02:00
d3d_shader_420p.h
d3d_shader_yuv.hlsl
dither.c
dither.h
drm_common.c vo_drm: nake drm mode help output also output refresh rate 2017-06-18 20:54:44 +02:00
drm_common.h
filter_kernels.c vo_opengl: generalize --scale-clamp etc. 2017-07-12 19:08:58 +02:00
filter_kernels.h vo_opengl: generalize --scale-clamp etc. 2017-07-12 19:08:58 +02:00
vo.c options: add a thread-safe way to notify option updates 2017-08-22 15:50:33 +02:00
vo.h options: add a thread-safe way to notify option updates 2017-08-22 15:50:33 +02:00
vo_caca.c
vo_direct3d.c vo_direct3d: remove non-working nv12 shader support 2017-06-30 18:13:01 +02:00
vo_drm.c vo_drm: fallback to vo_wait_default if VT switcher is not available 2017-06-08 15:24:10 +02:00
vo_image.c image_writer, vo_image: change license to LGPL 2017-06-18 15:45:24 +02:00
vo_lavc.c encode_lavc: move from GPL 2+ to LGPL 2.1+. 2017-06-13 14:22:15 -04:00
vo_null.c vo.c, vo.h, vo_null.c: change license to LGPL 2017-05-10 15:06:20 +02:00
vo_opengl.c vo_opengl: remove DR image layouting code to renderer 2017-08-14 19:57:44 +02:00
vo_opengl_cb.c vo_opengl: separate hwdec context and mapping, port it to use ra 2017-08-10 21:24:31 +02:00
vo_rpi.c vo_rpi: fix operation 2017-08-15 19:41:23 +02:00
vo_sdl.c video: get rid of swapped packed YUV 2017-06-30 18:01:29 +02:00
vo_tct.c vo_tct: check ioctl result 2017-02-20 14:19:57 +01:00
vo_vaapi.c
vo_vdpau.c
vo_wayland.c
vo_x11.c build: make various x11 protocol extension libs mandatory 2017-04-21 07:30:03 +02:00
vo_xv.c video: get rid of swapped packed YUV 2017-06-30 18:01:29 +02:00
w32_common.c w32_common: handle media keys 2017-08-05 02:38:44 +10:00
w32_common.h w32_common, w32_keyboard: change license to LGPL 2017-06-24 12:54:45 +02:00
wayland_common.c wayland_common: organize and correctly map mouse buttons 2017-03-17 06:25:32 +00:00
wayland_common.h
win_state.c win_state: change license to LGPL 2017-06-17 21:10:24 +02:00
win_state.h
x11_common.c x11: fix that window could be resized when using embedding 2017-08-21 15:15:55 +02:00
x11_common.h Revert "x11: use xdg-screensaver suspend/resume" 2017-08-20 09:11:07 +02:00