Commit graph

166 commits

Author SHA1 Message Date
jaseg
3fe42bfd9d tests: Fix test_instance_method_property_observer (#108)
The loop property was a poor choice here since setting it messes with
libmpv's event loop, leading to property change observer events being
dropped.
2020-07-15 22:04:03 +02:00
jaseg
f5a9690739 tests: Fix test_property_observer_decorator (#108) 2020-07-15 22:03:37 +02:00
jaseg
b54d5f5521 tests: Fix test_write for segaults in libmpv (#108) 2020-07-15 22:03:37 +02:00
YoSTEALTH
e6abadec7e added "python_requires"
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`
2020-07-15 22:03:37 +02:00
Louis-Philippe Véronneau
b4f5b10699 remove superfluous whitespaces 2020-07-15 22:03:37 +02:00
jaseg
db644cd74e Bump version to v0.4.7 2020-07-12 13:30:39 +02:00
jaseg
50294b7f2f README: Add detail on subtitle handling 2020-07-12 13:28:38 +02:00
jaseg
c3eef35f59 Fix handling of dashed options in loadfile.
Add tests based on --sub-file. Also add a test for sub_add here.
2020-07-12 13:27:53 +02:00
Peter Kuchar
3ef4ecf765 update README with inserting subtitles 2020-07-11 22:56:57 +02:00
jaseg
0013328ff2 Add release script 2020-04-05 13:27:37 +02:00
jaseg
2c75f23623 Version v0.4.6 2020-04-05 12:49:21 +02:00
jaseg
068d034cc0 Make tests run headless using xvfbwrapper 2020-04-05 12:47:34 +02:00
jaseg
4eb105a751
Add some high-level API information to README 2020-04-01 14:27:27 +02:00
jaseg
c1df201b26 README: Add info on GUI modes
Closes #102
2020-01-24 12:23:04 +01:00
jaseg
fc775920de README: add render context gtk example 2020-01-03 01:11:23 +01:00
jaseg
3c21d679da Initial libmpv/render.h mapping
For an example using this with GTK see:
https://gist.github.com/jaseg/657e8ecca3267c0d82ec85d40f423caa
2020-01-03 01:08:16 +01:00
Elias
3205f1b6f8 Add GTK/OpenGL example (#100)
* Add GTK/OpenGL example
2020-01-03 01:06:36 +01:00
jaseg
dde7da1aec Version 0.4.5 2019-12-04 09:49:05 +01:00
jaseg
63f9b74247 Windows: Use cytpes.load_library to look for DLL 2019-12-04 09:48:16 +01:00
jaseg
3452ac87bc Version 0.4.4 2019-12-03 23:48:19 +01:00
ripdog
62ef265e2d Allow mpv-1.dll to be placed in python script directory (#96)
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
2019-12-03 23:47:47 +01:00
jaseg
9d9c2b26f3 Version 0.4.2 2019-12-02 13:32:08 +01:00
jaseg
c7e0968d60 tests: Silence libmpv during unittests 2019-12-02 13:31:43 +01:00
jaseg
c7a50aec38 Fix Python 3.5 compatibility 2019-12-02 12:32:33 +01:00
jaseg
91067fcbd8 Version 0.4.1 2019-12-01 21:27:59 +01:00
jaseg
49e6f6f6d0 Add stream protocol handling
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.
2019-12-01 21:25:04 +01:00
jaseg
3d61558714 Bump version to v0.4.0
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')
2019-11-26 12:26:58 +01:00
jaseg
35e69cd93e key bindings: Introduce key char parameter
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.
2019-11-26 12:26:37 +01:00
Rijnder Wever
9d6d973f91 README - vo "opengl" doesn't exist anymore 2019-11-26 12:13:57 +01:00
jaseg
4f69531721 Version 0.3.10 2019-11-10 16:31:58 +01:00
dfaker
728e8b2556 Use stride//4 rather than the returned image w
As per discussion on the mpv issue https://github.com/mpv-player/mpv/issues/7076 to handle the screenshot-raw when vf cropping filters are in use.
2019-11-10 16:11:22 +01:00
jaseg
7117de4005 README: Add cosven's QT/OpenGL example 2019-02-08 14:41:23 +09:00
cosven
7905ebacdd fix: getProcAddr function should return a function or 0 2019-02-07 23:35:14 +08:00
jaseg
9b4faea030
Merge pull request #78 from trin94/patch-1
Readme: Add PyGtk embedding example
2018-12-02 10:07:20 +09:00
Elias
85eaac9363
Readme: Add PyGtk embedding example 2018-12-01 21:54:33 +01:00
jaseg
8ba7d27e79 Version 0.3.9 2018-07-25 12:08:59 +02:00
jaseg
a873fd7f7b command: fix default show-text duration param value
The mpv manpage seems to be wrong here. A look at mpv's command.c show
that -1 works fine here.
2018-07-25 12:07:52 +02:00
jaseg
4352b01e29 README: Add PyQT embedding example 2017-12-25 13:33:03 +01:00
jaseg
243414d5e0 README: Add "supported platforms" section 2017-12-25 13:32:46 +01:00
jaseg
62add955f9 Refactor node_cast_value to use large if/elif instead of dict lookup 2017-12-25 13:16:58 +01:00
jaseg
092707259b Bump version to v0.3.8 2017-12-24 22:46:22 +01:00
jaseg
8f5f5c645b Fix MpvNode logic to use pröper unions
...instead of lots manual ctypes pointer casting
2017-12-24 22:43:13 +01:00
jaseg
c2616054a1 v0.3.7: Remove windows classifiers since nobody tests this on windows 2017-12-05 13:34:09 +01:00
jaseg
70a639bd7d Bump version to 0.3.6 2017-09-19 12:12:13 +02:00
Vilius Grigaliūnas
345ffb1998 Fixed TypeError: _handle_key_binding_message() signature incompatibility with mpv < v0.15.0
key-binding message has key name parameter only since mpv version 0.15.0 (as stated in manual), therefore trying to bind keys with earlier versions results in TypeError: _handle_key_binding_message() missing 1 required positional argument: 'key_name'.

This change makes this argument optional and default to None.
2017-09-18 20:21:58 +03:00
jaseg
4ebf4e1c37 Version 0.3.5 2017-09-14 12:09:04 +02:00
jaseg
901e42042b Nicer API names for add/multiply/cycle property
add: _add_property -> property_add
multiply: _multiply_property -> property_multiply
cycle: _cycle_property -> cycle
2017-09-14 12:07:11 +02:00
jaseg
dcf75e604c Wrap all docstrings to 120 char line width
This is to stay consistent with everything else.
2017-09-14 12:03:50 +02:00
Raphael McSinyx
fa125c6604 Reformat doctrings to follow PEP 257 and use reStructuredText 2017-09-13 15:46:13 +07:00
Raphael McSinyx
9f4b31f166 Fix add, cycle and multiply command. 2017-09-13 15:17:30 +07:00