[vlc-commits] python: re-introduce MediaThumbnailRequest definition

Olivier Aubert git at videolan.org
Thu Apr 8 09:54:25 UTC 2021


vlc/python | branch: master | Olivier Aubert <contact at olivieraubert.net> | Tue Mar 30 10:21:11 2021 +0200| [1f8fc6d4203473f2ee2207faae90bc8e170376fe] | committer: Olivier Aubert

python: re-introduce MediaThumbnailRequest definition

It was removed in 73a20147565c80667b7706d4c4a3b4dccda9a5f4 but since
it is an opaque structure, it will not get automatically generated.

> http://git.videolan.org/gitweb.cgi/vlc/python.git/?a=commit;h=1f8fc6d4203473f2ee2207faae90bc8e170376fe
---

 generator/templates/header.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/generator/templates/header.py b/generator/templates/header.py
index 036e494..4890308 100755
--- a/generator/templates/header.py
+++ b/generator/templates/header.py
@@ -367,6 +367,12 @@ class Log(ctypes.Structure):
     pass
 Log_ptr = ctypes.POINTER(Log)
 
+# Wrapper for the opaque struct libvlc_media_thumbnail_request_t
+class MediaThumbnailRequest:
+    def __new__(cls, *args):
+        if len(args) == 1 and isinstance(args[0], _Ints):
+            return _Constructor(cls, args[0])
+
 # FILE* ctypes wrapper, copied from
 # http://svn.python.org/projects/ctypes/trunk/ctypeslib/ctypeslib/contrib/pythonhdr.py
 class FILE(ctypes.Structure):



More information about the vlc-commits mailing list