mpv/player
wm4 5cc68c792b client API: restructure waiting, do log msg wakeup properly
Until now, availability of new log messages (through the mechanism
associated with mpv_request_log_messages()) did not wakeup the client
API properly. Commit 3b7402b5 was basically a hack to improve that
somewhat, but it wasn't a solution.

The main problem is that the client API itself is producing messages, so
the message callback would attempt to lock the client API lock,
resulting in a deadlock. Even if the lock was recursive, we'd run into
lock-order issues.

Solve this by using a separate lock for waiting and wakeup. Also, since
it's a natural addition, avoid redundant wakeups. This means the wakeup
callback as well as the wakeup pipe will be triggered only once until
the next mpv_wait_event() call happens.

This might make the wakeup callback be invoked in a reentrant way for
the first time, for example if a mpv_* function prints to a log. Adjust
the docs accordingly. (Note that non-reentrant beheavior was never
guaranteed - basically the wakeup callback is somewhat dangerous and
inconvenient.)

Also remove some traces of unneeded code. ctx->shutdown for one was
never set, and probably a leftover of an abandoned idea.
2014-06-07 23:16:46 +02:00
..
lua client API: change mpv_wait_event() timeout semantics 2014-06-07 15:57:47 +02:00
timeline tl_mpv_edl: correct misspelling on line 233 2014-05-22 20:59:31 +02:00
audio.c audio: change handling of an EOF corner case 2014-05-30 02:16:43 +02:00
client.c client API: restructure waiting, do log msg wakeup properly 2014-06-07 23:16:46 +02:00
client.h player: reorganize how lua scripts are loaded 2014-05-13 02:39:37 +02:00
command.c command: format_bitrate: fix conversion to kbits and mbits 2014-06-02 22:20:25 +02:00
command.h client API: report success status when running commands 2014-06-01 03:41:46 +02:00
configfiles.c player: write file name to the watch later config file 2014-06-01 19:55:45 +02:00
core.h client API: add API function that ensures total destruction 2014-06-07 15:57:54 +02:00
discnav.c stream: kill start_pos, remove --sb option 2014-05-24 16:17:50 +02:00
loadfile.c stream: kill start_pos, remove --sb option 2014-05-24 16:17:50 +02:00
lua.c lua: slightly nicer diagnostics output 2014-05-27 00:02:34 +02:00
main.c client API: add API function that ensures total destruction 2014-06-07 15:57:54 +02:00
main_fn.c build: add option to build a library 2014-02-10 21:25:22 +01:00
misc.c stream: don't use end_pos 2014-05-24 16:17:51 +02:00
osd.c player: hack to fix --msgmodule --term-osd-bar 2014-04-13 13:03:31 +02:00
playloop.c stream: don't use end_pos 2014-05-24 16:17:51 +02:00
screenshot.c video: remove redundant mp_image display_w/_h members 2014-04-29 13:31:59 +02:00
screenshot.h
scripting.c client API: rename mpv_destroy() to mpv_detach_destroy() 2014-06-07 20:25:48 +02:00
sub.c video: handle colorspace and aspect overrides separately 2014-05-02 01:09:55 +02:00
video.c video: fix display of cover art with vo_vdpau 2014-05-22 13:50:10 +02:00