Hello community,

here is the log from the commit of package python-python-vlc for 
openSUSE:Factory checked in at 2020-04-29 20:53:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-python-vlc (Old)
 and      /work/SRC/openSUSE:Factory/.python-python-vlc.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-python-vlc"

Wed Apr 29 20:53:45 2020 rev:7 rq:798932 version:3.0.9113

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-python-vlc/python-python-vlc.changes      
2019-08-05 10:42:18.219292471 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-python-vlc.new.2738/python-python-vlc.changes
    2020-04-29 20:54:49.521333636 +0200
@@ -1,0 +2,5 @@
+Wed Apr 29 13:34:40 UTC 2020 - Luigi Baldoni <aloi...@gmx.com>
+
+- Update to version 3.0.9113 (no changelog supplied)
+
+-------------------------------------------------------------------

Old:
----
  python-vlc-3.0.7110.tar.gz

New:
----
  python-vlc-3.0.9113.tar.gz

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

Other differences:
------------------
++++++ python-python-vlc.spec ++++++
--- /var/tmp/diff_new_pack.zdXX2A/_old  2020-04-29 20:54:50.173335129 +0200
+++ /var/tmp/diff_new_pack.zdXX2A/_new  2020-04-29 20:54:50.177335139 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-python-vlc
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,9 +16,8 @@
 #
 
 
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-python-vlc
-Version:        3.0.7110
+Version:        3.0.9113
 Release:        0
 Summary:        VLC bindings for python
 License:        LGPL-2.0-or-later
