1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-27 01:22:30 +00:00
mpv/player
wm4 d66eb93e5d client API: add async path; fix deadlock for vo_libmpv users
In commit 065c307e8e, I broke everything. It seemed like a nice idea,
but it explicitly broke an assumption vo_libmpv were explicitly allowed
to make: that observing properties does not lock the core. The commit
did just that and locked the core for property updates. This made for
example mpv's own OSX backend freeze (it uses vo_libmpv for convenience
to make up for Apple's incredibly broken OpenGL shit).

I don't want to revert that commit just because vo_libmpv's design is
horrible. So instead add an optional asynchronous path, that is only
used if vo_libmpv is in use (best idea ever?).

Interestingly, this isn't so hard. It adds about 90 lines of code, which
are only run on OSX and libmpv users, so I don't have to care about the
crashes and weird behavior this might cause. It even worked on the first
try except for a quickly fixed memory leak. The code path can be tested
anywhere by just turning the uses_vo_libmpv condition into always true.

The atomic is out of laziness. Saves some thinking how to get around the
locking order.
2019-10-25 01:57:51 +02:00
..
javascript js: expose mpv_abort_async_command() (match dbe831bd) 2019-09-11 21:08:04 +03:00
lua lua: actually unobserve properties in mp.unobserve_property() 2019-10-24 16:27:05 +02:00
audio.c player: partially rework --cache-pause 2019-10-11 20:01:51 +02:00
client.c client API: add async path; fix deadlock for vo_libmpv users 2019-10-25 01:57:51 +02:00
client.h client API: remove unused global event mask 2019-10-24 16:27:24 +02:00
command.c command: remove some unused property metadata 2019-10-25 00:50:38 +02:00
command.h demux, command: add a third stream recording mechanism 2019-09-19 20:37:05 +02:00
configfiles.c player: update for --video-aspect deprecation 2019-10-04 22:41:31 +02:00
core.h video: do not disable display-sync on A/V desync 2019-10-17 19:23:35 +02:00
external_files.c external_files: add .lrc subtitle extension 2019-09-02 01:25:43 +03:00
external_files.h player: get rid of mpv_global.opts 2018-05-24 19:56:35 +02:00
javascript.c js: expose mpv_abort_async_command() (match dbe831bd) 2019-09-11 21:08:04 +03:00
loadfile.c player: avoid duplicate track auto selection 2019-10-18 12:11:11 +02:00
lua.c lua: expose mpv_abort_async_command() 2018-05-24 19:56:34 +02:00
main.c player: accept compatible later FFmpeg library runtime versions 2019-10-11 21:28:04 +02:00
misc.c player: fix --loop with backward playback 2019-09-19 20:37:05 +02:00
osd.c player: format low cache duration with more decimals 2019-10-11 19:18:43 +02:00
playloop.c player: partially rework --cache-pause 2019-10-11 20:01:51 +02:00
screenshot.c screenshot: move message showing to common code 2019-09-19 20:37:05 +02:00
screenshot.h image_writer: move convert_image() to player/screenshot.c 2019-09-14 23:02:39 +02:00
scripting.c scripting: change when/how player waits for scripts being loaded 2018-04-18 01:17:41 +03:00
sub.c player: ensure backward playback state is propagated on track switching 2019-09-19 20:37:05 +02:00
video.c video: do not disable display-sync on A/V desync 2019-10-17 19:23:35 +02:00