Show
Ignore:
Timestamp:
23/04/08 19:35:01 (7 months ago)
Author:
Olivier Aubert <olivier.aubert@liris.cnrs.fr>
git-committer:
Olivier Aubert <olivier.aubert@liris.cnrs.fr> 1208972101 +0200
git-parent:

[66fc00162f3f69e55bd84e7501d966b578b37c21]

git-author:
Olivier Aubert <olivier.aubert@liris.cnrs.fr> 1208957144 +0200
Message:

python bindings: update to the new libvlc and mediacontrol API.

Objects have been renamed (vlc.MediaPlayer?/vlc.Media) to match the current API.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • bindings/python/vlcglue.h

    rbf1292e r241b228  
    7979PyObject *MediaControl_InvalidPosition; 
    8080PyObject *MediaControl_PlaylistException; 
    81 PyObject *vlcInstance_Exception; 
     81PyObject *vlc_Exception; 
    8282 
    8383/********************************************************************** 
     
    114114 
    115115/********************************************************************** 
    116  * vlc.MediaInstance Object 
     116 * vlc.MediaPlayer Object 
    117117 **********************************************************************/ 
    118118typedef struct 
    119119{ 
    120120    PyObject_HEAD 
    121     libvlc_media_player_t* p_mi
    122 } vlcMediaInstance
     121    libvlc_media_player_t* p_mp
     122} vlcMediaPlayer
    123123 
    124124/********************************************************************** 
    125  * vlc.MediaDescriptor Object 
     125 * vlc.Media Object 
    126126 **********************************************************************/ 
    127127typedef struct 
    128128{ 
    129129    PyObject_HEAD 
    130     libvlc_media_t* p_md
    131 } vlcMediaDescriptor
     130    libvlc_media_t* p_media
     131} vlcMedia
    132132 
    133133/* Forward declarations */ 
     
    135135staticforward PyTypeObject PyPosition_Type; 
    136136staticforward PyTypeObject vlcInstance_Type; 
    137 staticforward PyTypeObject vlcMediaInstance_Type; 
    138 staticforward PyTypeObject vlcMediaDescriptor_Type; 
     137staticforward PyTypeObject vlcMediaPlayer_Type; 
     138staticforward PyTypeObject vlcMedia_Type; 
    139139 
    140140#define LIBVLC_INSTANCE ((vlcInstance*)self) 
    141 #define LIBVLC_MEDIAINSTANCE ((vlcMediaInstance*)self) 
    142 #define LIBVLC_MEDIADESCRIPTOR ((vlcMediaDescriptor*)self) 
     141#define LIBVLC_MEDIAPLAYER ((vlcMediaPlayer*)self) 
     142#define LIBVLC_MEDIA ((vlcMedia*)self) 
    143143 
    144144#define LIBVLC_TRY libvlc_exception_init( &ex ); 
    145145 
    146146#define LIBVLC_EXCEPT if( libvlc_exception_raised( &ex ) ) { \ 
    147     PyObject *py_exc = vlcInstance_Exception; \ 
     147    PyObject *py_exc = vlc_Exception; \ 
    148148    PyErr_SetString( py_exc, libvlc_exception_get_message( &ex ) ); \ 
    149149    return NULL; \