mpv/video
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
..
decode video: add metadata handling for spherical video 2017-08-21 14:56:07 +02:00
filter video: add metadata handling for spherical video 2017-08-21 14:56:07 +02:00
out options: add a thread-safe way to notify option updates 2017-08-22 15:50:33 +02:00
csputils.c csputils: fix mp_colorspace_equal missing field 2017-07-18 02:20:50 +02:00
csputils.h vo_opengl: implement sony s-log2 trc 2017-06-18 20:54:44 +02:00
fmt-conversion.c vo_direct3d: remove non-working nv12 shader support 2017-06-30 18:13:01 +02:00
fmt-conversion.h video/fmt-conversion, img_format: change license to LGPL 2017-06-18 15:15:07 +02:00
gpu_memcpy.c Fix misspellings 2016-06-26 13:47:21 +02:00
gpu_memcpy.h video: refactor GPU memcpy usage 2015-09-25 19:18:16 +02:00
hwdec.c vd_lavc, vaapi: move hw device creation to generic code 2017-02-20 08:39:55 +01:00
hwdec.h hwdec: fix 2 comments 2017-05-24 14:32:23 +02:00
image_loader.c x11: load icon differently 2017-07-01 15:56:12 +02:00
image_loader.h x11: load icon differently 2017-07-01 15:56:12 +02:00
image_writer.c Replace remaining avcodec_close() calls 2017-07-16 12:51:48 +02:00
image_writer.h image_writer, vo_image: change license to LGPL 2017-06-18 15:45:24 +02:00
img_format.c img_format: #if -> #ifdef 2017-08-16 11:15:52 +02:00
img_format.h vo_opengl: support float pixel formats 2017-08-15 17:00:35 +02:00
mp_image.c video: add metadata handling for spherical video 2017-08-21 14:56:07 +02:00
mp_image.h video: add metadata handling for spherical video 2017-08-21 14:56:07 +02:00
mp_image_pool.c Revert "mp_image_pool: disallow adding read only frames" 2017-08-08 16:16:55 +02:00
mp_image_pool.h vaapi: use libavutil functions for copying hw surfaces to memory 2017-01-12 13:58:28 +01:00
sws_utils.c sws_utils: switch back to GPL 2017-07-01 12:51:18 +02:00
sws_utils.h
vaapi.c video: get rid of swapped packed YUV 2017-06-30 18:01:29 +02:00
vaapi.h vd_lavc, vaapi: move hw device creation to generic code 2017-02-20 08:39:55 +01:00
vdpau.c vo_opengl: separate hwdec context and mapping, port it to use ra 2017-08-10 21:24:31 +02:00
vdpau.h vdpau: support new vdpau libavcodec decode API 2017-03-23 11:14:11 +01:00
vdpau_functions.inc
vdpau_mixer.c vo_opengl: vdpau: fix certain cases of preemption recovery failures 2016-05-03 13:56:11 +02:00
vdpau_mixer.h vo_opengl: vdpau: fix certain cases of preemption recovery failures 2016-05-03 13:56:11 +02:00
vt.c vo_opengl: hwdec_osx: use new format setup function 2017-02-17 17:08:37 +01:00
vt.h videotoolbox: add reverse format mapping function 2017-02-17 13:51:03 +01:00