summaryrefslogtreecommitdiffstats
path: root/DOCS/man
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-04-08 22:06:39 +0200
committerwm4 <wm4@nowhere>2014-04-08 22:06:39 +0200
commit89d400dc21881e63fda20e23b11a88bca6ee49d6 (patch)
tree3d8cbe72f74bb37a0dc4165af99da0a79250ec1a /DOCS/man
parentd6022f33d64df9c0226db49bef68197473bfc598 (diff)
downloadmpv-89d400dc21881e63fda20e23b11a88bca6ee49d6.tar.bz2
mpv-89d400dc21881e63fda20e23b11a88bca6ee49d6.tar.xz
client API: avoid redundant property change events if possible
This is done simply by comparing the previous and current values. Do this only if the requested format is not MPV_FORMAT_NONE.
Diffstat (limited to 'DOCS/man')
-rw-r--r--DOCS/man/en/lua.rst14
1 files changed, 9 insertions, 5 deletions
diff --git a/DOCS/man/en/lua.rst b/DOCS/man/en/lua.rst
index 5b07ebe0ce..e88f4a9c2c 100644
--- a/DOCS/man/en/lua.rst
+++ b/DOCS/man/en/lua.rst
@@ -250,13 +250,17 @@ The ``mp`` module is preloaded, although it can be loaded manually with
example ``string``, ``fn`` is roughly called as in
``fn(name, mp.get_property_string(name))``.
- Sporadic property change events are possible. This means the change function
- ``fn`` can be called even if the property doesn't actually change. Likewise,
- in some cases the function is not called even if the property changes. If
- possible, change events are coalesced. If a property is changed a bunch of
- times in a row, only the last change triggers the change function. (The
+ If possible, change events are coalesced. If a property is changed a bunch
+ of times in a row, only the last change triggers the change function. (The
exact behavior depends on timing and other things.)
+ In some cases the function is not called even if the property changes.
+ Whether this can happen depends on the property.
+
+ If the ``type`` is ``none`` or ``nil``, sporadic property change events are
+ possible. This means the change function ``fn`` can be called even if the
+ property doesn't actually change.
+
``mp.unobserve_property(fn)``
Undo ``mp.observe_property(..., fn)``. This removes all property handlers
that are equal to the ``fn`` parameter. This uses normal Lua ``==``