This release introduces a new ShutdownError thrown in a few places in
case the underlying libmpv handle gets closed. Previously, such
situations would lead to hangs (wait_for_* methods) or segfaults (e.g.
__getattr__). Some of this carnage is still possible, but these
remaining issues will be closed over the next releases by throwing
ShutdownErrors in more places.
The current mpv master changes default log output, breaking this test.
To be future-proof, it now emits its own message through the print-text
command.
people are installing this package in python2 and running into issues of syntax error which is only used in pyhon3.5, thus the need of `python_requires`
Windows: Look for DLL in script directory
Loading DLLs through ctypes on Windows is a mess. ctypes looks in PATH, which is different from the Windows built-in DLL loading system. By default ctypes looks next to python.exe, but you might not want to install python script dependencies next to the system-wide python interpreter.
This commit adds a fallback looking for mpv-1.dll in the same directory the mpv.py script is placed in to allow people to use python-mpv with a minimum in configuration. You can still control loading behavior through PATH. For details on this, consult the following stackoverflow answer: https://stackoverflow.com/a/23805306
This allows you to directly feed bytes into mpv without going through a
file, FIFO etc. first. The new API is:
@player.register_stream_protocol(name)
@player.python_stream(name, size)
@player.python_stream_catchall
See their docstrings for their usage.
This change breaks the key binding API. Old code has to be modified to
add the new "char" parameter:
old:
player = mpv.MPV()
@player.key_binding('Q')
def binding(state, name):
print('blep')
new:
player = mpv.MPV()
@player.key_binding('Q')
def binding(state, name, char): # <<< here
print('blep')
Adapt key binding script message handling to be compatible with the new
key char parameter introduced upstream in
21f2468d67
This change is backwards-compatible. With older mpv versions this
parameter will be None.