Hello community,

here is the log from the commit of package python-python-mpv for 
openSUSE:Factory checked in at 2019-11-10 22:55:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-python-mpv (Old)
 and      /work/SRC/openSUSE:Factory/.python-python-mpv.new.2990 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-python-mpv"

Sun Nov 10 22:55:38 2019 rev:6 rq:747247 version:0.3.10

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-python-mpv/python-python-mpv.changes      
2018-12-24 11:42:39.897384402 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-python-mpv.new.2990/python-python-mpv.changes
    2019-11-10 22:55:42.430764914 +0100
@@ -1,0 +2,12 @@
+Sun Nov 10 16:05:24 UTC 2019 - Luigi Baldoni <aloi...@gmx.com>
+
+
+- Update to version 0.3.10
+  * Use stride//4 rather than the returned image w
+  * README: Add cosven's QT/OpenGL example
+  * fix: getProcAddr function should return a function or 0
+  * Readme: Add PyGtk embedding example 
+
+- Spec cleanup
+
+-------------------------------------------------------------------

Old:
----
  python-mpv-0.3.9.tar.gz

New:
----
  python-mpv-0.3.10.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-python-mpv.spec ++++++
--- /var/tmp/diff_new_pack.qC09jO/_old  2019-11-10 22:55:43.658766484 +0100
+++ /var/tmp/diff_new_pack.qC09jO/_new  2019-11-10 22:55:43.658766484 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-python-mpv
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,14 +16,12 @@
 #
 
 
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-python-mpv
-Version:        0.3.9
+Version:        0.3.10
 Release:        0
 Summary:        Python interface to the mpv media player
 License:        AGPL-3.0-or-later
-Group:          Development/Languages/Python
-Url:            https://github.com/jaseg/python-mpv
+URL:            https://github.com/jaseg/python-mpv
 Source0:        
https://files.pythonhosted.org/packages/source/p/python-mpv/python-mpv-%{version}.tar.gz
 Source99:       %{name}-rpmlintrc
 BuildRequires:  %{python_module setuptools}

++++++ python-mpv-0.3.9.tar.gz -> python-mpv-0.3.10.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-mpv-0.3.9/PKG-INFO 
new/python-mpv-0.3.10/PKG-INFO
--- old/python-mpv-0.3.9/PKG-INFO       2018-07-25 12:08:50.000000000 +0200
+++ new/python-mpv-0.3.10/PKG-INFO      2019-11-10 16:33:36.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: python-mpv
-Version: 0.3.9
+Version: 0.3.10
 Summary: A python interface to the mpv media player
 Home-page: https://github.com/jaseg/python-mpv
 Author: jaseg
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-mpv-0.3.9/README.rst 
new/python-mpv-0.3.10/README.rst
--- old/python-mpv-0.3.9/README.rst     2017-12-25 13:32:27.000000000 +0100
+++ new/python-mpv-0.3.10/README.rst    2019-11-10 16:31:28.000000000 +0100
@@ -170,6 +170,50 @@
     win.show()
     sys.exit(app.exec_())
 
+PyGtk embedding
+..............
+
+.. code:: python
+    
+    #!/usr/bin/env python3
+    import gi
+
+    import mpv
+
+    gi.require_version('Gtk', '3.0')
+    from gi.repository import Gtk
+
+
+    class MainClass(Gtk.Window):
+
+        def __init__(self):
+            super(MainClass, self).__init__()
+            self.set_default_size(600, 400)
+            self.connect("destroy", self.on_destroy)
+
+            widget = Gtk.Frame()
+            self.add(widget)
+            self.show_all()
+
+            # Must be created >after< the widget is shown, else property 
'window' will be None
+            self.mpv = 
mpv.MPV(wid=str(widget.get_property("window").get_xid()))
+            self.mpv.play("test.webm")
+
+        def on_destroy(self, widget, data=None):
+            self.mpv.terminate()
+            Gtk.main_quit()
+
+
+    if __name__ == '__main__':
+        application = MainClass()
+        Gtk.main()
+
+Using OpenGL from PyQT
+......................
+
+Github user cosven_ has managed to `make mpv render into a Qt widget using 
OpenGL
+<https://gist.github.com/cosven/b313de2acce1b7e15afda263779c0afc>`__ through 
this python API.
+
 Coding Conventions
 ------------------
 
@@ -179,3 +223,4 @@
 
 .. _`PEP 8`: https://www.python.org/dev/peps/pep-0008/
 .. _`mpv.py`: https://raw.githubusercontent.com/jaseg/python-mpv/master/mpv.py
+.. _cosven: https://github.com/cosven
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-mpv-0.3.9/mpv.py new/python-mpv-0.3.10/mpv.py
--- old/python-mpv-0.3.9/mpv.py 2018-07-25 12:02:23.000000000 +0200
+++ new/python-mpv-0.3.10/mpv.py        2019-11-10 16:31:28.000000000 +0100
@@ -308,7 +308,7 @@
 WakeupCallback = CFUNCTYPE(None, c_void_p)
 
 OpenGlCbUpdateFn = CFUNCTYPE(None, c_void_p)
-OpenGlCbGetProcAddrFn = CFUNCTYPE(None, c_void_p, c_char_p)
+OpenGlCbGetProcAddrFn = CFUNCTYPE(c_void_p, c_void_p, c_char_p)
 
 def _handle_func(name, args, restype, errcheck, ctx=MpvHandle):
     func = getattr(backend, name)
@@ -683,7 +683,7 @@
         if res['format'] != 'bgr0':
             raise ValueError('Screenshot in unknown format "{}". Currently, 
only bgr0 is supported.'
                     .format(res['format']))
-        img = Image.frombytes('RGBA', (res['w'], res['h']), res['data'])
+        img = Image.frombytes('RGBA', (res['stride']//4, res['h']), 
res['data'])
         b,g,r,a = img.split()
         return Image.merge('RGB', (r,g,b))
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-mpv-0.3.9/python_mpv.egg-info/PKG-INFO 
new/python-mpv-0.3.10/python_mpv.egg-info/PKG-INFO
--- old/python-mpv-0.3.9/python_mpv.egg-info/PKG-INFO   2018-07-25 
12:08:50.000000000 +0200
+++ new/python-mpv-0.3.10/python_mpv.egg-info/PKG-INFO  2019-11-10 
16:33:36.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: python-mpv
-Version: 0.3.9
+Version: 0.3.10
 Summary: A python interface to the mpv media player
 Home-page: https://github.com/jaseg/python-mpv
 Author: jaseg
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-mpv-0.3.9/setup.py 
new/python-mpv-0.3.10/setup.py
--- old/python-mpv-0.3.9/setup.py       2018-07-25 12:07:26.000000000 +0200
+++ new/python-mpv-0.3.10/setup.py      2019-11-10 16:31:56.000000000 +0100
@@ -3,7 +3,7 @@
 from setuptools import setup
 setup(
     name = 'python-mpv',
-    version = '0.3.9',
+    version = '0.3.10',
     py_modules = ['mpv'],
     description = 'A python interface to the mpv media player',
     url = 'https://github.com/jaseg/python-mpv',


Reply via email to