1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-03 13:32:16 +00:00
mpv/video
wm4 d89eb74cb7 cocoa: redo synchronization
Before this change, Cocoa state was accessed from both the VO and the
Cocoa main thread. This was probably not a good idea. There was some
locking as well as implicit synchronization using the dispatch
mechanism, but it wasn't watertight.

Change this completely. Now Cocoa things are always accessed from the
main thread only. The old mutex falls away, as well as the
vo_cocoa_set_current_context() function, which implicitly used the lock
to coordinate VO accesses. With the new code, the VO thread generally
has to wait for the main thread, while the main thread never waits for
the VO and rarely accesses it. Fortunately, this is rather straight
forward, and most of this is achieved by making vo_cocoa_control() run
on the main thread. The logic of the code does generally not change.

Some aspects are trickier. Apparently we can't access the
NSOpenGLContext from the VO thread, because this object is not thread-
safe. We use some CGLContextObj functions instead, such as for making
the context current and swapping the buffers.
2015-05-13 22:00:34 +02:00
..
decode vda: add support for nv12 image formats 2015-05-13 19:57:39 +02:00
filter mp_image: remove some unused interlacing flags 2015-04-23 22:06:14 +02:00
out cocoa: redo synchronization 2015-05-13 22:00:34 +02:00
csputils.c csputils: improve contrast semantics for limited range output 2015-04-29 22:09:09 +02:00
csputils.h Update license headers 2015-04-13 12:10:01 +02:00
fmt-conversion.c Update license headers 2015-04-13 12:10:01 +02:00
fmt-conversion.h Update license headers 2015-04-13 12:10:01 +02:00
hwdec.h RPI support 2015-03-29 16:09:56 +02:00
image_writer.c screenshots: add option to prevent 16 bit output 2015-04-29 21:05:04 +02:00
image_writer.h screenshots: add option to prevent 16 bit output 2015-04-29 21:05:04 +02:00
img_format.c Update license headers 2015-04-13 12:10:01 +02:00
img_format.h Update license headers 2015-04-13 12:10:01 +02:00
img_fourcc.h build: deal with endian mess 2014-07-10 00:58:56 +02:00
mp_image_pool.c Update license headers 2015-04-13 12:10:01 +02:00
mp_image_pool.h video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
mp_image.c mp_image: remove some unused interlacing flags 2015-04-23 22:06:14 +02:00
mp_image.h mp_image: remove some unused interlacing flags 2015-04-23 22:06:14 +02:00
sws_utils.c sws_utils: re-use avcolorspace for sws colorspaces 2015-05-04 01:34:25 +02:00
sws_utils.h vf_scale: libswscale is being stupid 2015-03-01 22:32:38 +01:00
vaapi.c command: add property returning detected hwdec API 2015-02-02 22:43:13 +01:00
vaapi.h video: have a generic context struct for hwdec backends 2015-01-22 15:32:23 +01:00
vdpau_functions.inc video: handle hwdec screenshots differently 2015-01-22 18:18:23 +01:00
vdpau_mixer.c vdpau: always render to cropped size at most 2015-04-26 18:56:46 +02:00
vdpau_mixer.h vdpau_mixer: allow overriding frame opts 2014-05-02 01:08:04 +02:00
vdpau.c vdpau: don't use a transparent image format for screenshots 2015-04-07 10:18:48 +02:00
vdpau.h video: handle hwdec screenshots differently 2015-01-22 18:18:23 +01:00