]> git.sesse.net Git - vlc/blobdiff - bindings/python/vlcglue.h
macosx: Fix crash log and remove some unneeded NSLog.
[vlc] / bindings / python / vlcglue.h
index e94323f79b5e04836661606e4a8b07637d583e40..d6e4c4416588e3dd2cba6f5d65c2572ced1f8115 100644 (file)
@@ -2,7 +2,7 @@
  * vlcglue.h: Main header for the Python binding
  *****************************************************************************
  * Copyright (C) 1998-2004 the VideoLAN team
- * $Id: vlcglue.h 16752 2006-09-20 11:10:44Z oaubert $
+ * $Id$
  *
  * Authors: Olivier Aubert <oaubert at bat710.univ-lyon1.fr>
  *          ClĂ©ment Stenac <zorglub@videolan.org>
@@ -78,7 +78,7 @@ PyObject *MediaControl_PositionKeyNotSupported;
 PyObject *MediaControl_PositionOriginNotSupported;
 PyObject *MediaControl_InvalidPosition;
 PyObject *MediaControl_PlaylistException;
-PyObject *vlcInstance_Exception;
+PyObject *vlc_Exception;
 
 /**********************************************************************
  * vlc.Instance Object
@@ -113,26 +113,38 @@ typedef struct
 } PyPosition;
 
 /**********************************************************************
- * vlc.Input Object
+ * vlc.MediaPlayer Object
  **********************************************************************/
 typedef struct
 {
     PyObject_HEAD
-    libvlc_input_t* p_input;
-} vlcInput;
+    libvlc_media_player_t* p_mp;
+} vlcMediaPlayer;
+
+/**********************************************************************
+ * vlc.Media Object
+ **********************************************************************/
+typedef struct
+{
+    PyObject_HEAD
+    libvlc_media_t* p_media;
+} vlcMedia;
 
 /* Forward declarations */
 staticforward PyTypeObject MediaControl_Type;
 staticforward PyTypeObject PyPosition_Type;
 staticforward PyTypeObject vlcInstance_Type;
-staticforward PyTypeObject vlcInput_Type;
+staticforward PyTypeObject vlcMediaPlayer_Type;
+staticforward PyTypeObject vlcMedia_Type;
 
-#define LIBVLC_INPUT ((vlcInput*)self)
+#define LIBVLC_INSTANCE ((vlcInstance*)self)
+#define LIBVLC_MEDIAPLAYER ((vlcMediaPlayer*)self)
+#define LIBVLC_MEDIA ((vlcMedia*)self)
 
 #define LIBVLC_TRY libvlc_exception_init( &ex );
 
 #define LIBVLC_EXCEPT if( libvlc_exception_raised( &ex ) ) { \
-    PyObject *py_exc = vlcInstance_Exception; \
+    PyObject *py_exc = vlc_Exception; \
     PyErr_SetString( py_exc, libvlc_exception_get_message( &ex ) ); \
     return NULL; \
   }