1
mirror of https://github.com/mpv-player/mpv synced 2024-11-14 22:48:35 +01:00
mpv/player
wm4 017b3fa9db lua: synchronously wait until scripts are loaded
This makes the player wait until each script is loaded. Do this to give
the script a chance to setup all its event handlers. It might also be
useful to allow a script to change options that matter for playback.

While waiting for a script to be loaded, the player actually accepts
input. This is needed because the scripts can execute player commands
anyway while they are being "loaded". The player won't react to most
commands though: it can't quit or navigate the playlist in this state.

For deciding whether a script is finally loaded, we use a cheap hack: if
mpv_wait_event() is called, it's considered loaded. Let's hope this is
good enough. I think it's better than introducing explicit API for this.
Although I'm sure this will turn out as too simplistic some time in the
future, the same would probably happen with a more explicit API.
2014-09-06 17:02:47 +02:00
..
lua osc: Use osd-font for playlist buttons 2014-08-22 23:50:50 +02:00
timeline Move compat/ and bstr/ directory contents somewhere else 2014-08-29 12:31:52 +02:00
audio.c audio: fix initial sync with huge AO buffer 2014-09-06 13:33:29 +02:00
client.c lua: synchronously wait until scripts are loaded 2014-09-06 17:02:47 +02:00
client.h lua: synchronously wait until scripts are loaded 2014-09-06 17:02:47 +02:00
command.c video: rename VOCTRL_GET_WINDOW_SIZE 2014-09-05 01:52:16 +02:00
command.h client API: minor optimizations for property notification 2014-08-02 01:53:22 +02:00
configfiles.c player: check for null in resume config search 2014-09-05 17:51:45 +02:00
core.h player: minor refactoring 2014-09-06 16:57:46 +02:00
discnav.c video: get rid of video_next_pts field 2014-08-22 14:22:06 +02:00
loadfile.c audio: fix random crashes on uninit 2014-09-05 04:33:24 +02:00
lua.c lua: expose mp_getcwd through mp.utils 2014-08-31 00:58:27 +02:00
main_fn.c cocoa: fix build by using the correct HAVE_* macro 2014-08-06 09:31:59 +02:00
main.c options: compatibility hack for --slave-broken 2014-08-25 00:48:55 +02:00
misc.c player: use virtual time for --audio-file with ordered chapters 2014-08-15 23:32:37 +02:00
osd.c player: better cache status on status line 2014-08-27 23:12:47 +02:00
playloop.c player: minor refactoring 2014-09-06 16:57:46 +02:00
screenshot.c Move compat/ and bstr/ directory contents somewhere else 2014-08-29 12:31:52 +02:00
screenshot.h Move mpvcore/player/ to player/ 2013-12-17 00:53:22 +01:00
scripting.c lua: synchronously wait until scripts are loaded 2014-09-06 17:02:47 +02:00
sub.c sub: fix possible deadlock with --no-sub-ass and similar 2014-09-06 00:16:15 +02:00
video.c video: initial Matroska 3D support 2014-08-30 23:24:46 +02:00