Commit c3f18518 authored by Olivier Aubert's avatar Olivier Aubert

python: remove deprecated methods

parent c8fd8cef
......@@ -137,54 +137,6 @@ vlcInstance_new_media_player( PyObject *self, PyObject *args )
return ( PyObject * )p_ret;
}
static PyObject *
vlcInstance_video_set_parent( PyObject *self, PyObject *args )
{
libvlc_exception_t ex;
int i_drawable;
if( !PyArg_ParseTuple( args, "i", &i_drawable ) )
return NULL;
LIBVLC_TRY;
libvlc_video_set_parent( LIBVLC_INSTANCE(self), (libvlc_drawable_t) i_drawable, &ex );
LIBVLC_EXCEPT;
Py_INCREF( Py_None );
return Py_None;
}
static PyObject *
vlcInstance_video_get_parent( PyObject *self, PyObject *args )
{
libvlc_exception_t ex;
libvlc_drawable_t i_ret;
LIBVLC_TRY;
i_ret = libvlc_video_get_parent( LIBVLC_INSTANCE(self), &ex );
LIBVLC_EXCEPT;
return Py_BuildValue( "L", i_ret );
}
static PyObject *
vlcInstance_video_set_size( PyObject *self, PyObject *args )
{
libvlc_exception_t ex;
int i_width;
int i_height;
if( !PyArg_ParseTuple( args, "ii", &i_width, &i_height ) )
return NULL;
LIBVLC_TRY;
libvlc_video_set_size( LIBVLC_INSTANCE(self), i_width, i_height, &ex );
LIBVLC_EXCEPT;
Py_INCREF( Py_None );
return Py_None;
}
static PyObject *
vlcInstance_audio_toggle_mute( PyObject *self, PyObject *args )
{
......@@ -564,12 +516,6 @@ static PyMethodDef vlcInstance_methods[] =
{
{ "get_vlc_id", vlcInstance_get_vlc_id, METH_NOARGS,
"get_vlc_id( ) -> int Get the instance id."},
{ "video_set_parent", vlcInstance_video_set_parent, METH_VARARGS,
"video_set_parent(xid=int) Set the parent xid/HWND/CGrafPort"},
{ "video_get_parent", vlcInstance_video_get_parent, METH_NOARGS,
"video_get_parent() -> int Get the parent xid/HWND/CGrafPort"},
{ "video_set_size", vlcInstance_video_set_size, METH_VARARGS,
"video_set_size(width=int, height=int) Set the video width and height"},
{ "audio_toggle_mute", vlcInstance_audio_toggle_mute, METH_NOARGS,
"audio_toggle_mute() Toggle the mute state"},
{ "audio_get_mute", vlcInstance_audio_get_mute, METH_NOARGS,
......
......@@ -344,113 +344,167 @@ vlcMediaPlayer_video_take_snapshot( PyObject *self, PyObject *args )
}
static PyObject *
vlcMediaPlayer_video_resize( PyObject *self, PyObject *args )
vlcMediaPlayer_is_seekable( PyObject *self, PyObject *args )
{
libvlc_exception_t ex;
int i_width;
int i_height;
if( !PyArg_ParseTuple( args, "ii", &i_width, &i_height ) )
return NULL;
int i_ret;
LIBVLC_TRY;
libvlc_video_resize( LIBVLC_MEDIAPLAYER(self), i_width, i_height, &ex);
i_ret = libvlc_media_player_is_seekable( LIBVLC_MEDIAPLAYER(self), &ex);
LIBVLC_EXCEPT;
Py_INCREF( Py_None );
return Py_None;
return Py_BuildValue( "i", i_ret );
}
static PyObject *
vlcMediaPlayer_video_reparent( PyObject *self, PyObject *args )
vlcMediaPlayer_can_pause( PyObject *self, PyObject *args )
{
libvlc_exception_t ex;
WINDOWHANDLE i_visual;
int i_ret;
if( !PyArg_ParseTuple( args, "i", &i_visual ) )
return NULL;
LIBVLC_TRY;
i_ret = libvlc_video_reparent( LIBVLC_MEDIAPLAYER(self), i_visual, &ex);
i_ret = libvlc_media_player_can_pause( LIBVLC_MEDIAPLAYER(self), &ex);
LIBVLC_EXCEPT;
return Py_BuildValue( "i", i_ret );
}
static PyObject *
vlcMediaPlayer_is_seekable( PyObject *self, PyObject *args )
vlcMediaPlayer_play( PyObject *self, PyObject *args )
{
libvlc_exception_t ex;
int i_ret;
LIBVLC_TRY;
i_ret = libvlc_media_player_is_seekable( LIBVLC_MEDIAPLAYER(self), &ex);
libvlc_media_player_play( LIBVLC_MEDIAPLAYER(self), &ex);
LIBVLC_EXCEPT;
return Py_BuildValue( "i", i_ret );
Py_INCREF( Py_None );
return Py_None;
}
static PyObject *
vlcMediaPlayer_can_pause( PyObject *self, PyObject *args )
vlcMediaPlayer_pause( PyObject *self, PyObject *args )
{
libvlc_exception_t ex;
int i_ret;
LIBVLC_TRY;
i_ret = libvlc_media_player_can_pause( LIBVLC_MEDIAPLAYER(self), &ex);
libvlc_media_player_pause( LIBVLC_MEDIAPLAYER(self), &ex);
LIBVLC_EXCEPT;
return Py_BuildValue( "i", i_ret );
Py_INCREF( Py_None );
return Py_None;
}
static PyObject *
vlcMediaPlayer_play( PyObject *self, PyObject *args )
vlcMediaPlayer_stop( PyObject *self, PyObject *args )
{
libvlc_exception_t ex;
LIBVLC_TRY;
libvlc_media_player_play( LIBVLC_MEDIAPLAYER(self), &ex);
libvlc_media_player_stop( LIBVLC_MEDIAPLAYER(self), &ex);
LIBVLC_EXCEPT;
Py_INCREF( Py_None );
return Py_None;
}
static PyObject *
vlcMediaPlayer_pause( PyObject *self, PyObject *args )
vlcMediaPlayer_set_xwindow( PyObject *self, PyObject *args )
{
libvlc_exception_t ex;
uint32_t i_drawable;
if( !PyArg_ParseTuple( args, "i", &i_drawable ) )
return NULL;
LIBVLC_TRY;
libvlc_media_player_pause( LIBVLC_MEDIAPLAYER(self), &ex);
libvlc_media_player_set_xwindow( LIBVLC_MEDIAPLAYER(self), i_drawable, &ex );
LIBVLC_EXCEPT;
Py_INCREF( Py_None );
return Py_None;
}
static PyObject *
vlcMediaPlayer_stop( PyObject *self, PyObject *args )
vlcMediaPlayer_get_xwindow( PyObject *self, PyObject *args )
{
uint32_t i_ret;
i_ret = libvlc_media_player_get_xwindow( LIBVLC_MEDIAPLAYER(self));
return Py_BuildValue( "i", i_ret );
}
static PyObject *
vlcMediaPlayer_set_hwnd( PyObject *self, PyObject *args )
{
libvlc_exception_t ex;
void* i_drawable;
if( !PyArg_ParseTuple( args, "l", &i_drawable ) )
return NULL;
LIBVLC_TRY;
libvlc_media_player_stop( LIBVLC_MEDIAPLAYER(self), &ex);
libvlc_media_player_set_hwnd( LIBVLC_MEDIAPLAYER(self), (void*) i_drawable, &ex );
LIBVLC_EXCEPT;
Py_INCREF( Py_None );
return Py_None;
}
static PyObject *
vlcMediaPlayer_set_drawable( PyObject *self, PyObject *args )
vlcMediaPlayer_get_hwnd( PyObject *self, PyObject *args )
{
void* i_ret;
i_ret = libvlc_media_player_get_hwnd( LIBVLC_MEDIAPLAYER(self));
return Py_BuildValue( "l", i_ret );
}
static PyObject *
vlcMediaPlayer_set_agl( PyObject *self, PyObject *args )
{
libvlc_exception_t ex;
int i_drawable;
uint32_t i_drawable;
if( !PyArg_ParseTuple( args, "i", &i_drawable ) )
return NULL;
LIBVLC_TRY;
libvlc_media_player_set_drawable( LIBVLC_MEDIAPLAYER(self), (libvlc_drawable_t) i_drawable, &ex );
libvlc_media_player_set_agl( LIBVLC_MEDIAPLAYER(self), i_drawable, &ex );
LIBVLC_EXCEPT;
Py_INCREF( Py_None );
return Py_None;
}
static PyObject *
vlcMediaPlayer_get_agl( PyObject *self, PyObject *args )
{
uint32_t i_ret;
i_ret = libvlc_media_player_get_agl( LIBVLC_MEDIAPLAYER(self));
return Py_BuildValue( "i", i_ret );
}
static PyObject *
vlcMediaPlayer_set_nsobject( PyObject *self, PyObject *args )
{
libvlc_exception_t ex;
void* i_drawable;
if( !PyArg_ParseTuple( args, "l", &i_drawable ) )
return NULL;
LIBVLC_TRY;
libvlc_media_player_set_nsobject( LIBVLC_MEDIAPLAYER(self), (void*) i_drawable, &ex );
LIBVLC_EXCEPT;
Py_INCREF( Py_None );
return Py_None;
}
static PyObject *
vlcMediaPlayer_get_hwnd( PyObject *self, PyObject *args )
{
void* i_ret;
i_ret = libvlc_media_player_get_nsobject( LIBVLC_MEDIAPLAYER(self));
return Py_BuildValue( "l", i_ret );
}
static PyObject *
vlcMediaPlayer_set_media( PyObject *self, PyObject *args )
{
......@@ -575,10 +629,6 @@ static PyMethodDef vlcMediaPlayer_methods[] =
"set_aspect_ratio(str) Set new video aspect ratio" },
{ "video_take_snapshot", vlcMediaPlayer_video_take_snapshot, METH_VARARGS,
"video_take_snapshot(filename=str) Take a snapshot of the current video window" },
{ "video_resize", vlcMediaPlayer_video_resize, METH_VARARGS,
"video_resize(width=int, height=int) Resize the current video output window" },
{ "video_reparent", vlcMediaPlayer_video_reparent, METH_VARARGS,
"video_reparent(visual=int) change the parent for the current video output" },
{ "play", vlcMediaPlayer_play, METH_VARARGS,
"play() Play the media instance" },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment