summaryrefslogtreecommitdiffstats
path: root/DOCS
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-03-06 19:23:14 +0100
committerwm4 <wm4@nowhere>2020-03-06 19:23:14 +0100
commit2337fa4e0213993398d36cb3222633766d677dfd (patch)
tree2cde81d55f16a61c1512ff537001c2e34e6acf97 /DOCS
parent7a76b577d85ddc8f9e255b1a1c195ee88b76a7d8 (diff)
downloadmpv-2337fa4e0213993398d36cb3222633766d677dfd.tar.bz2
mpv-2337fa4e0213993398d36cb3222633766d677dfd.tar.xz
command: remove legacy hook API
Hopefully nothing uses this. (I know one exception, but, well, what can I do.)
Diffstat (limited to 'DOCS')
-rw-r--r--DOCS/interface-changes.rst3
-rw-r--r--DOCS/man/input.rst41
2 files changed, 3 insertions, 41 deletions
diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst
index 991ba6aca3..0c9c7f6831 100644
--- a/DOCS/interface-changes.rst
+++ b/DOCS/interface-changes.rst
@@ -35,6 +35,9 @@ Interface changes
- the OSX bundle now logs to "~/Library/Logs/mpv.log" by default
- deprecate the --cache-secs option (once removed, the cache cannot be
limited by time anymore)
+ - remove deprecated legacy hook API ("hook-add", "hook-ack"). Use either the
+ libmpv API (mpv_hook_add(), mpv_hook_continue()), or the Lua scripting
+ wrappers (mp.add_hook()).
--- mpv 0.32.0 ---
- change behavior when using legacy option syntax with options that start
with two dashes (``--`` instead of a ``-``). Now, using the recommended
diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst
index 651ae7f645..7c93843619 100644
--- a/DOCS/man/input.rst
+++ b/DOCS/man/input.rst
@@ -1286,47 +1286,6 @@ The following hooks are currently defined:
Run before closing a file, and before actually uninitializing
everything. It's not possible to resume playback in this state.
-Legacy hook API
-~~~~~~~~~~~~~~~
-
-.. warning::
-
- The legacy API is deprecated and will be removed soon.
-
-There are two special commands involved. Also, the client must listen for
-client messages (``MPV_EVENT_CLIENT_MESSAGE`` in the C API).
-
-``hook-add <hook-name> <id> <priority>``
- Subscribe to the hook identified by the first argument (basically, the
- name of event). The ``id`` argument is an arbitrary integer chosen by the
- user. ``priority`` is used to sort all hook handlers globally across all
- clients. Each client can register multiple hook handlers (even for the
- same hook-name). Once the hook is registered, it cannot be unregistered.
-
- When a specific event happens, all registered handlers are run serially.
- This uses a protocol every client has to follow explicitly. When a hook
- handler is run, a client message (``MPV_EVENT_CLIENT_MESSAGE``) is sent to
- the client which registered the hook. This message has the following
- arguments:
-
- 1. the string ``hook_run``
- 2. the ``id`` argument the hook was registered with as string (this can be
- used to correctly handle multiple hooks registered by the same client,
- as long as the ``id`` argument is unique in the client)
- 3. something undefined, used by the hook mechanism to track hook execution
-
- Upon receiving this message, the client can handle the event. While doing
- this, the player core will still react to requests, but playback will
- typically be stopped.
-
- When the client is done, it must continue the core's hook execution by
- running the ``hook-ack`` command.
-
-``hook-ack <string>``
- Run the next hook in the global chain of hooks. The argument is the 3rd
- argument of the client message that starts hook execution for the
- current client.
-
Input Command Prefixes
----------------------