Commit 648b92d1 authored by Olivier Aubert's avatar Olivier Aubert

python-ctypes: add MediaES structure definition

parent 8a9a4cb4
......@@ -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',
......
......@@ -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),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment