andre-d / pympv Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
Is it possible to send commands containing unicode?
>>> import mpv
>>> m = mpv.Context()
>>> m.initialize()
>>> m.command('loadfile', u'a–b.mp3')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "mpv.pyx", line 560, in mpv.Context.command (mpv.c:8989)
mpv.MPVError: invalid parameter
Regarding async
parameter for command
and set_property
:
W606 'async' and 'await' are reserved keywords starting with Python 3.7
Better safe than sorry and guard against that change before it goes live :)
Complains about mpv.lib
setup.py build
running build
running build_ext
building 'mpv' extension
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python34\include -IC:\Python34\include /Tcmpv.c /Fobuild\temp.win32-3.4\Release\mpv.obj
mpv.c
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:\Python34\libs /LIBPATH:C:\Python34\PCbuild mpv.lib /EXPORT:PyInit_mpv build\temp.win32-3.4\Release\mpv.obj /OUT:build\lib.win32-3.4\mpv.pyd /IMPLIB:build\temp.win32-3.4\Release\mpv.lib /MANIFESTFILE:build\temp.win32-3.4\Release\mpv.pyd.manifest
LINK : fatal error LNK1181: cannot open input file 'mpv.lib'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\BIN\\link.exe' failed with exit status 1181
I assume i will have to build it myself but i found no instructions for doing so either on Windows or cross-compiling on Linux. I know it's not a pympv problem, but some help in that direction would be greatly appreciated.
Commit 966ce5a seems to imply that calling wait_event()
with no timeout should wait forever. But this is not what happens: it passes -1, which will return immediately.
Well, I'm not entirely sure what behavior mpv_wait_event() should have. Currently, it accepts a relative timeout, and if the timeout is 0 or negative, it doesn't wait. Maybe this should be changed? E.g. the poll() system call interprets negative timeouts as infinite timeout.
Currently, you can pass an unrealistically high number like 1e20 to get an infinite timeout.
Slightly digressing from this, maybe the timeout should be an absolute target time (using mpv_get_time_us()), instead of a relative timeout?
We talked about this on IRC, so this is just a reminder. It appears that Python crashes mysteriously as soon as the user callback is invoked. I have no idea how to debug this.
Note that the callback is completely asynchronous and from another thread, so maybe it's a synchronization problem.
Also, by the way: why does the function require a callback argument? This makes sense in languages like C which have no closures, but in Python you could just use a lambda. So maybe the argument should just be removed.
What's the status of this project? I see it hasn't had any updates in years. I'm interested in using it myself and seeing it added to PyPI, but I'd like to know if you intend to continue maintaining it or if I should just maintain my own fork and submit it to PyPI myself. Let me know what you prefer :-)
I created a PR with the changes in my repo: #7
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.