summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-03-18 22:03:04 +0100
committerwm4 <wm4@nowhere>2016-03-18 22:03:04 +0100
commitfe67aa7b1878ca3cf3bf81dcafa1bbe3efaf51c8 (patch)
tree53ed423c7ff01359fef524b2ad763ac01eda48f7
parent042ca849ea6f2550ee4a14206c1dcf70659544d5 (diff)
downloadmpv-fe67aa7b1878ca3cf3bf81dcafa1bbe3efaf51c8.tar.bz2
mpv-fe67aa7b1878ca3cf3bf81dcafa1bbe3efaf51c8.tar.xz
lua: don't suspend core by default during script execution
This changes behavior somewhat. The old behavior can be restored by running "mp.use_suspend=true". It was originally introduced for the OSC, but I can't reproduce whatever misbehavior I was seeing. (See mp.suspend()/resume() for explanations what the suspend mechanism does.)
-rw-r--r--DOCS/interface-changes.rst1
-rw-r--r--DOCS/man/lua.rst8
-rw-r--r--player/lua/defaults.lua2
3 files changed, 3 insertions, 8 deletions
diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst
index 377d3efbb0..4ef60aa312 100644
--- a/DOCS/interface-changes.rst
+++ b/DOCS/interface-changes.rst
@@ -23,6 +23,7 @@ Interface changes
- deprecate "track-list/N/audio-channels" property (use
"track-list/N/demux-channel-count" instead)
- remove write access to "stream-pos", and change semantics for read access
+ - Lua scripts now don't suspend mpv by default while script code is run
--- mpv 0.16.0 ---
- change --audio-channels default to stereo (use --audio-channels=auto to
get the old default)
diff --git a/DOCS/man/lua.rst b/DOCS/man/lua.rst
index 4d47774319..245eb58a5d 100644
--- a/DOCS/man/lua.rst
+++ b/DOCS/man/lua.rst
@@ -412,7 +412,7 @@ are useful only in special situations.
from displaying the next video frame, so that you don't get blocked when
trying to access the player.
- This is automatically called by the event handler.
+ Before mpv 0.17.0, this was automatically called by the event handler.
``mp.resume()``
Undo one ``mp.suspend()`` call. ``mp.suspend()`` increments an internal
@@ -423,10 +423,6 @@ are useful only in special situations.
This resets the internal suspend counter and resumes the player. (It's
like calling ``mp.resume()`` until the player is actually resumed.)
- You might want to call this if you're about to do something that takes a
- long time, but doesn't really need access to the player (like a network
- operation). Note that you still can access the player at any time.
-
``mp.get_wakeup_pipe()``
Calls ``mpv_get_wakeup_pipe()`` and returns the read end of the wakeup
pipe. (See ``client.h`` for details.)
@@ -449,8 +445,6 @@ are useful only in special situations.
``mp.get_wakeup_pipe()`` if you're interested in properly working
notification of new events and working timers.
- This function calls ``mp.suspend()`` and ``mp.resume_all()`` on its own.
-
``mp.enable_messages(level)``
Set the minimum log level of which mpv message output to receive. These
messages are normally printed to the terminal. By calling this function,
diff --git a/player/lua/defaults.lua b/player/lua/defaults.lua
index d0ef57cccd..38905a610b 100644
--- a/player/lua/defaults.lua
+++ b/player/lua/defaults.lua
@@ -438,7 +438,7 @@ local function call_event_handlers(e)
end
end
-mp.use_suspend = true
+mp.use_suspend = false
function mp.dispatch_events(allow_wait)
local more_events = true