]> git.sesse.net Git - vlc/commitdiff
python-ctypes: add MediaES structure definition
authorOlivier Aubert <olivier.aubert@liris.cnrs.fr>
Mon, 25 Jan 2010 15:48:55 +0000 (16:48 +0100)
committerOlivier Aubert <olivier.aubert@liris.cnrs.fr>
Mon, 25 Jan 2010 16:05:41 +0000 (17:05 +0100)
bindings/python-ctypes/generate.py
bindings/python-ctypes/header.py

index f4ac8ca31e65aa54c3316caa3053d7bff6b03d62..1564323acd33e64c583b14b05c72a305389ef945 100755 (executable)
@@ -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',
index 447ce8b5734133aa758c824d81672a4eaaf1ef17..12e8e4d46b7c061fa9ddf4988448bb95b4537042 100755 (executable)
@@ -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),