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

git version control git at videolan.org
Thu Feb 4 22:52:32 CET 2010


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

python-ctypes: add MediaES structure definition

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

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

diff --git a/generate.py b/generate.py
index f4ac8ca..1564323 100755
--- a/generate.py
+++ b/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/header.py b/header.py
index 447ce8b..12e8e4d 100755
--- a/header.py
+++ b/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