diff options
author | wm4 <wm4@nowhere> | 2017-04-01 20:45:20 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-04-01 20:47:23 +0200 |
commit | 9bcb9fcf2652afce86c53b353d63cc3377862eab (patch) | |
tree | 0a0c978ae9f557a5a06a94508f077cefcf7a46ef /etc/input.conf | |
parent | 6931fef4adfa96cef6a8dc67e89b4433aef72a36 (diff) | |
download | mpv-9bcb9fcf2652afce86c53b353d63cc3377862eab.tar.bz2 mpv-9bcb9fcf2652afce86c53b353d63cc3377862eab.tar.xz |
player: make screenshot commands honor the async flag
And also change input.conf to make all screenshots async. (Except the
every-frame mode, which always uses synchronous mode and ignores the
flag.) By default, the "screenshot" command is still asynchronous,
because scripts etc. might depend on this behavior.
This is only partially async. The code for determining the filename is
still always run synchronously. Only encoding the screenshot and writing
it to disk is asynchronous. We explicitly document the exact behavior as
undefined, so it can be changed any time.
Some of this is a bit messy, because I wanted to avoid duplicating the
message display code between sync and async mode. In async mode, this is
called from a worker thread, which is not safe because showing a message
accesses the thread-unsafe OSD code. So the core has to be locked during
this, which implies accessing the core and all that. So the code has
weird locking calls, and we need to do core destruction in a more
"controlled" manner (thus the outstanding_async field).
(What I'd really want would be the OSD simply showing log messages
instead.)
This is pretty untested, so expect bugs.
Fixes #4250.
Diffstat (limited to 'etc/input.conf')
-rw-r--r-- | etc/input.conf | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/etc/input.conf b/etc/input.conf index fe39b6c980..0e07f33e9e 100644 --- a/etc/input.conf +++ b/etc/input.conf @@ -119,9 +119,9 @@ #_ cycle video #T cycle ontop # toggle video window ontop of other windows #f cycle fullscreen # toggle fullscreen -#s screenshot # take a screenshot -#S screenshot video # ...without subtitles -#Ctrl+s screenshot window # ...with subtitles and OSD, and scaled +#s async screenshot # take a screenshot +#S async screenshot video # ...without subtitles +#Ctrl+s async screenshot window # ...with subtitles and OSD, and scaled #Alt+s screenshot each-frame # automatically screenshot every frame #w add panscan -0.1 # zoom out with -panscan 0 -fs #e add panscan +0.1 # in |