summaryrefslogtreecommitdiff
path: root/README.rst
diff options
context:
space:
mode:
Diffstat (limited to 'README.rst')
-rw-r--r--README.rst18
1 files changed, 18 insertions, 0 deletions
diff --git a/README.rst b/README.rst
index c609969..e46da2b 100644
--- a/README.rst
+++ b/README.rst
@@ -135,6 +135,24 @@ Playlist handling
print(player.playlist)
player.wait_for_playback()
+Directly feeding mpv data from python
+.....................................
+
+.. code:: python
+
+ #!/usr/bin/env python3
+ import mpv
+
+ player = mpv.MPV()
+ @player.python_stream('foo')
+ def reader():
+ with open('test.webm', 'rb') as f:
+ while True:
+ yield f.read(1024*1024)
+
+ player.play('python://foo')
+ player.wait_for_playback()
+
PyQT embedding
..............