Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
d2c8e211
Commit
d2c8e211
authored
Dec 09, 2005
by
Olivier Aubert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
python/vlcglue.c: Allow that start, stop, pause, resume methods can take no parameter.
parent
b7e834c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
14 deletions
+35
-14
bindings/python/vlcglue.c
bindings/python/vlcglue.c
+35
-14
No files found.
bindings/python/vlcglue.c
View file @
d2c8e211
...
...
@@ -49,11 +49,6 @@ vlcMODINIT_FUNC initvlc(void)
PyPosition_Type
.
tp_new
=
PyType_GenericNew
;
PyPosition_Type
.
tp_alloc
=
PyType_GenericAlloc
;
/* PyEval_InitThreads(); */
/* Have a look at
http://base.bel-epa.com/pyapache/Python/MySQL-python/MySQL-python-0.3.0/_mysqlmodule.c */
m
=
Py_InitModule3
(
"vlc"
,
vlc_methods
,
"VLC media player embedding module."
);
...
...
@@ -853,8 +848,11 @@ static PyObject *MediaControl_start(PyObject *self, PyObject *args)
PyObject
*
py_pos
;
if
(
!
PyArg_ParseTuple
(
args
,
"O"
,
&
py_pos
)
)
return
NULL
;
{
/* No argument. Use a default 0 value. */
PyErr_Clear
();
py_pos
=
NULL
;
}
a_position
=
position_py_to_c
(
py_pos
);
if
(
!
a_position
)
return
NULL
;
...
...
@@ -877,9 +875,14 @@ static PyObject *MediaControl_pause(PyObject *self, PyObject *args)
PyObject
*
py_pos
;
if
(
!
PyArg_ParseTuple
(
args
,
"O"
,
&
py_pos
)
)
return
NULL
;
{
/* No argument. Use a default 0 value. */
PyErr_Clear
();
py_pos
=
NULL
;
}
a_position
=
position_py_to_c
(
py_pos
);
if
(
!
a_position
)
return
NULL
;
Py_BEGIN_ALLOW_THREADS
MC_TRY
;
...
...
@@ -899,9 +902,14 @@ static PyObject * MediaControl_resume(PyObject *self, PyObject *args)
PyObject
*
py_pos
;
if
(
!
PyArg_ParseTuple
(
args
,
"O"
,
&
py_pos
)
)
return
NULL
;
{
/* No argument. Use a default 0 value. */
PyErr_Clear
();
py_pos
=
NULL
;
}
a_position
=
position_py_to_c
(
py_pos
);
if
(
!
a_position
)
return
NULL
;
Py_BEGIN_ALLOW_THREADS
MC_TRY
;
...
...
@@ -921,9 +929,14 @@ static PyObject *MediaControl_stop(PyObject *self, PyObject *args)
PyObject
*
py_pos
;
if
(
!
PyArg_ParseTuple
(
args
,
"O"
,
&
py_pos
)
)
return
NULL
;
{
/* No argument. Use a default 0 value. */
PyErr_Clear
();
py_pos
=
NULL
;
}
a_position
=
position_py_to_c
(
py_pos
);
if
(
!
a_position
)
return
NULL
;
Py_BEGIN_ALLOW_THREADS
MC_TRY
;
...
...
@@ -1310,7 +1323,15 @@ mediacontrol_Position* position_py_to_c( PyObject * py_position )
return
NULL
;
}
if
(
PyObject_IsInstance
(
py_position
,
(
PyObject
*
)
&
PyPosition_Type
))
if
(
!
py_position
)
{
/* If we give a NULL value, it will be considered as
a 0 relative position in mediatime */
a_position
->
origin
=
mediacontrol_RelativePosition
;
a_position
->
key
=
mediacontrol_MediaTime
;
a_position
->
value
=
0
;
}
else
if
(
PyObject_IsInstance
(
py_position
,
(
PyObject
*
)
&
PyPosition_Type
))
{
a_position
->
origin
=
pos
->
origin
;
a_position
->
key
=
pos
->
key
;
...
...
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