[vlc-devel] commit: python-ctypes: add MediaES structure definition (Olivier Aubert )

git version control git at videolan.org
Mon Jan 25 17:05:44 CET 2010


vlc | branch: master | Olivier Aubert <olivier.aubert at liris.cnrs.fr> | Mon Jan 25 16:48:55 2010 +0100| [648b92d1269f42ed8ef051db61e4773d47a4b8c2] | committer: Olivier Aubert 

python-ctypes: add MediaES structure definition

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=648b92d1269f42ed8ef051db61e4773d47a4b8c2
---

 bindings/python-ctypes/generate.py |    1 +
 bindings/python-ctypes/header.py   |   15 +++++++++++++++
 2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/bindings/python-ctypes/generate.py b/bindings/python-ctypes/generate.py
index f4ac8ca..1564323 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 447ce8b..12e8e4d 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),




More information about the vlc-devel mailing list