From 648b92d1269f42ed8ef051db61e4773d47a4b8c2 Mon Sep 17 00:00:00 2001 From: Olivier Aubert Date: Mon, 25 Jan 2010 16:48:55 +0100 Subject: [PATCH] python-ctypes: add MediaES structure definition --- bindings/python-ctypes/generate.py | 1 + bindings/python-ctypes/header.py | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/bindings/python-ctypes/generate.py b/bindings/python-ctypes/generate.py index f4ac8ca31e..1564323acd 100755 --- a/bindings/python-ctypes/generate.py +++ b/bindings/python-ctypes/generate.py @@ -341,6 +341,7 @@ class PythonGenerator(object): 'libvlc_track_description_t*': 'TrackDescription', 'libvlc_audio_output_t*': 'AudioOutput', 'libvlc_media_stats_t*': 'ctypes.POINTER(MediaStats)', + 'libvlc_media_es_t**': 'ctypes.POINTER(ctypes.POINTER(MediaES))', 'mediacontrol_Instance*': 'MediaControl', 'mediacontrol_Exception*': 'MediaControlException', diff --git a/bindings/python-ctypes/header.py b/bindings/python-ctypes/header.py index 447ce8b573..12e8e4d46b 100755 --- a/bindings/python-ctypes/header.py +++ b/bindings/python-ctypes/header.py @@ -171,6 +171,21 @@ class MediaStats(ctypes.Structure): def __str__(self): return "MediaStats\n%s" % "\n".join( "%s:\t%s" % (n, getattr(self, n)) for n in self._fields_ ) +class MediaES(ctypes.Structure): + _fields_= [ + ('codec' , ctypes.c_uint32), + ('type' , EsType), + ('profile' , ctypes.c_int), + ('level' , ctypes.c_int), + ('channels', ctypes.c_uint), + ('rate' , ctypes.c_uint), + ('height' , ctypes.c_uint), + ('width' , ctypes.c_uint), + ] + + def __str__(self): + return "MediaES \n%s" % "\n".join( "%s:\t%s" % (n, getattr(self, n)) for n in self._fields_ ) + class PlaylistItem(ctypes.Structure): _fields_= [ ('id', ctypes.c_int), -- 2.39.2