[vlc-commits] commit: python-vlc: move MediaEvent / EventUnion / Event definitions into header.py (Olivier Aubert )

git at videolan.org git at videolan.org
Tue Nov 16 14:29:27 CET 2010


vlc/python | branch: master | Olivier Aubert <olivier.aubert at liris.cnrs.fr> | Tue Nov 16 10:58:03 2010 +0100| [17c8d8ebc3a1a9e07876287f89065835b2d74365] | committer: Olivier Aubert 

python-vlc: move MediaEvent / EventUnion / Event definitions into header.py

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

 footer.py |   33 ---------------------------------
 header.py |   33 +++++++++++++++++++++++++++++++++
 2 files changed, 33 insertions(+), 33 deletions(-)

diff --git a/footer.py b/footer.py
index 7fb40c9..3c5c6a4 100644
--- a/footer.py
+++ b/footer.py
@@ -1,38 +1,5 @@
 ### Start of footer.py ###
 
-class MediaEvent(ctypes.Structure):
-    _fields_ = [
-        ('media_name', ctypes.c_char_p),
-        ('instance_name', ctypes.c_char_p),
-        ]
-
-class EventUnion(ctypes.Union):
-    _fields_ = [
-        ('meta_type', ctypes.c_uint),
-        ('new_child', ctypes.c_uint),
-        ('new_duration', ctypes.c_longlong),
-        ('new_status', ctypes.c_int),
-        ('media', ctypes.c_void_p),
-        ('new_state', ctypes.c_uint),
-        # Media instance
-        ('new_position', ctypes.c_float),
-        ('new_time', ctypes.c_longlong),
-        ('new_title', ctypes.c_int),
-        ('new_seekable', ctypes.c_longlong),
-        ('new_pausable', ctypes.c_longlong),
-        # FIXME: Skipped MediaList and MediaListView...
-        ('filename', ctypes.c_char_p),
-        ('new_length', ctypes.c_longlong),
-        ('media_event', MediaEvent),
-        ]
-
-class Event(ctypes.Structure):
-    _fields_ = [
-        ('type', EventType),
-        ('object', ctypes.c_void_p),
-        ('u', EventUnion),
-        ]
-
 _EventManagers = {}
 
 # FIXME: the EventManager global dict could be removed if
diff --git a/header.py b/header.py
index 973c740..d5541bb 100755
--- a/header.py
+++ b/header.py
@@ -208,4 +208,37 @@ def track_description_list(head):
         libvlc_track_description_release(head)
     return l
 
+class MediaEvent(ctypes.Structure):
+    _fields_ = [
+        ('media_name', ctypes.c_char_p),
+        ('instance_name', ctypes.c_char_p),
+        ]
+
+class EventUnion(ctypes.Union):
+    _fields_ = [
+        ('meta_type', ctypes.c_uint),
+        ('new_child', ctypes.c_uint),
+        ('new_duration', ctypes.c_longlong),
+        ('new_status', ctypes.c_int),
+        ('media', ctypes.c_void_p),
+        ('new_state', ctypes.c_uint),
+        # Media instance
+        ('new_position', ctypes.c_float),
+        ('new_time', ctypes.c_longlong),
+        ('new_title', ctypes.c_int),
+        ('new_seekable', ctypes.c_longlong),
+        ('new_pausable', ctypes.c_longlong),
+        # FIXME: Skipped MediaList and MediaListView...
+        ('filename', ctypes.c_char_p),
+        ('new_length', ctypes.c_longlong),
+        ('media_event', MediaEvent),
+        ]
+
+class Event(ctypes.Structure):
+    _fields_ = [
+        ('type', EventType),
+        ('object', ctypes.c_void_p),
+        ('u', EventUnion),
+        ]
+
 ### End of header.py ###



More information about the vlc-commits mailing list