X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=bindings%2Fpython%2Fvlcglue.h;h=d6e4c4416588e3dd2cba6f5d65c2572ced1f8115;hb=6903d514d3ea8113f91b1bedde862607f7efc92a;hp=4a1b98f5b9816c52c8df4189aac230ea30d9ff21;hpb=8d3912c26d9eecbf3d74020d28a0c11a0ba5dc22;p=vlc diff --git a/bindings/python/vlcglue.h b/bindings/python/vlcglue.h index 4a1b98f5b9..d6e4c44165 100644 --- a/bindings/python/vlcglue.h +++ b/bindings/python/vlcglue.h @@ -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 * Clément Stenac @@ -78,7 +78,18 @@ PyObject *MediaControl_PositionKeyNotSupported; PyObject *MediaControl_PositionOriginNotSupported; PyObject *MediaControl_InvalidPosition; PyObject *MediaControl_PlaylistException; -PyObject *vlcInstance_Exception; +PyObject *vlc_Exception; + +/********************************************************************** + * vlc.Instance Object + **********************************************************************/ +typedef struct +{ + PyObject_HEAD + libvlc_instance_t* p_instance; +} vlcInstance; + +#define LIBVLC_INSTANCE ((vlcInstance*)self) /********************************************************************** * MediaControl Object @@ -87,6 +98,7 @@ typedef struct { PyObject_HEAD mediacontrol_Instance* mc; + vlcInstance *vlc_instance; } MediaControl; /********************************************************************** @@ -101,37 +113,38 @@ typedef struct } PyPosition; /********************************************************************** - * vlc.Instance Object + * vlc.MediaPlayer Object **********************************************************************/ typedef struct { PyObject_HEAD - libvlc_instance_t* p_instance; -} vlcInstance; - -#define LIBVLC_INSTANCE ((vlcInstance*)self) + libvlc_media_player_t* p_mp; +} vlcMediaPlayer; /********************************************************************** - * vlc.Input Object + * vlc.Media Object **********************************************************************/ typedef struct { PyObject_HEAD - libvlc_input_t* p_input; -} vlcInput; + 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; \ }