0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 03:52:22 +02:00
mpv/player
wm4 a4321cf687 screenshot: change async behavior to be in line with new semantics
Basically reimplement the async behavior on top of the async command
code. With this, all screenshot commands are async, and the "async"
prefix basically does nothing. The prefix now behaves exactly like with
other commands that use spawn_thread.

This also means using the prefix in the preset input.conf is pointless
(without effect) and misleading, so remove that.

The each_frame mode was actually particularly painful in making this
change, since the player wants to block for it when writing a
screenshot, and generally doesn't fit into the new infrastructure. It
was still relatively easy to reimplement by copying the original command
and then repeating it on each frame. The waiting is reentrant now, so
move the call in video.c to a "safer" spot.

One way to observe how the new semantics interact with everything is
using the mpv repl script and sending a screenshot command through it.
Without async flag, the script will freeze while writing the screenshot
(while playback continues), while with async flag it continues.
2018-05-24 19:56:34 +02:00
..
javascript js: use new hooks API (match f60826c3) 2018-04-07 16:02:20 -07:00
lua stats: show sample format of audio track 2018-05-17 22:54:56 +03:00
audio.c build: make encoding mode non-optional 2018-05-03 01:08:44 +03:00
client.c command: add infrastructure for async commands 2018-05-24 19:56:34 +02:00
client.h command: add infrastructure for async commands 2018-05-24 19:56:34 +02:00
command.c screenshot: change async behavior to be in line with new semantics 2018-05-24 19:56:34 +02:00
command.h command: add infrastructure for async commands 2018-05-24 19:56:34 +02:00
configfiles.c player: silence config file loading message on resuming 2018-01-13 03:26:45 -08:00
core.h player: make all external file loading actions async 2018-05-24 19:56:34 +02:00
external_files.c player: make track language matching case insensitive 2017-12-23 15:14:13 -07:00
external_files.h external_files: change license to LGPL 2017-06-20 14:22:10 +02:00
javascript.c js: use new hooks API (match f60826c3) 2018-04-07 16:02:20 -07:00
loadfile.c player: make all external file loading actions async 2018-05-24 19:56:34 +02:00
lua.c client API: add a first class hook API, and deprecate old API 2018-03-26 23:02:23 -07:00
main.c command: add infrastructure for async commands 2018-05-24 19:56:34 +02:00
misc.c options: move most subtitle and OSD rendering options to sub structs 2018-01-02 14:27:37 -08:00
osd.c build: make encoding mode non-optional 2018-05-03 01:08:44 +03:00
playloop.c command: add infrastructure for async commands 2018-05-24 19:56:34 +02:00
screenshot.c screenshot: change async behavior to be in line with new semantics 2018-05-24 19:56:34 +02:00
screenshot.h command: move screenshot command stubs to screenshot.c 2018-05-24 19:56:34 +02:00
scripting.c scripting: change when/how player waits for scripts being loaded 2018-04-18 01:17:41 +03:00
sub.c video: make decoder wrapper a filter 2018-01-30 03:10:27 -08:00
video.c screenshot: change async behavior to be in line with new semantics 2018-05-24 19:56:34 +02:00