diff options
author | wm4 <wm4@nowhere> | 2014-04-08 22:06:39 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-04-08 22:06:39 +0200 |
commit | 89d400dc21881e63fda20e23b11a88bca6ee49d6 (patch) | |
tree | 3d8cbe72f74bb37a0dc4165af99da0a79250ec1a /DOCS | |
parent | d6022f33d64df9c0226db49bef68197473bfc598 (diff) | |
download | mpv-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')
-rw-r--r-- | DOCS/man/en/lua.rst | 14 |
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 ``==`` |