@@ -42,8 +41,7 @@
 (see http://wiki.videolan.org/LibVLC) of the VLC video player.
 
 %prep
-%setup -q -n python-vlc-%{version}
-%patch0 -p1
+%autosetup -p1 -n python-vlc-%{version}
 sed -i -e '1{\,^#! %{_bindir}/python,d}' vlc.py
 
 %build

++++++ python-vlc-3.0.7110.tar.gz -> python-vlc-3.0.9113.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-vlc-3.0.7110/PKG-INFO 
new/python-vlc-3.0.9113/PKG-INFO
--- old/python-vlc-3.0.7110/PKG-INFO    2019-08-03 20:19:10.000000000 +0200
+++ new/python-vlc-3.0.9113/PKG-INFO    2020-04-29 13:16:27.890426000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: python-vlc
-Version: 3.0.7110
+Version: 3.0.9113
 Summary: VLC bindings for python.
 Home-page: http://wiki.videolan.org/PythonBinding
 Author: Olivier Aubert
@@ -14,7 +14,7 @@
               player. Note that it relies on an already present install of VLC.
         
               It has been automatically generated from the include files of
-              vlc 3.0.7, using generator 1.10.
+              vlc 3.0.9, using generator 1.13.
               
 Keywords: vlc,video
 Platform: UNKNOWN
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-vlc-3.0.7110/examples/cocoavlc.py 
new/python-vlc-3.0.9113/examples/cocoavlc.py
--- old/python-vlc-3.0.7110/examples/cocoavlc.py        2019-02-24 
16:16:27.000000000 +0100
+++ new/python-vlc-3.0.9113/examples/cocoavlc.py        2019-11-01 
00:25:50.000000000 +0100
@@ -67,14 +67,14 @@
     from urllib.parse import unquote as mrl_unquote  # Python 3+
 
 __all__  = ('AppVLC',)
-__version__ = '19.01.31'
+__version__ = '19.08.26'
 
 _Adjust  = vlc.VideoAdjustOption  # Enum
 # <http://Wiki.VideoLan.org/Documentation:Modules/adjust>
 _Adjust3 = {_Adjust.Brightness: (0, 1, 2),
             _Adjust.Contrast:   (0, 1, 2),
             _Adjust.Gamma:   (0.01, 1, 10),
-            _Adjust.Hue:        (0, 0, 360),
+            _Adjust.Hue:     (-180, 0, 180),
             _Adjust.Saturation: (0, 1, 3)}
 _Argv0   = os.path.splitext(os.path.basename(__file__))[0]
 _macOS   = platform.mac_ver()[0:3:2]  # PYCHOK false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-vlc-3.0.7110/examples/glsurface.py 
new/python-vlc-3.0.9113/examples/glsurface.py
--- old/python-vlc-3.0.7110/examples/glsurface.py       1970-01-01 
01:00:00.000000000 +0100
+++ new/python-vlc-3.0.9113/examples/glsurface.py       2020-03-03 
16:36:14.000000000 +0100
@@ -0,0 +1,145 @@
+#! /usr/bin/env python3
+
+#
+# GlSurface example code for VLC Python bindings
+# Copyright (C) 2020 Daniƫl van Adrichem <daniel...@spiet.nl>
+
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+#
+
+"""VLC GlSurface example
+"""
+
+import time
+import ctypes
+from threading import Lock
+
+import numpy as np
+from OpenGL.GL import (GL_TEXTURE_2D, glTexSubImage2D, glTexImage2D,
+                       GL_BGR, GL_RGB,
+                       GL_UNSIGNED_BYTE)
+import vlc
+
+class Surface(object):
+    """A lockable image buffer
+    """
+    def __init__(self, w, h):
+        self._width = w
+        self._height = h
+
+        # size in bytes when RV32 *4 or RV24 * 3
+        self._row_size = self._width * 3
+        self._buf_size = self._height * self._row_size
+        # allocate buffer
+        self._buf1 = np.zeros(self._buf_size, dtype=np.ubyte)
+        # get pointer to buffer
+        self._buf_p = self._buf1.ctypes.data_as(ctypes.c_void_p)
+        self._lock = Lock()
+
+    def update_gl(self):
+        # with self._lock:
+        glTexSubImage2D(GL_TEXTURE_2D,
+                        0, 0, 0,
+                        self._width,
+                        self._height,
+                        GL_BGR,
+                        GL_UNSIGNED_BYTE,
+                        self._buf1)
+
+    def create_texture_gl(self):
+        glTexImage2D(GL_TEXTURE_2D,
+                     0,
+                     GL_RGB,
+                     self._width,  # width
+                     self._height,  # height
+                     0,
+                     GL_BGR,
+                     GL_UNSIGNED_BYTE,
+                     None)
+
+    @property
+    def width(self):
+        return self._width
+
+    @property
+    def height(self):
+        return self._height
+
+    @property
+    def row_size(self):
+        return self._row_size
+
+    @property
+    def buf(self):
+        return self._buf1
+
+    @property
+    def buf_pointer(self):
+        return self._buf_p
+
+    def lock(self):
+        self._lock.acquire()
+
+    def unlock(self):
+        self._lock.release()
+
+    def __enter__(self, *args):
+        return self._lock.__enter__(*args)
+
+    def __exit__(self, *args):
+        return self._lock.__exit__(*args)
+
+    def get_libvlc_lock_callback(self):
+        @vlc.VideoLockCb
+        def _cb(opaque, planes):
+            self._lock.acquire()
+            planes[0] = self._buf_p
+
+        return _cb
+
+    def get_libvlc_unlock_callback(self):
+        @vlc.VideoUnlockCb
+        def _cb(opaque, picta, planes):
+            self._lock.release()
+
+        return _cb
+
+if __name__ == '__main__':
+    import sys
+    player = vlc.MediaPlayer(sys.argv[1])
+    # play and stop so video_get_size gets a correct value
+    # setting all callbacks to None prevents a window being created on play
+    player.video_set_callbacks(None, None, None, None)
+    # play and stop so video_get_size gets a correct value
+    player.play()
+    time.sleep(1)
+    player.stop()
+    w, h = player.video_get_size()
+    surface = Surface(w, h)
+    # need to keep a reference to the CFUNCTYPEs or else it will get GCed
+    _lock_cb = surface.get_libvlc_lock_callback()
+    _unlock_cb = surface.get_libvlc_unlock_callback()
+    player.video_set_callbacks(_lock_cb, _unlock_cb, None, None)
+    player.video_set_format(
+        "RV24",
+        surface.width,
+        surface.height,
+        surface.row_size)
+    # this starts populating the surface's buf with pixels, from another thread
+    player.play()
+    # in main thread, where gl context is current:
+    # FIXME: add some code to embed the surface + a mainloop
+    # v.surface.update_gl()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-vlc-3.0.7110/examples/glsurface.py~ 
new/python-vlc-3.0.9113/examples/glsurface.py~
--- old/python-vlc-3.0.7110/examples/glsurface.py~      1970-01-01 
01:00:00.000000000 +0100
+++ new/python-vlc-3.0.9113/examples/glsurface.py~      2020-03-03 
16:30:47.000000000 +0100
@@ -0,0 +1,130 @@
+import logging
+import time
+import ctypes
+from threading import Lock
+
+import numpy as np
+from OpenGL.GL import (
+    GL_TEXTURE_2D, glTexSubImage2D, glTexImage2D,
+    GL_BGRA, GL_RGBA, GL_BGR, GL_RGB,
+    GL_UNSIGNED_BYTE)
+import vlc
+
+# patched ctypes func definitions because ones provided in vlc.py are incorrect
+_CorrectVideoLockCb = ctypes.CFUNCTYPE(ctypes.c_void_p, ctypes.c_void_p, 
ctypes.POINTER(ctypes.c_void_p))
+_CorrectVideoUnlockCb = ctypes.CFUNCTYPE(
+    ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p, 
ctypes.POINTER(ctypes.c_void_p))
+
+
+class Surface(object):
+    """A lockable image buffer
+    """
+    def __init__(self, w, h):
+        self._width = w
+        self._height = h
+
+        # size in bytes when RV32 *4 or RV24 * 3
+        self._row_size = self._width * 3
+        self._buf_size = self._height * self._row_size
+        # allocate buffer
+        self._buf1 = np.zeros(self._buf_size, dtype=np.ubyte)
+        # get pointer to buffer
+        self._buf_p = self._buf1.ctypes.data_as(ctypes.c_void_p)
+        self._lock = Lock()
+        _log.debug(self.buf_pointer)
+        _log.debug(self.buf)
+
+    def update_gl(self):
+        # with self._lock:
+        glTexSubImage2D(GL_TEXTURE_2D,
+                        0, 0, 0,
+                        self._width,
+                        self._height,
+                        GL_BGR,
+                        GL_UNSIGNED_BYTE,
+                        self._buf1)
+
+    def create_texture_gl(self):
+        glTexImage2D(GL_TEXTURE_2D,
+                     0,
+                     GL_RGB,
+                     self._width,  # width
+                     self._height,  # height
+                     0,
+                     GL_BGR,
+                     GL_UNSIGNED_BYTE,
+                     None)
+
+    @property
+    def width(self):
+        return self._width
+
+    @property
+    def height(self):
+        return self._height
+
+    @property
+    def row_size(self):
+        return self._row_size
+
+    @property
+    def buf(self):
+        return self._buf1
+
+    @property
+    def buf_pointer(self):
+        return self._buf_p
+
+    def lock(self):
+        self._lock.acquire()
+
+    def unlock(self):
+        self._lock.release()
+
+    def __enter__(self, *args):
+        return self._lock.__enter__(*args)
+
+    def __exit__(self, *args):
+        return self._lock.__exit__(*args)
+
+    def get_libvlc_lock_callback(self):
+        @_CorrectVideoLockCb
+        def _cb(opaque, planes):
+            self._lock.acquire()
+            planes[0] = self._buf_p
+
+        return _cb
+
+    def get_libvlc_unlock_callback(self):
+        @_CorrectVideoUnlockCb
+        def _cb(opaque, picta, planes):
+            self._lock.release()
+
+        return _cb
+
+# I use this surface with something like:
+"""
+self.player = vlc.MediaPlayer(url)
+# play and stop so video_get_size gets a correct value
+# setting all callbacks to None prevents a window being created on play
+self.player.video_set_callbacks(None, None, None, None)
+# play and stop so video_get_size gets a correct value
+self.player.play()
+time.sleep(1)
+self.player.stop()
+w, h = self.player.video_get_size()
+self.surface = Surface(w, h)
+# need to keep a reference to the CFUNCTYPEs or else it will get GCed
+self._lock_cb = self.surface.get_libvlc_lock_callback()
+self._unlock_cb = self.surface.get_libvlc_unlock_callback()
+self.player.video_set_callbacks(self._lock_cb, self._unlock_cb, None, None)
+self.player.video_set_format(
+            "RV24",
+            self.surface.width,
+            self.surface.height,
+            self.surface.row_size)
+# this starts populating the surface's buf with pixels, from another thread
+self.player.play()
+# in main thread, where gl context is current:
+self.v.surface.update_gl()
+"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-vlc-3.0.7110/examples/gtkvlc.py 
new/python-vlc-3.0.9113/examples/gtkvlc.py
--- old/python-vlc-3.0.7110/examples/gtkvlc.py  2017-04-10 12:16:43.000000000 
+0200
+++ new/python-vlc-3.0.9113/examples/gtkvlc.py  2019-11-01 00:21:02.000000000 
+0100
@@ -40,6 +40,7 @@
 Gdk.threads_init ()
 
 import sys
+import ctypes
 import vlc
 
 from gettext import gettext as _
@@ -51,6 +52,16 @@
 else:
     instance = vlc.Instance()
 
+
+def get_window_pointer(window):
+    """ Use the window.__gpointer__ PyCapsule to get the C void* pointer to 
the window
+    """
+    # get the c gpointer of the gdk window
+    ctypes.pythonapi.PyCapsule_GetPointer.restype = ctypes.c_void_p
+    ctypes.pythonapi.PyCapsule_GetPointer.argtypes = [ctypes.py_object]
+    return ctypes.pythonapi.PyCapsule_GetPointer(window.__gpointer__, None)
+
+
 class VLCWidget(Gtk.DrawingArea):
     """Simple VLC widget.
 
@@ -64,7 +75,16 @@
         self.player = instance.media_player_new()
         def handle_embed(*args):
             if sys.platform == 'win32':
-                self.player.set_hwnd(self.get_window().get_handle())
+                # get the win32 handle
+                gdkdll = ctypes.CDLL('libgdk-3-0.dll')
+                handle = 
gdkdll.gdk_win32_window_get_handle(get_window_pointer(self.get_window()))
+                self.player.set_hwnd(handle)
+            elif sys.platform == 'darwin':
+                # get the nsview pointer. NB need to manually specify function 
signature
+                gdkdll = ctypes.CDLL('libgdk-3.0.dll')
+                get_nsview = gdkdll.gdk_quaerz_window_get_nsview
+                get_nsview.restype, get_nsview.argtypes = [ctypes.c_void_p],  
ctypes.c_void_p
+                
self.player.set_nsobject(get_nsview(get_window_pointer(self.get_window())))
             else:
                 self.player.set_xwindow(self.get_window().get_xid())
             return True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-vlc-3.0.7110/examples/pyobjcvlc.py 
new/python-vlc-3.0.9113/examples/pyobjcvlc.py
--- old/python-vlc-3.0.7110/examples/pyobjcvlc.py       1970-01-01 
01:00:00.000000000 +0100
+++ new/python-vlc-3.0.9113/examples/pyobjcvlc.py       2019-10-27 
20:13:08.000000000 +0100
@@ -0,0 +1,424 @@
+
+# -*- coding: utf-8 -*-
+
+# License at the end of this file.  This module is equivalent to
+# PyCocoa/test/simple_VLCplayer.py but based on PyObjC instead
+# of PyCocoa <https://PyPI.org/project/PyCocoa>.  Until macOS
+# release Catalina, macOS' Python includes PyObjC.
+
+# See also a more comprehensive VLC player example cocoavlc.py
+# <https://GitHub.com/oaubert/python-vlc/tree/master/examples>
+
+# This VLC player has only been tested with VLC 2.2.8 and 3.0.8,
+# and a compatible vlc.py <https://PyPI.org/project/Python-VLC>
+# binding using Python 2.7.10 with macOS' PyObjC 2.5.1 and Python
+# 3.7.4 with PyObjC 5.2b1 on macOS 10.13.6 High Sierra or 10.14.6
+# Mojave, all in 64-bit only.  This player has not been tested
+# on iOS, nor with PyPy and Intel(R) Python.
+
+from os.path import basename  # PYCHOK expected
+from platform import architecture, mac_ver  # PYCHOK false
+import sys
+
+_argv0 = basename(__file__)
+if not sys.platform.startswith('darwin'):
+    raise ImportError('%s only supported on %s' % (_argv0, 'macOS'))
+
+class _ImportError(ImportError):  # PYCHOK expected
+    def __init__(self, package, PyPI):
+        PyPI = '<https://PyPI.org/project/%s>' % (PyPI,)
+        t = 'no module %s, see %s' % (package, PyPI)
+        ImportError.__init__(self, t)
+
+try:  # PYCHOK expected
+    from objc import __version__ as __PyObjC__
+except ImportError:
+    raise _ImportError('objc', 'PyObjC')
+
+# the imports listed explicitly to help PyChecker
+from Cocoa import NSAlternateKeyMask, NSApplication, \
+                  NSBackingStoreBuffered, NSBundle, \
+                  NSCommandKeyMask, NSControlKeyMask, \
+                  NSMakeRect, NSMenu, NSMenuItem, \
+                  NSObject, \
+                  NSScreen, NSShiftKeyMask, NSSize, \
+                  NSView, NSWindow
+try:
+    from Cocoa import NSWindowStyleMaskClosable, 
NSWindowStyleMaskMiniaturizable, \
+                      NSWindowStyleMaskResizable, NSWindowStyleMaskTitled
+except ImportError:  # previously, NSWindowStyleMaskXxx was named 
NSXxxWindowMask
+    from Cocoa import NSClosableWindowMask as NSWindowStyleMaskClosable, \
+                      NSMiniaturizableWindowMask as 
NSWindowStyleMaskMiniaturizable, \
+                      NSResizableWindowMask as NSWindowStyleMaskResizable, \
+                      NSTitledWindowMask as NSWindowStyleMaskTitled
+
+NSStr = bytes if sys.version_info.major < 3 else str
+NSWindowStyleMaskUsual = NSWindowStyleMaskClosable | 
NSWindowStyleMaskMiniaturizable \
+                       | NSWindowStyleMaskResizable | NSWindowStyleMaskTitled
+
+__all__  = ('simpleVLCplay',)
+__version__ = '19.09.27'
+
+
+try:  # all imports listed explicitly to help PyChecker
+    from math import gcd  # Python 3+
+except ImportError:
+    try:
+        from fractions import gcd  # Python 2-
+    except ImportError:
+
+        def gcd(a, b):
+            a, b = abs(a), abs(b)
+            if a < b:
+                a, b = b, a
+            while b:
+                a, b = b, (a % b)
+            return a
+
+
+def mspf(fps):
+    '''Convert frames per second to frame length in millisecs.
+    '''
+    return 1000.0 / (fps or 25)
+
+
+def nsBundleRename(title, match='Python'):
+    '''Change the bundle title if the current title matches.
+
+       @param title: New bundle title (C{str}).
+       @keyword match: Optional, previous title to match (C{str}).
+
+       @return: The previous bundle title (C{str}) or None.
+
+       @note: Used to mimick C{NSApplication.setTitle_(ns_title)},
+              the application name shown in the menu bar.
+    '''
+    # <https://Developer.Apple.com/documentation/
+    #        foundation/nsbundle/1495012-bundlewithpath>
+    # ns = NSBundle.bundleWithPath_(os.path.abspath(match))
+    p, ns = None, NSBundle.mainBundle()
+    if ns:
+        ns = ns.localizedInfoDictionary() or ns.infoDictionary()
+        if ns:
+            k = NSStr('CFBundleName')
+            p = ns.objectForKey_(k) or None
+            if title and match in (p, '', None):  # can't be empty
+                ns.setObject_forKey_(NSStr(title), k)
+    return p
+
+
+def printf(fmt, *args, **kwds):  # argv0='', nl=0, nt=0
+    '''Formatted print I{fmt % args} with optional keywords.
+
+       @param fmt: Print-like format (C{str}).
+       @param args: Optional arguments to include (I{all positional}).
+       @keyword argv0: Optional prefix (C{str}).
+       @keyword nl: Number of leading blank lines (C{int}).
+       @keyword nt: Number of trailing blank lines (C{int}).
+    '''
+    a = kwds.get('argv0', _argv0)
+    t = (fmt % args) if args else fmt
+    nl = '\n' * kwds.get('nl', 0)
+    nt = '\n' * kwds.get('nt', 0)
+    print(''.join((nl, a, ' ', t, nt)))
+
+
+def terminating(app, timeout):
+    '''Terminate C{app} after C{timeout} seconds.
+
+       @param app: The application (C{NSApplication} instance).
+       @patam timeout: Time in seconds (C{float}).
+    '''
+    try:
+        secs = float(timeout)
+    except (TypeError, ValueError):
+        secs = 0
+
+    if secs > 0:
+        from threading import Thread
+
+        def _t():
+            from time import sleep
+
+            sleep(secs + 0.5)
+            app.terminate_()
+
+        Thread(target=_t).start()
+
+
+class _NSDelegate(NSObject):
+    '''(INTERNAL) Delegate for NSApplication and NSWindow,
+        handling PyObjC events, notifications and callbacks.
+    '''
+    app    = None  # NSApplication
+    NSItem = None  # NSMenuItem
+    player = None  # vlc.MediaPlayer
+    ratio  = 2     # aspect_ratio calls
+    title  = ''    # top-level menu title
+    video  = None  # video file name
+    window = None  # main NSWindow
+
+    def applicationDidFinishLaunching_(self, notification):
+
+        # the VLC player needs an NSView object
+        self.window, view = _Window2(title=self.video or self.title)
+        # set the window's delegate to the app's to
+        # make method .windowWillClose_ work, see
+        # <https://Gist.GitHub.com/kaloprominat/6105220>
+        self.window.setDelegate_(self)
+        # pass viewable to VLC player, see PyObjC Generated types ...
+        # <https://PyObjC.ReadTheDocs.io/en/latest/core/type-wrapper.html>
+        self.player.set_nsobject(view.__c_void_p__())
+
+        menu = NSMenu.alloc().init()  # create main menu
+        menu.addItem_(_MenuItem('Full ' + 'Screen', 'enterFullScreenMode:', 
'f', ctrl=True))  # Ctrl-Cmd-F, Esc to exit
+        menu.addItem_(_MenuItem('Info', 'info:', 'i'))
+
+        menu.addItem_(_MenuItemSeparator())
+        self.NSitem = _MenuItem('Pause', 'toggle:', 'p', ctrl=True)  # 
Ctrl-Cmd-P
+        menu.addItem_(self.NSitem)
+        menu.addItem_(_MenuItem('Rewind', 'rewind:', 'r', ctrl=True))  # 
Ctrl-Cmd-R
+
+        menu.addItem_(_MenuItemSeparator())
+        menu.addItem_(_MenuItem('Hide ' + self.title, 'hide:', 'h'))  # Cmd-H, 
implied
+        menu.addItem_(_MenuItem('Hide Others', 'hideOtherApplications:', 'h', 
alt=True))  # Alt-Cmd-H
+        menu.addItem_(_MenuItem('Show All', 'unhideAllApplications:'))  # no 
key
+
+        menu.addItem_(_MenuItemSeparator())
+        menu.addItem_(_MenuItem('Quit ' + self.title, 'terminate:', 'q'))  # 
Cmd-Q
+
+        subMenu = NSMenuItem.alloc().init()
+        subMenu.setSubmenu_(menu)
+
+        menuBar = NSMenu.alloc().init()
+        menuBar.addItem_(subMenu)
+        self.app.setMainMenu_(menuBar)
+
+        self.player.play()
+        # adjust the contents' aspect ratio
+        self.windowDidResize_(None)
+
+    def info_(self, notification):
+        try:
+            p = self.player
+            if p.is_playing():
+                p.pause()
+            m = p.get_media()
+            v = sys.modules[p.__class__.__module__]  # import vlc
+            b = v.bytes_to_str
+
+            printf(__version__, nl=1)
+            # print Python, vlc, libVLC, media info
+            printf('PyObjC %s', __PyObjC__, nl=1)
+            printf('Python %s %s', sys.version.split()[0], architecture()[0])
+            printf('macOS %s', ' '.join(mac_ver()[0:3:2]), nt=1)
+
+            printf('vlc.py %s (%#x)', v.__version__, v.hex_version())
+            printf('built: %s', v.build_date)
+
+            printf('libVLC %s (%#x)', b(v.libvlc_get_version()), 
v.libvlc_hex_version())
+            printf('libVLC %s', b(v.libvlc_get_compiler()), nt=1)
+
+            printf('media: %s', b(m.get_mrl()))
+            printf('state: %s', p.get_state())
+
+            printf('track/count: %s/%s', p.video_get_track(), 
p.video_get_track_count())
+            printf('time/duration: %s/%s ms', p.get_time(), m.get_duration())
+            printf('position/length: %.2f%%/%s ms', p.get_position() * 100.0, 
p.get_length())
+            f = p.get_fps()
+            printf('fps: %.3f (%.3f ms)', f, mspf(f))
+            printf('rate: %s', p.get_rate())
+
+            w, h = p.video_get_size(0)
+            printf('video size: %sx%s', w, h)
+            r = gcd(w, h) or ''
+            if r and w and h:
+                r = ' (%s:%s)' % (w // r, h // r)
+            printf('aspect ratio: %s%s', p.video_get_aspect_ratio(), r)
+
+            printf('scale: %.3f', p.video_get_scale())
+            o = p.get_nsobject()  # for macOS only
+            printf('nsobject: %r (%#x)', o, o, nt=1)
+        except Exception as x:
+            printf('%r', x, nl=1, nt=1)
+
+    def rewind_(self, notification):
+        self.player.set_position(0.0)
+        # can't re-play once at the end
+        # self.player.play()
+
+    def toggle_(self, notification):
+        # toggle between Pause and Play
+        if self.player.is_playing():
+            # note, .pause() pauses and un-pauses the video,
+            # .stop() stops the video and blanks the window
+            self.player.pause()
+            t = 'Play'
+        else:
+            self.player.play()
+            t = 'Pause'
+        self.NSitem.setTitle_(NSStr(t))
+
+    def windowDidResize_(self, notification):
+        if self.window and self.ratio:
+            # get and maintain the aspect ratio
+            # (the first player.video_get_size()
+            #  call returns (0, 0), subsequent
+            #  calls return (w, h) correctly)
+            w, h = self.player.video_get_size(0)
+            r = gcd(w, h)
+            if r and w and h:
+                r = NSSize(w // r , h // r)
+                self.window.setContentAspectRatio_(r)
+                self.ratio -= 1
+
+    def windowWillClose_(self, notification):
+        self.app.terminate_(self)
+
+
+def _MenuItem(label, action=None, key='', alt=False, cmd=True, ctrl=False, 
shift=False):
+    '''New NS menu item with action and optional shortcut key.
+    '''
+    # 
<http://Developer.Apple.com/documentation/appkit/nsmenuitem/1514858-initwithtitle>
+    ns = NSMenuItem.alloc().initWithTitle_action_keyEquivalent_(
+                            NSStr(label), NSStr(action), NSStr(key))
+    if key:
+        mask = 0
+        if alt:
+            mask |= NSAlternateKeyMask
+        if cmd:
+            mask |= NSCommandKeyMask
+        if ctrl:
+            mask |= NSControlKeyMask
+        if shift:
+            mask |= NSShiftKeyMask  # NSAlphaShiftKeyMask
+        if mask:
+            ns.setKeyEquivalentModifierMask_(mask)
+    return ns
+
+
+def _MenuItemSeparator():
+    '''A menu separator item.
+    '''
+    return NSMenuItem.separatorItem()
+
+
+def _Window2(title=_argv0, fraction=0.5):
+    '''Create the main NS window and the drawable NS view.
+    '''
+    frame = NSScreen.mainScreen().frame()
+    if 0.1 < fraction < 1.0:
+        # use the lower left quarter of the screen size as frame
+        w = int(frame.size.width * fraction + 0.5)
+        h = int(frame.size.height * w / frame.size.width)
+        frame = NSMakeRect(frame.origin.x + 10, frame.origin.y + 10, w, h)
+
+    window = NSWindow.alloc().initWithContentRect_styleMask_backing_defer_(
+                              frame,
+                              NSWindowStyleMaskUsual,
+                              NSBackingStoreBuffered,
+                              False)  # or 0
+    window.setTitle_(NSStr(title))
+
+    # create the drawable_nsobject NSView for vlc.py, see 
vlc.MediaPlayer.set_nsobject()
+    # for an alternate NSView object with protocol VLCOpenGLVideoViewEmbedding
+    # 
<http://StackOverflow.com/questions/11562587/create-nsview-directly-from-code>
+    # 
<http://GitHub.com/ariabuckles/pyobjc-framework-Cocoa/blob/master/Examples/AppKit/DotView/DotView.py>
+    view = NSView.alloc().initWithFrame_(frame)
+    window.setContentView_(view)
+    # force the video/window aspect ratio, adjusted
+    # above when the window is/has been resized
+    window.setContentAspectRatio_(frame.size)
+
+    window.makeKeyAndOrderFront_(None)
+    return window, view
+
+
+def simpleVLCplay(player, title=_argv0, video='', timeout=None):
+    '''Create a minimal NS application, drawable window and basic menu
+       for the given VLC player (with media) and start the player.
+
+       @note: This function never returns, but the VLC player and
+              other Python thread(s) do run.
+    '''
+    if not player:
+        raise ValueError('%s invalid: %r' % ('player', player))
+
+    app = NSApplication.sharedApplication()
+    nsBundleRename(NSStr(title))  # top-level menu title
+
+    dlg = _NSDelegate.alloc().init()
+    dlg.app = app
+    dlg.player = player
+    dlg.title = title or _argv0
+    dlg.video = video or basename(player.get_media().get_mrl())
+    app.setDelegate_(dlg)
+
+    terminating(app, timeout)
+    app.run()  # never returns
+
+
+if __name__ == '__main__':
+
+    try:
+        import vlc
+    except ImportError:
+        raise _ImportError('vlc', 'Python-VLC')
+
+    _argv0 = _name = basename(sys.argv[0])
+    _timeout = None
+
+    args = sys.argv[1:]
+    while args and args[0].startswith('-'):
+        o = args.pop(0)
+        t = o.lower()
+        if t in ('-h', '--help'):
+            printf('usage:  [-h|--help]  [-name "%s"]  [-timeout <secs>]  %s',
+                   _name, '<video_file_name>')
+            sys.exit(0)
+        elif args and len(t) > 1 and '-name'.startswith(t):
+            _name = args.pop(0)
+        elif args and len(t) > 1 and '-timeout'.startswith(t):
+            _timeout = args.pop(0)
+        elif t in ('-v', '--version'):
+            print('%s: %s (%s %s)' % (basename(__file__), __version__,
+                                      'PyObjC', __PyObjC__))
+            try:
+                vlc.print_version()
+                vlc.print_python()
+            except AttributeError:
+                pass
+            sys.exit(0)
+        else:
+            printf('invalid option: %s', o)
+            sys.exit(1)
+
+    if not args:
+        printf('missing %s', '<video_file_name>')
+        sys.exit(1)
+
+    # create a VLC player and play the video
+    p = vlc.MediaPlayer(args.pop(0))
+    simpleVLCplay(p, title=_name, timeout=_timeout)  # never returns
+
+# MIT License <http://OpenSource.org/licenses/MIT>
+#
+# Copyright (C) 2017-2020 -- mrJean1 at Gmail -- All Rights Reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+# OTHER DEALINGS IN THE SOFTWARE.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-vlc-3.0.7110/examples/pyqt5vlc.py 
new/python-vlc-3.0.9113/examples/pyqt5vlc.py
--- old/python-vlc-3.0.7110/examples/pyqt5vlc.py        2019-01-30 
23:28:49.000000000 +0100
+++ new/python-vlc-3.0.9113/examples/pyqt5vlc.py        2020-04-29 
13:11:50.000000000 +0200
@@ -1,3 +1,21 @@
+#
+# PyQt5 example for VLC Python bindings
+# Copyright (C) 2009-2010 the VideoLAN team
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+#
 """
 A simple example for VLC python bindings using PyQt5.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-vlc-3.0.7110/examples/video_sync/README.md 
new/python-vlc-3.0.9113/examples/video_sync/README.md
--- old/python-vlc-3.0.7110/examples/video_sync/README.md       2019-01-30 
23:28:49.000000000 +0100
+++ new/python-vlc-3.0.9113/examples/video_sync/README.md       2020-04-29 
13:11:50.000000000 +0200
@@ -1,6 +1,6 @@
 ## Video Synchronization with python-vlc
 
-<img src="figure.png" width="500" align="right">
+<img src="figure.png" width="600" align="center">
 
 Each video player is launched as a separate process. `main.py` is the entry 
point into the program. It creates the "main" video player with all of its 
respective controls. The main video player is started alongside a multithreaded 
server that "broadcasts" signals (e.g. play, pause, stop, and etc.) and the 
current time of the video player, to all client/slave videos. Specifically, 
this is accomplished by putting the current time or the signal of the main 
video player into a `queue` (FIFO). The multithreaded server gets the value 
from the queue and sends the value to each connected client.
 
@@ -8,4 +8,4 @@
 
 In order to facilitate interprocess communication, UNIX domain sockets are 
used to send and receive data. For the time being, Windows users have to use 
TCP/IP sockets.
 
-Note: for the sake of clarity, the figure on the right only shows the case of 
3 client/slave videos.
+Note: for the sake of clarity, the figure only shows the case of 3 
client/slave videos.
Binary files old/python-vlc-3.0.7110/examples/video_sync/figure.png and 
new/python-vlc-3.0.9113/examples/video_sync/figure.png differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-vlc-3.0.7110/examples/video_sync/network.py 
new/python-vlc-3.0.9113/examples/video_sync/network.py
--- old/python-vlc-3.0.7110/examples/video_sync/network.py      2019-01-30 
23:28:49.000000000 +0100
+++ new/python-vlc-3.0.9113/examples/video_sync/network.py      2020-04-29 
13:11:50.000000000 +0200
@@ -27,8 +27,9 @@
 import os
 import platform
 import socket
-import threading
 import sys
+import struct
+import threading
 import logging
 from concurrent import futures
 
@@ -104,11 +105,13 @@
 
     def data_sender(self):
         while True:
-            data = "{},".format(self.data_queue.get())
+            data = self.data_queue.get()
+            data = str(data).encode()
+            msg = struct.pack(">I", len(data)) + data
 
             with futures.ThreadPoolExecutor(max_workers=5) as ex:
                 for client in self.clients:
-                    ex.submit(self.sendall, client, data.encode())
+                    ex.submit(self.sendall, client, msg)
 
     def sendall(self, client, data):
         """Wraps socket module's `sendall` function"""
@@ -153,22 +156,42 @@
         thread.daemon = True
         thread.start()
 
+    def recv_all(self, size):
+        """Helper function to recv `size` number of bytes, or return False"""
+        data = bytearray()
+
+        while (len(data) < size):
+            packet = self.sock.recv(size - len(data))
+            if not packet:
+                return False
+
+            data.extend(packet)
+
+        return data
+
+    def recv_msg(self):
+        """Receive the message size, n, and receive n bytes into a buffer"""
+        raw_msg_size = self.recv_all(4)
+        if not raw_msg_size:
+            return False
+
+        msg_size = struct.unpack(">I", raw_msg_size)[0]
+        return self.recv_all(msg_size)
+
     def data_receiver(self):
         """Handles receiving, parsing, and queueing data"""
         logger.info("New data receiver thread started.")
 
         try:
             while True:
-                data = self.sock.recv(4096)
-                if data:
-                    data = data.decode()
-
-                    for char in data.split(','):
-                        if char:
-                            if char == 'd':
-                                self.data_queue.queue.clear()
-                            else:
-                                self.data_queue.put(char)
+                raw_data = self.recv_msg()
+                if raw_data:
+                    data = raw_data.decode()
+                    if 'd' in set(data):
+                        self.data_queue.queue.clear()
+                        continue
+                    else:
+                        self.data_queue.put(data)
         except:
             logger.exception("Closing socket: %s", self.sock)
             self.sock.close()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-vlc-3.0.7110/python_vlc.egg-info/PKG-INFO 
new/python-vlc-3.0.9113/python_vlc.egg-info/PKG-INFO
--- old/python-vlc-3.0.7110/python_vlc.egg-info/PKG-INFO        2019-08-03 
20:19:10.000000000 +0200
+++ new/python-vlc-3.0.9113/python_vlc.egg-info/PKG-INFO        2020-04-29 
13:16:27.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: python-vlc
-Version: 3.0.7110
+Version: 3.0.9113
 Summary: VLC bindings for python.
 Home-page: http://wiki.videolan.org/PythonBinding
 Author: Olivier Aubert
@@ -14,7 +14,7 @@
               player. Note that it relies on an already present install of VLC.
         
               It has been automatically generated from the include files of
-              vlc 3.0.7, using generator 1.10.
+              vlc 3.0.9, using generator 1.13.
               
 Keywords: vlc,video
 Platform: UNKNOWN
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-vlc-3.0.7110/python_vlc.egg-info/SOURCES.txt 
new/python-vlc-3.0.9113/python_vlc.egg-info/SOURCES.txt
--- old/python-vlc-3.0.7110/python_vlc.egg-info/SOURCES.txt     2019-08-03 
20:19:10.000000000 +0200
+++ new/python-vlc-3.0.9113/python_vlc.egg-info/SOURCES.txt     2020-04-29 
13:16:27.000000000 +0200
@@ -5,8 +5,11 @@
 setup.py
 vlc.py
 examples/cocoavlc.py
+examples/glsurface.py
+examples/glsurface.py~
 examples/gtk2vlc.py
 examples/gtkvlc.py
+examples/pyobjcvlc.py
 examples/pyqt5vlc.py
 examples/qtvlc.py
 examples/tkvlc.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-vlc-3.0.7110/setup.py 
new/python-vlc-3.0.9113/setup.py
--- old/python-vlc-3.0.7110/setup.py    2019-08-03 20:18:29.000000000 +0200
+++ new/python-vlc-3.0.9113/setup.py    2020-04-29 13:14:12.000000000 +0200
@@ -4,7 +4,7 @@
 from setuptools import setup
 
 setup(name='python-vlc',
-      version = '3.0.7110',
+      version = '3.0.9113',
       author='Olivier Aubert',
       author_email='cont...@olivieraubert.net',
       maintainer='Olivier Aubert',
@@ -35,5 +35,5 @@
       player. Note that it relies on an already present install of VLC.
 
       It has been automatically generated from the include files of
-      vlc 3.0.7, using generator 1.10.
+      vlc 3.0.9, using generator 1.13.
       """)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-vlc-3.0.7110/vlc.py 
new/python-vlc-3.0.9113/vlc.py
--- old/python-vlc-3.0.7110/vlc.py      2019-08-03 20:13:06.000000000 +0200
+++ new/python-vlc-3.0.9113/vlc.py      2020-04-29 13:13:52.000000000 +0200
@@ -52,10 +52,10 @@
 import logging
 logger = logging.getLogger(__name__)
 
-__version__ = "3.0.7110"
-__libvlc_version__ = "3.0.7"
-__generator_version__ = "1.10"
-build_date  = "Sat Aug  3 20:13:06 2019 3.0.7"
+__version__ = "3.0.9113"
+__libvlc_version__ = "3.0.9"
+__generator_version__ = "1.13"
+build_date  = "Wed Apr 29 13:13:52 2020 3.0.9"
 
 # The libvlc doc states that filenames are expected to be in UTF8, do
 # not rely on sys.getfilesystemencoding() which will be confused,
@@ -157,6 +157,9 @@
                         plugin_path = os.path.dirname(p)
                         break
             if plugin_path is not None:  # try loading
+                 # PyInstaller Windows fix
+                if 'PyInstallerCDLL' in ctypes.CDLL.__name__:
+                    ctypes.windll.kernel32.SetDllDirectoryW(None)
                 p = os.getcwd()
                 os.chdir(plugin_path)
                  # if chdir failed, this will raise an exception
@@ -258,6 +261,15 @@
         _default_instance = Instance()
     return _default_instance
 
+def try_fspath(path):
+    """Try calling os.fspath
+    os.fspath is only available from py3.6
+    """
+    try:
+        return os.fspath(path)
+    except (AttributeError, TypeError):
+        return path
+
 _Cfunctions = {}  # from LibVLC __version__
 _Globals = globals()  # sys.modules[__name__].__dict__
 
@@ -1346,6 +1358,31 @@
         ('MaxFrameAverageLightLevel', ctypes.c_uint16),
         ]
 
+class VideoSetupDeviceCfg(_Cstruct):
+    _fields_ = [
+        ('hardware_decoding', ctypes.c_bool),
+    ]
+
+class VideoSetupDeviceInfo(_Cstruct):
+    # FIXME: this is normally a union for D3D11/D3D9. We only define
+    # the mapping for d3d11 here
+    _fields_ = [
+        ('device_context', ctypes.c_void_p),
+    ]
+
+class VideoRenderCfg(_Cstruct):
+    _fields_ = [
+        ('width', ctypes.c_uint),
+        ('height', ctypes.c_uint),
+        ('bitdepth', ctypes.c_uint),
+        ('full_range', ctypes.c_bool),
+        # FIXME: should be references to enums
+        ('colorspace', ctypes.c_uint),
+        ('primaries', ctypes.c_uint),
+        ('transfer', ctypes.c_uint),
+        ('device', ctypes.c_void_p),
+        ]
+
 # Generated callback definitions #
 class Callback(ctypes.c_void_p):
     """Callback function notification.
@@ -1530,7 +1567,7 @@
         @param fmt: printf() format string (as defined by ISO C11).
         @param args: variable argument list for the format @note Log message 
handlers B{must} be thread-safe. @warning The message context pointer, the 
format string parameters and the variable arguments are only valid until the 
callback returns.
     '''
-    MediaOpenCb = ctypes.CFUNCTYPE(ctypes.c_void_p, ctypes.c_void_p, 
ctypes.POINTER(ctypes.c_void_p), ctypes.POINTER(ctypes.c_uint64))
+    MediaOpenCb = ctypes.CFUNCTYPE(ctypes.POINTER(ctypes.c_int), 
ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p), 
ctypes.POINTER(ctypes.c_uint64))
     MediaOpenCb.__doc__ = '''Callback prototype to open a custom bitstream 
input media.
         The same media item can be opened multiple times. Each time, this 
callback
         is invoked. It should allocate and initialize any instance-specific
@@ -1539,14 +1576,14 @@
         @param opaque: private pointer as passed to 
L{libvlc_media_new_callbacks}().
         @return: datap storage space for a private data pointer, sizep byte 
length of the bitstream or UINT64_MAX if unknown.
     '''
-    MediaReadCb = ctypes.CFUNCTYPE(ctypes.c_void_p, ctypes.c_void_p, 
ctypes.c_char_p, ctypes.c_size_t)
+    MediaReadCb = ctypes.CFUNCTYPE(ctypes.POINTER(ctypes.c_ssize_t), 
ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_size_t)
     MediaReadCb.__doc__ = '''Callback prototype to read data from a custom 
bitstream input media.
         @param opaque: private pointer as set by the @ref libvlc_media_open_cb 
callback.
         @param buf: start address of the buffer to read data into.
         @param len: bytes length of the buffer.
         @return: strictly positive number of bytes read, 0 on end-of-stream, 
or -1 on non-recoverable error @note If no data is immediately available, then 
the callback should sleep. @warning The application is responsible for avoiding 
deadlock situations. In particular, the callback should return an error if 
playback is stopped; if it does not return, then L{libvlc_media_player_stop}() 
will never return.
     '''
-    MediaSeekCb = ctypes.CFUNCTYPE(ctypes.c_void_p, ctypes.c_void_p, 
ctypes.c_uint64)
+    MediaSeekCb = ctypes.CFUNCTYPE(ctypes.POINTER(ctypes.c_int), 
ctypes.c_void_p, ctypes.c_uint64)
     MediaSeekCb.__doc__ = '''Callback prototype to seek a custom bitstream 
input media.
         @param opaque: private pointer as set by the @ref libvlc_media_open_cb 
callback.
         @param offset: absolute byte offset to seek to.
@@ -1556,7 +1593,7 @@
     MediaCloseCb.__doc__ = '''Callback prototype to close a custom bitstream 
input media.
         @param opaque: private pointer as set by the @ref libvlc_media_open_cb 
callback.
     '''
-    VideoLockCb = ctypes.CFUNCTYPE(ctypes.POINTER(ctypes.c_void_p), 
ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p))
+    VideoLockCb = ctypes.CFUNCTYPE(ctypes.c_void_p, ctypes.c_void_p, 
ctypes.POINTER(ctypes.c_void_p))
     VideoLockCb.__doc__ = '''Callback prototype to allocate and lock a picture 
buffer.
         Whenever a new video frame needs to be decoded, the lock callback is
         invoked. Depending on the video chroma, one or three pixel planes of
@@ -1584,7 +1621,7 @@
         @param opaque: private pointer as passed to 
L{libvlc_video_set_callbacks}() [IN].
         @param picture: private pointer returned from the @ref 
libvlc_video_lock_cb callback [IN].
     '''
-    VideoFormatCb = ctypes.CFUNCTYPE(ctypes.c_void_p, 
ctypes.POINTER(ctypes.c_void_p), ctypes.c_char_p, 
ctypes.POINTER(ctypes.c_uint), ctypes.POINTER(ctypes.c_uint), 
ctypes.POINTER(ctypes.c_uint), ctypes.POINTER(ctypes.c_uint))
+    VideoFormatCb = ctypes.CFUNCTYPE(ctypes.POINTER(ctypes.c_uint), 
ctypes.POINTER(ctypes.c_void_p), ctypes.c_char_p, 
ctypes.POINTER(ctypes.c_uint), ctypes.POINTER(ctypes.c_uint), 
ctypes.POINTER(ctypes.c_uint), ctypes.POINTER(ctypes.c_uint))
     VideoFormatCb.__doc__ = '''Callback prototype to configure picture buffers 
format.
         This callback gets the format of the video as output by the video 
decoder
         and the chain of video filters (if any). It can opt to change any 
parameter
@@ -1654,7 +1691,7 @@
         @param volume: software volume (1. = nominal, 0. = mute).
         @param mute: muted flag.
     '''
-    AudioSetupCb = ctypes.CFUNCTYPE(ctypes.c_void_p, 
ctypes.POINTER(ctypes.c_void_p), ctypes.c_char_p, 
ctypes.POINTER(ctypes.c_uint), ctypes.POINTER(ctypes.c_uint))
+    AudioSetupCb = ctypes.CFUNCTYPE(ctypes.POINTER(ctypes.c_int), 
ctypes.POINTER(ctypes.c_void_p), ctypes.c_char_p, 
ctypes.POINTER(ctypes.c_uint), ctypes.POINTER(ctypes.c_uint))
     AudioSetupCb.__doc__ = '''Callback prototype to setup the audio playback.
         This is called when the media player needs to create a new audio 
output.
         @param opaque: pointer to the data pointer passed to 
L{libvlc_audio_set_callbacks}() [IN/OUT].
@@ -1871,7 +1908,7 @@
     def media_player_new(self, uri=None):
         """Create a new MediaPlayer instance.
 
-        @param uri: an optional URI to play in the player.
+        @param uri: an optional URI to play in the player as a str, bytes or 
PathLike object.
         """
         p = libvlc_media_player_new(self)
         if uri:
@@ -1903,8 +1940,10 @@
         Alternatively, options can be added to the media using the
         Media.add_options method (with the same limitation).
 
+        @param mrl: A str, bytes or PathLike object
         @param options: optional media option=value strings
         """
+        mrl = try_fspath(mrl)
         if ':' in mrl and mrl.index(':') > 1:
             # Assume it is a URL
             m = libvlc_media_new_location(self, str_to_bytes(mrl))
@@ -1916,9 +1955,18 @@
         m._instance = self
         return m
 
+    def media_new_path(self, path):
+        """Create a media for a certain file path.
+        See L{media_release}.
+        @param path: A str, byte, or PathLike object representing a local 
filesystem path.
+        @return: the newly created media or None on error.
+        """
+        path = try_fspath(path)
+        return libvlc_media_new_path(self, str_to_bytes(path))
+
     def media_list_new(self, mrls=None):
         """Create a new MediaList instance.
-        @param mrls: optional list of MRL strings
+        @param mrls: optional list of MRL strings, bytes, or PathLike objects.
         """
         l = libvlc_media_list_new(self)
         # We should take the lock, but since we did not leak the
@@ -2313,15 +2361,6 @@
         return libvlc_media_new_location(self, str_to_bytes(psz_mrl))
 
 
-    def media_new_path(self, path):
-        '''Create a media for a certain file path.
-        See L{media_release}.
-        @param path: local filesystem path.
-        @return: the newly created media or None on error.
-        '''
-        return libvlc_media_new_path(self, str_to_bytes(path))
-
-
     def media_new_fd(self, fd):
         '''Create a media for an already open file descriptor.
         The file descriptor shall be open for reading (or reading and writing).
@@ -3013,6 +3052,7 @@
         @param mrl: a media instance or a MRL.
         @return: 0 on success, -1 if the media list is read-only.
         """
+        mrl = try_fspath(mrl)
         if isinstance(mrl, basestring):
             mrl = (self.get_instance() or 
get_default_instance()).media_new(mrl)
         return libvlc_media_list_add_media(self, mrl)
@@ -5833,7 +5873,7 @@
     '''
     f = _Cfunctions.get('libvlc_media_slaves_add', None) or \
         _Cfunction('libvlc_media_slaves_add', ((1,), (1,), (1,), (1,),), None,
-                    ctypes.c_int, Media, MediaSlaveType, ctypes.c_int, 
ctypes.c_char_p)
+                    ctypes.c_int, Media, MediaSlaveType, ctypes.c_uint, 
ctypes.c_char_p)
     return f(p_md, i_type, i_priority, psz_uri)
 
 def libvlc_media_slaves_clear(p_md):
@@ -5859,7 +5899,7 @@
     '''
     f = _Cfunctions.get('libvlc_media_slaves_get', None) or \
         _Cfunction('libvlc_media_slaves_get', ((1,), (1,),), None,
-                    ctypes.c_int, Media, 
ctypes.POINTER(ctypes.POINTER(MediaSlave)))
+                    ctypes.c_uint, Media, 
ctypes.POINTER(ctypes.POINTER(MediaSlave)))
     return f(p_md, ppp_slaves)
 
 def libvlc_media_slaves_release(pp_slaves, i_count):
@@ -5870,7 +5910,7 @@
     '''
     f = _Cfunctions.get('libvlc_media_slaves_release', None) or \
         _Cfunction('libvlc_media_slaves_release', ((1,), (1,),), None,
-                    None, ctypes.POINTER(MediaSlave), ctypes.c_int)
+                    None, ctypes.POINTER(MediaSlave), ctypes.c_uint)
     return f(pp_slaves, i_count)
 
 def libvlc_renderer_item_hold(p_item):
@@ -7207,7 +7247,7 @@
     '''
     f = _Cfunctions.get('libvlc_media_player_set_video_title_display', None) 
or \
         _Cfunction('libvlc_media_player_set_video_title_display', ((1,), (1,), 
(1,),), None,
-                    None, MediaPlayer, Position, ctypes.c_int)
+                    None, MediaPlayer, Position, ctypes.c_uint)
     return f(p_mi, position, timeout)
 
 def libvlc_media_player_add_slave(p_mi, i_type, psz_uri, b_select):
@@ -7616,7 +7656,7 @@
     '''
     f = _Cfunctions.get('libvlc_video_take_snapshot', None) or \
         _Cfunction('libvlc_video_take_snapshot', ((1,), (1,), (1,), (1,), 
(1,),), None,
-                    ctypes.c_int, MediaPlayer, ctypes.c_uint, ctypes.c_char_p, 
ctypes.c_int, ctypes.c_int)
+                    ctypes.c_int, MediaPlayer, ctypes.c_uint, ctypes.c_char_p, 
ctypes.c_uint, ctypes.c_uint)
     return f(p_mi, num, psz_filepath, i_width, i_height)
 
 def libvlc_video_set_deinterlace(p_mi, psz_mode):


Reply via email to