Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
c3f18518
Commit
c3f18518
authored
Jul 29, 2009
by
Olivier Aubert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
python: remove deprecated methods
parent
c8fd8cef
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
88 additions
and
92 deletions
+88
-92
bindings/python/vlc_instance.c
bindings/python/vlc_instance.c
+0
-54
bindings/python/vlc_mediaplayer.c
bindings/python/vlc_mediaplayer.c
+88
-38
No files found.
bindings/python/vlc_instance.c
View file @
c3f18518
...
@@ -137,54 +137,6 @@ vlcInstance_new_media_player( PyObject *self, PyObject *args )
...
@@ -137,54 +137,6 @@ vlcInstance_new_media_player( PyObject *self, PyObject *args )
return
(
PyObject
*
)
p_ret
;
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
*
static
PyObject
*
vlcInstance_audio_toggle_mute
(
PyObject
*
self
,
PyObject
*
args
)
vlcInstance_audio_toggle_mute
(
PyObject
*
self
,
PyObject
*
args
)
{
{
...
@@ -564,12 +516,6 @@ static PyMethodDef vlcInstance_methods[] =
...
@@ -564,12 +516,6 @@ static PyMethodDef vlcInstance_methods[] =
{
{
{
"get_vlc_id"
,
vlcInstance_get_vlc_id
,
METH_NOARGS
,
{
"get_vlc_id"
,
vlcInstance_get_vlc_id
,
METH_NOARGS
,
"get_vlc_id( ) -> int Get the instance id."
},
"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"
,
vlcInstance_audio_toggle_mute
,
METH_NOARGS
,
"audio_toggle_mute() Toggle the mute state"
},
"audio_toggle_mute() Toggle the mute state"
},
{
"audio_get_mute"
,
vlcInstance_audio_get_mute
,
METH_NOARGS
,
{
"audio_get_mute"
,
vlcInstance_audio_get_mute
,
METH_NOARGS
,
...
...
bindings/python/vlc_mediaplayer.c
View file @
c3f18518
...
@@ -344,113 +344,167 @@ vlcMediaPlayer_video_take_snapshot( PyObject *self, PyObject *args )
...
@@ -344,113 +344,167 @@ vlcMediaPlayer_video_take_snapshot( PyObject *self, PyObject *args )
}
}
static
PyObject
*
static
PyObject
*
vlcMediaPlayer_
video_resiz
e
(
PyObject
*
self
,
PyObject
*
args
)
vlcMediaPlayer_
is_seekabl
e
(
PyObject
*
self
,
PyObject
*
args
)
{
{
libvlc_exception_t
ex
;
libvlc_exception_t
ex
;
int
i_width
;
int
i_ret
;
int
i_height
;
if
(
!
PyArg_ParseTuple
(
args
,
"ii"
,
&
i_width
,
&
i_height
)
)
return
NULL
;
LIBVLC_TRY
;
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
;
LIBVLC_EXCEPT
;
Py_INCREF
(
Py_None
);
return
Py_BuildValue
(
"i"
,
i_ret
);
return
Py_None
;
}
}
static
PyObject
*
static
PyObject
*
vlcMediaPlayer_
video_reparent
(
PyObject
*
self
,
PyObject
*
args
)
vlcMediaPlayer_
can_pause
(
PyObject
*
self
,
PyObject
*
args
)
{
{
libvlc_exception_t
ex
;
libvlc_exception_t
ex
;
WINDOWHANDLE
i_visual
;
int
i_ret
;
int
i_ret
;
if
(
!
PyArg_ParseTuple
(
args
,
"i"
,
&
i_visual
)
)
return
NULL
;
LIBVLC_TRY
;
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
;
LIBVLC_EXCEPT
;
return
Py_BuildValue
(
"i"
,
i_ret
);
return
Py_BuildValue
(
"i"
,
i_ret
);
}
}
static
PyObject
*
static
PyObject
*
vlcMediaPlayer_
is_seekable
(
PyObject
*
self
,
PyObject
*
args
)
vlcMediaPlayer_
play
(
PyObject
*
self
,
PyObject
*
args
)
{
{
libvlc_exception_t
ex
;
libvlc_exception_t
ex
;
int
i_ret
;
LIBVLC_TRY
;
LIBVLC_TRY
;
i_ret
=
libvlc_media_player_is_seekable
(
LIBVLC_MEDIAPLAYER
(
self
),
&
ex
);
libvlc_media_player_play
(
LIBVLC_MEDIAPLAYER
(
self
),
&
ex
);
LIBVLC_EXCEPT
;
LIBVLC_EXCEPT
;
return
Py_BuildValue
(
"i"
,
i_ret
);
Py_INCREF
(
Py_None
);
return
Py_None
;
}
}
static
PyObject
*
static
PyObject
*
vlcMediaPlayer_
can_
pause
(
PyObject
*
self
,
PyObject
*
args
)
vlcMediaPlayer_pause
(
PyObject
*
self
,
PyObject
*
args
)
{
{
libvlc_exception_t
ex
;
libvlc_exception_t
ex
;
int
i_ret
;
LIBVLC_TRY
;
LIBVLC_TRY
;
i_ret
=
libvlc_media_player_can
_pause
(
LIBVLC_MEDIAPLAYER
(
self
),
&
ex
);
libvlc_media_player
_pause
(
LIBVLC_MEDIAPLAYER
(
self
),
&
ex
);
LIBVLC_EXCEPT
;
LIBVLC_EXCEPT
;
return
Py_BuildValue
(
"i"
,
i_ret
);
Py_INCREF
(
Py_None
);
return
Py_None
;
}
}
static
PyObject
*
static
PyObject
*
vlcMediaPlayer_
play
(
PyObject
*
self
,
PyObject
*
args
)
vlcMediaPlayer_
stop
(
PyObject
*
self
,
PyObject
*
args
)
{
{
libvlc_exception_t
ex
;
libvlc_exception_t
ex
;
LIBVLC_TRY
;
LIBVLC_TRY
;
libvlc_media_player_
play
(
LIBVLC_MEDIAPLAYER
(
self
),
&
ex
);
libvlc_media_player_
stop
(
LIBVLC_MEDIAPLAYER
(
self
),
&
ex
);
LIBVLC_EXCEPT
;
LIBVLC_EXCEPT
;
Py_INCREF
(
Py_None
);
Py_INCREF
(
Py_None
);
return
Py_None
;
return
Py_None
;
}
}
static
PyObject
*
static
PyObject
*
vlcMediaPlayer_
pause
(
PyObject
*
self
,
PyObject
*
args
)
vlcMediaPlayer_
set_xwindow
(
PyObject
*
self
,
PyObject
*
args
)
{
{
libvlc_exception_t
ex
;
libvlc_exception_t
ex
;
uint32_t
i_drawable
;
if
(
!
PyArg_ParseTuple
(
args
,
"i"
,
&
i_drawable
)
)
return
NULL
;
LIBVLC_TRY
;
LIBVLC_TRY
;
libvlc_media_player_
pause
(
LIBVLC_MEDIAPLAYER
(
self
),
&
ex
);
libvlc_media_player_
set_xwindow
(
LIBVLC_MEDIAPLAYER
(
self
),
i_drawable
,
&
ex
);
LIBVLC_EXCEPT
;
LIBVLC_EXCEPT
;
Py_INCREF
(
Py_None
);
Py_INCREF
(
Py_None
);
return
Py_None
;
return
Py_None
;
}
}
static
PyObject
*
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
;
libvlc_exception_t
ex
;
void
*
i_drawable
;
if
(
!
PyArg_ParseTuple
(
args
,
"l"
,
&
i_drawable
)
)
return
NULL
;
LIBVLC_TRY
;
LIBVLC_TRY
;
libvlc_media_player_s
top
(
LIBVLC_MEDIAPLAYER
(
self
),
&
ex
);
libvlc_media_player_s
et_hwnd
(
LIBVLC_MEDIAPLAYER
(
self
),
(
void
*
)
i_drawable
,
&
ex
);
LIBVLC_EXCEPT
;
LIBVLC_EXCEPT
;
Py_INCREF
(
Py_None
);
Py_INCREF
(
Py_None
);
return
Py_None
;
return
Py_None
;
}
}
static
PyObject
*
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
;
libvlc_exception_t
ex
;
in
t
i_drawable
;
uint32_
t
i_drawable
;
if
(
!
PyArg_ParseTuple
(
args
,
"i"
,
&
i_drawable
)
)
if
(
!
PyArg_ParseTuple
(
args
,
"i"
,
&
i_drawable
)
)
return
NULL
;
return
NULL
;
LIBVLC_TRY
;
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
;
LIBVLC_EXCEPT
;
Py_INCREF
(
Py_None
);
Py_INCREF
(
Py_None
);
return
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
*
static
PyObject
*
vlcMediaPlayer_set_media
(
PyObject
*
self
,
PyObject
*
args
)
vlcMediaPlayer_set_media
(
PyObject
*
self
,
PyObject
*
args
)
{
{
...
@@ -575,10 +629,6 @@ static PyMethodDef vlcMediaPlayer_methods[] =
...
@@ -575,10 +629,6 @@ static PyMethodDef vlcMediaPlayer_methods[] =
"set_aspect_ratio(str) Set new video aspect ratio"
},
"set_aspect_ratio(str) Set new video aspect ratio"
},
{
"video_take_snapshot"
,
vlcMediaPlayer_video_take_snapshot
,
METH_VARARGS
,
{
"video_take_snapshot"
,
vlcMediaPlayer_video_take_snapshot
,
METH_VARARGS
,
"video_take_snapshot(filename=str) Take a snapshot of the current video window"
},
"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"
,
vlcMediaPlayer_play
,
METH_VARARGS
,
"play() Play the media instance"
},
"play() Play the media instance"
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment