Changeset d2c8e211e8b9b0b1ca1df362816bfd520920406c
- Timestamp:
- 12/09/05 14:29:09
(3 years ago)
- Author:
- Olivier Aubert <olivier.aubert@liris.cnrs.fr>
- git-committer:
- Olivier Aubert <olivier.aubert@liris.cnrs.fr> 1134134949 +0000
- git-parent:
[b7e834c2032b31dd4d717c05737e992ab878f50d]
- git-author:
- Olivier Aubert <olivier.aubert@liris.cnrs.fr> 1134134949 +0000
- Message:
python/vlcglue.c: Allow that start, stop, pause, resume methods can take no parameter.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rb7e834c |
rd2c8e21 |
|
| 49 | 49 | PyPosition_Type.tp_new = PyType_GenericNew; |
|---|
| 50 | 50 | PyPosition_Type.tp_alloc = PyType_GenericAlloc; |
|---|
| 51 | | |
|---|
| 52 | | /* PyEval_InitThreads(); */ |
|---|
| 53 | | |
|---|
| 54 | | /* Have a look at |
|---|
| 55 | | http://base.bel-epa.com/pyapache/Python/MySQL-python/MySQL-python-0.3.0/_mysqlmodule.c */ |
|---|
| 56 | 51 | |
|---|
| 57 | 52 | m = Py_InitModule3( "vlc", vlc_methods, |
|---|
| … | … | |
| 854 | 849 | |
|---|
| 855 | 850 | if( !PyArg_ParseTuple(args, "O", &py_pos ) ) |
|---|
| 856 | | return NULL; |
|---|
| 857 | | |
|---|
| | 851 | { |
|---|
| | 852 | /* No argument. Use a default 0 value. */ |
|---|
| | 853 | PyErr_Clear(); |
|---|
| | 854 | py_pos = NULL; |
|---|
| | 855 | } |
|---|
| 858 | 856 | a_position = position_py_to_c(py_pos); |
|---|
| 859 | 857 | if ( !a_position ) |
|---|
| … | … | |
| 878 | 876 | |
|---|
| 879 | 877 | if( !PyArg_ParseTuple(args, "O", &py_pos ) ) |
|---|
| | 878 | { |
|---|
| | 879 | /* No argument. Use a default 0 value. */ |
|---|
| | 880 | PyErr_Clear(); |
|---|
| | 881 | py_pos = NULL; |
|---|
| | 882 | } |
|---|
| | 883 | a_position = position_py_to_c(py_pos); |
|---|
| | 884 | if ( !a_position ) |
|---|
| 880 | 885 | return NULL; |
|---|
| 881 | | |
|---|
| 882 | | a_position = position_py_to_c(py_pos); |
|---|
| 883 | 886 | |
|---|
| 884 | 887 | Py_BEGIN_ALLOW_THREADS |
|---|
| … | … | |
| 900 | 903 | |
|---|
| 901 | 904 | if( !PyArg_ParseTuple(args, "O", &py_pos ) ) |
|---|
| | 905 | { |
|---|
| | 906 | /* No argument. Use a default 0 value. */ |
|---|
| | 907 | PyErr_Clear(); |
|---|
| | 908 | py_pos = NULL; |
|---|
| | 909 | } |
|---|
| | 910 | a_position = position_py_to_c(py_pos); |
|---|
| | 911 | if ( !a_position ) |
|---|
| 902 | 912 | return NULL; |
|---|
| 903 | | |
|---|
| 904 | | a_position = position_py_to_c(py_pos); |
|---|
| 905 | 913 | |
|---|
| 906 | 914 | Py_BEGIN_ALLOW_THREADS |
|---|
| … | … | |
| 922 | 930 | |
|---|
| 923 | 931 | if( !PyArg_ParseTuple(args, "O", &py_pos ) ) |
|---|
| | 932 | { |
|---|
| | 933 | /* No argument. Use a default 0 value. */ |
|---|
| | 934 | PyErr_Clear(); |
|---|
| | 935 | py_pos = NULL; |
|---|
| | 936 | } |
|---|
| | 937 | a_position = position_py_to_c(py_pos); |
|---|
| | 938 | if ( !a_position ) |
|---|
| 924 | 939 | return NULL; |
|---|
| 925 | | |
|---|
| 926 | | a_position = position_py_to_c(py_pos); |
|---|
| 927 | 940 | |
|---|
| 928 | 941 | Py_BEGIN_ALLOW_THREADS |
|---|
| … | … | |
| 1311 | 1324 | } |
|---|
| 1312 | 1325 | |
|---|
| 1313 | | if (PyObject_IsInstance(py_position, (PyObject*)&PyPosition_Type)) |
|---|
| | 1326 | if (! py_position) |
|---|
| | 1327 | { |
|---|
| | 1328 | /* If we give a NULL value, it will be considered as |
|---|
| | 1329 | a 0 relative position in mediatime */ |
|---|
| | 1330 | a_position->origin = mediacontrol_RelativePosition; |
|---|
| | 1331 | a_position->key = mediacontrol_MediaTime; |
|---|
| | 1332 | a_position->value = 0; |
|---|
| | 1333 | } |
|---|
| | 1334 | else if (PyObject_IsInstance(py_position, (PyObject*)&PyPosition_Type)) |
|---|
| 1314 | 1335 | { |
|---|
| 1315 | 1336 | a_position->origin = pos->origin; |
|---|