X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=bindings%2Fpython%2Fvlcglue.h;h=d6e4c4416588e3dd2cba6f5d65c2572ced1f8115;hb=855b60867eed208bda63bdc4a4aa0ea04d0428d6;hp=d0eb18728dd8837fb65cd6c1fb855fe87f156c8f;hpb=67f243a9a8e7858cf71d4affecb18e3bc2d5a2b9;p=vlc diff --git a/bindings/python/vlcglue.h b/bindings/python/vlcglue.h index d0eb18728d..d6e4c44165 100644 --- a/bindings/python/vlcglue.h +++ b/bindings/python/vlcglue.h @@ -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_media_instance_t* p_md; -} 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; \ }