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
22f86cc3
Commit
22f86cc3
authored
Mar 02, 2009
by
JP Dinger
Committed by
Olivier Aubert
Mar 02, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More macro parametrization.
Signed-off-by:
Olivier Aubert
<
olivier.aubert@liris.cnrs.fr
>
parent
b1def0f0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
42 deletions
+41
-42
bindings/python/vlc_internal.c
bindings/python/vlc_internal.c
+16
-17
bindings/python/vlc_internal.h
bindings/python/vlc_internal.h
+1
-1
bindings/python/vlc_mediacontrol.c
bindings/python/vlc_mediacontrol.c
+23
-23
bindings/python/vlcglue.h
bindings/python/vlcglue.h
+1
-1
No files found.
bindings/python/vlc_internal.c
View file @
22f86cc3
...
...
@@ -110,10 +110,10 @@ static PyObject
static
PyObject
*
vlcObject_release
(
PyObject
*
self
,
PyObject
*
p_args
)
{
if
(
VLCSELF
->
b_released
==
0
)
if
(
(
vlcObject
*
)
self
->
b_released
==
0
)
{
vlc_object_release
(
VLC
SELF
->
p_object
);
VLCSELF
->
b_released
=
1
;
vlc_object_release
(
VLC
OBJ
(
self
)
);
(
vlcObject
*
)
self
->
b_released
=
1
;
}
Py_INCREF
(
Py_None
);
return
Py_None
;
...
...
@@ -239,7 +239,7 @@ vlcObject_find_object( PyObject *self, PyObject *args )
return
Py_None
;
}
p_obj
=
vlc_object_find
(
VLC
SELF
->
p_object
,
i_object_type
,
FIND_ANYWHERE
);
p_obj
=
vlc_object_find
(
VLC
OBJ
(
self
)
,
i_object_type
,
FIND_ANYWHERE
);
if
(
!
p_obj
)
{
...
...
@@ -264,7 +264,7 @@ vlcObject_find_name( PyObject *self, PyObject *args )
if
(
!
PyArg_ParseTuple
(
args
,
"s"
,
&
psz_name
)
)
return
NULL
;
p_obj
=
vlc_object_find_name
(
VLC
SELF
->
p_object
,
psz_name
,
FIND_ANYWHERE
);
p_obj
=
vlc_object_find_name
(
VLC
OBJ
(
self
)
,
psz_name
,
FIND_ANYWHERE
);
if
(
!
p_obj
)
{
...
...
@@ -286,7 +286,7 @@ vlcObject_info( PyObject *self, PyObject *args )
vlc_object_t
*
p_obj
;
vlc_object_internals_t
*
p_priv
;
p_obj
=
VLC
SELF
->
p_object
;
p_obj
=
VLC
OBJ
(
self
)
;
p_priv
=
vlc_internals
(
p_obj
);
/* Return information about the object as a dict. */
...
...
@@ -344,14 +344,14 @@ vlcObject_var_get( PyObject *self, PyObject *args )
if
(
!
PyArg_ParseTuple
(
args
,
"s"
,
&
psz_name
)
)
return
NULL
;
if
(
var_Get
(
VLC
SELF
->
p_object
,
psz_name
,
&
value
)
!=
VLC_SUCCESS
)
if
(
var_Get
(
VLC
OBJ
(
self
)
,
psz_name
,
&
value
)
!=
VLC_SUCCESS
)
{
PyErr_SetString
(
PyExc_StandardError
,
"Error: variable does not exist.
\n
"
);
return
NULL
;
}
i_type
=
var_Type
(
VLC
SELF
->
p_object
,
psz_name
);
i_type
=
var_Type
(
VLC
OBJ
(
self
)
,
psz_name
);
switch
(
i_type
)
{
...
...
@@ -410,7 +410,7 @@ vlcObject_var_type( PyObject *self, PyObject *args )
if
(
!
PyArg_ParseTuple
(
args
,
"s"
,
&
psz_name
)
)
return
NULL
;
i_type
=
var_Type
(
VLC
SELF
->
p_object
,
psz_name
);
i_type
=
var_Type
(
VLC
OBJ
(
self
)
,
psz_name
);
switch
(
i_type
)
{
...
...
@@ -475,7 +475,7 @@ vlcObject_var_set( PyObject *self, PyObject *args )
if
(
!
PyArg_ParseTuple
(
args
,
"sO"
,
&
psz_name
,
&
py_value
)
)
return
NULL
;
p_obj
=
VLC
SELF
->
p_object
;
p_obj
=
VLC
OBJ
(
self
)
;
i_type
=
var_Type
(
p_obj
,
psz_name
);
switch
(
i_type
)
...
...
@@ -530,7 +530,7 @@ vlcObject_var_list( PyObject *self, PyObject *args )
Py_ssize_t
i_index
;
vlc_object_internals_t
*
p_priv
;
p_priv
=
vlc_internals
(
VLC
SELF
->
p_object
);
p_priv
=
vlc_internals
(
VLC
OBJ
(
self
)
);
i_size
=
p_priv
->
i_vars
;
p_retval
=
PyTuple_New
(
i_size
);
...
...
@@ -556,7 +556,7 @@ vlcObject_config_get( PyObject *self, PyObject *args )
if
(
!
PyArg_ParseTuple
(
args
,
"s"
,
&
psz_name
)
)
return
NULL
;
p_config
=
config_FindConfig
(
VLC
SELF
->
p_object
,
psz_name
);
p_config
=
config_FindConfig
(
VLC
OBJ
(
self
)
,
psz_name
);
if
(
!
p_config
)
{
...
...
@@ -614,7 +614,7 @@ vlcObject_config_set( PyObject *self, PyObject *args )
if
(
!
PyArg_ParseTuple
(
args
,
"sO"
,
&
psz_name
,
&
py_value
)
)
return
NULL
;
p_obj
=
VLC
SELF
->
p_object
;
p_obj
=
VLC
OBJ
(
self
)
;
p_config
=
config_FindConfig
(
p_obj
,
psz_name
);
/* sanity checks */
if
(
!
p_config
)
...
...
@@ -652,14 +652,13 @@ vlcObject_children( PyObject *self, PyObject *args )
Py_ssize_t
i_size
;
Py_ssize_t
i_index
;
i_size
=
VLC
SELF
->
p_object
->
i_children
;
i_size
=
VLC
OBJ
(
self
)
->
i_children
;
p_retval
=
PyTuple_New
(
i_size
);
for
(
i_index
=
0
;
i_index
<
i_size
;
i_index
++
)
{
PyTuple_SetItem
(
p_retval
,
i_index
,
Py_BuildValue
(
"i"
,
VLCSELF
->
p_object
->
pp_children
[
i_index
]
->
i_object_id
)
);
PyTuple_SetItem
(
p_retval
,
i_index
,
Py_BuildValue
(
"i"
,
VLCOBJ
(
self
)
->
pp_children
[
i_index
]
->
i_object_id
)
);
}
return
p_retval
;
...
...
bindings/python/vlc_internal.h
View file @
22f86cc3
...
...
@@ -46,7 +46,7 @@ typedef int Py_ssize_t;
/**********************************************************************
* VLC Object
**********************************************************************/
#define VLC
SELF ( ( vlcObject* )self
)
#define VLC
OBJ(self) (((vlcObject*)self)->p_object
)
/**********************************************************************
* VLCObject Object
...
...
bindings/python/vlc_mediacontrol.c
View file @
22f86cc3
...
...
@@ -97,7 +97,7 @@ MediaControl_new( PyTypeObject *type, PyObject *args, PyObject *kwds )
{
self
->
mc
=
mediacontrol_new
(
i_size
,
ppsz_args
,
exception
);
self
->
vlc_instance
=
PyObject_New
(
vlcInstance
,
&
vlcInstance_Type
);
self
->
vlc_instance
->
p_instance
=
mediacontrol_get_libvlc_instance
(
SELF
->
mc
);
self
->
vlc_instance
->
p_instance
=
mediacontrol_get_libvlc_instance
(
LIBVLC_MC
(
self
)
);
}
MC_EXCEPT
;
Py_END_ALLOW_THREADS
...
...
@@ -110,7 +110,7 @@ static void
MediaControl_dealloc
(
PyObject
*
self
)
{
fprintf
(
stderr
,
"MC dealloc
\n
"
);
Py_DECREF
(
SELF
->
vlc_instance
);
Py_DECREF
(
((
MediaControl
*
)
self
)
->
vlc_instance
);
PyObject_DEL
(
self
);
}
...
...
@@ -119,7 +119,7 @@ MediaControl_get_vlc_instance( PyObject *self, PyObject *args )
{
vlcInstance
*
p_ret
;
p_ret
=
SELF
->
vlc_instance
;
p_ret
=
((
MediaControl
*
)
self
)
->
vlc_instance
;
Py_INCREF
(
p_ret
);
return
(
PyObject
*
)
p_ret
;
}
...
...
@@ -130,7 +130,7 @@ MediaControl_get_mediaplayer( PyObject *self, PyObject *args )
vlcMediaPlayer
*
p_ret
;
p_ret
=
PyObject_New
(
vlcMediaPlayer
,
&
vlcMediaPlayer_Type
);
p_ret
->
p_mp
=
mediacontrol_get_media_player
(
SELF
->
mc
);
p_ret
->
p_mp
=
mediacontrol_get_media_player
(
LIBVLC_MC
(
self
)
);
Py_INCREF
(
p_ret
);
return
(
PyObject
*
)
p_ret
;
}
...
...
@@ -159,7 +159,7 @@ MediaControl_get_media_position( PyObject *self, PyObject *args )
Py_BEGIN_ALLOW_THREADS
MC_TRY
;
pos
=
mediacontrol_get_media_position
(
SELF
->
mc
,
origin
,
key
,
exception
);
pos
=
mediacontrol_get_media_position
(
LIBVLC_MC
(
self
)
,
origin
,
key
,
exception
);
Py_END_ALLOW_THREADS
MC_EXCEPT
;
...
...
@@ -188,7 +188,7 @@ MediaControl_set_media_position( PyObject *self, PyObject *args )
Py_BEGIN_ALLOW_THREADS
MC_TRY
;
mediacontrol_set_media_position
(
SELF
->
mc
,
a_position
,
exception
);
mediacontrol_set_media_position
(
LIBVLC_MC
(
self
)
,
a_position
,
exception
);
free
(
a_position
);
Py_END_ALLOW_THREADS
MC_EXCEPT
;
...
...
@@ -216,7 +216,7 @@ MediaControl_start( PyObject *self, PyObject *args )
Py_BEGIN_ALLOW_THREADS
MC_TRY
;
mediacontrol_start
(
SELF
->
mc
,
a_position
,
exception
);
mediacontrol_start
(
LIBVLC_MC
(
self
)
,
a_position
,
exception
);
free
(
a_position
);
Py_END_ALLOW_THREADS
MC_EXCEPT
;
...
...
@@ -232,7 +232,7 @@ MediaControl_pause( PyObject *self, PyObject *args )
Py_BEGIN_ALLOW_THREADS
MC_TRY
;
mediacontrol_pause
(
SELF
->
mc
,
exception
);
mediacontrol_pause
(
LIBVLC_MC
(
self
)
,
exception
);
Py_END_ALLOW_THREADS
MC_EXCEPT
;
...
...
@@ -247,7 +247,7 @@ MediaControl_resume( PyObject *self, PyObject *args )
Py_BEGIN_ALLOW_THREADS
MC_TRY
;
mediacontrol_resume
(
SELF
->
mc
,
exception
);
mediacontrol_resume
(
LIBVLC_MC
(
self
)
,
exception
);
Py_END_ALLOW_THREADS
MC_EXCEPT
;
...
...
@@ -262,7 +262,7 @@ MediaControl_stop( PyObject *self, PyObject *args )
Py_BEGIN_ALLOW_THREADS
MC_TRY
;
mediacontrol_stop
(
SELF
->
mc
,
exception
);
mediacontrol_stop
(
LIBVLC_MC
(
self
)
,
exception
);
Py_END_ALLOW_THREADS
MC_EXCEPT
;
...
...
@@ -273,7 +273,7 @@ MediaControl_stop( PyObject *self, PyObject *args )
static
PyObject
*
MediaControl_exit
(
PyObject
*
self
,
PyObject
*
args
)
{
mediacontrol_exit
(
SELF
->
mc
);
mediacontrol_exit
(
LIBVLC_MC
(
self
)
);
Py_INCREF
(
Py_None
);
return
Py_None
;
}
...
...
@@ -289,7 +289,7 @@ MediaControl_set_mrl( PyObject *self, PyObject *args )
Py_BEGIN_ALLOW_THREADS
MC_TRY
;
mediacontrol_set_mrl
(
SELF
->
mc
,
psz_file
,
exception
);
mediacontrol_set_mrl
(
LIBVLC_MC
(
self
)
,
psz_file
,
exception
);
Py_END_ALLOW_THREADS
MC_EXCEPT
;
...
...
@@ -306,7 +306,7 @@ MediaControl_get_mrl( PyObject *self, PyObject *args )
Py_BEGIN_ALLOW_THREADS
MC_TRY
;
psz_file
=
mediacontrol_get_mrl
(
SELF
->
mc
,
exception
);
psz_file
=
mediacontrol_get_mrl
(
LIBVLC_MC
(
self
)
,
exception
);
Py_END_ALLOW_THREADS
MC_EXCEPT
;
...
...
@@ -331,7 +331,7 @@ MediaControl_snapshot( PyObject *self, PyObject *args )
Py_BEGIN_ALLOW_THREADS
MC_TRY
;
p_retval
=
mediacontrol_snapshot
(
SELF
->
mc
,
a_position
,
exception
);
p_retval
=
mediacontrol_snapshot
(
LIBVLC_MC
(
self
)
,
a_position
,
exception
);
free
(
a_position
);
Py_END_ALLOW_THREADS
MC_EXCEPT
;
...
...
@@ -378,7 +378,7 @@ MediaControl_display_text( PyObject *self, PyObject *args )
Py_BEGIN_ALLOW_THREADS
MC_TRY
;
mediacontrol_display_text
(
SELF
->
mc
,
message
,
begin
,
end
,
exception
);
mediacontrol_display_text
(
LIBVLC_MC
(
self
)
,
message
,
begin
,
end
,
exception
);
Py_END_ALLOW_THREADS
MC_EXCEPT
;
...
...
@@ -399,7 +399,7 @@ MediaControl_get_stream_information( PyObject *self, PyObject *args )
Py_BEGIN_ALLOW_THREADS
MC_TRY
;
retval
=
mediacontrol_get_stream_information
(
SELF
->
mc
,
mediacontrol_MediaTime
,
exception
);
LIBVLC_MC
(
self
)
,
mediacontrol_MediaTime
,
exception
);
Py_END_ALLOW_THREADS
MC_EXCEPT
;
...
...
@@ -431,7 +431,7 @@ MediaControl_sound_set_volume( PyObject *self, PyObject *args )
Py_BEGIN_ALLOW_THREADS
MC_TRY
;
mediacontrol_sound_set_volume
(
SELF
->
mc
,
volume
,
exception
);
mediacontrol_sound_set_volume
(
LIBVLC_MC
(
self
)
,
volume
,
exception
);
Py_END_ALLOW_THREADS
MC_EXCEPT
;
...
...
@@ -448,7 +448,7 @@ MediaControl_sound_get_volume( PyObject *self, PyObject *args )
Py_BEGIN_ALLOW_THREADS
MC_TRY
;
volume
=
mediacontrol_sound_get_volume
(
SELF
->
mc
,
exception
);
volume
=
mediacontrol_sound_get_volume
(
LIBVLC_MC
(
self
)
,
exception
);
Py_END_ALLOW_THREADS
MC_EXCEPT
;
...
...
@@ -467,7 +467,7 @@ MediaControl_set_rate( PyObject *self, PyObject *args )
Py_BEGIN_ALLOW_THREADS
MC_TRY
;
mediacontrol_set_rate
(
SELF
->
mc
,
rate
,
exception
);
mediacontrol_set_rate
(
LIBVLC_MC
(
self
)
,
rate
,
exception
);
Py_END_ALLOW_THREADS
MC_EXCEPT
;
...
...
@@ -484,7 +484,7 @@ MediaControl_get_rate( PyObject *self, PyObject *args )
Py_BEGIN_ALLOW_THREADS
MC_TRY
;
rate
=
mediacontrol_get_rate
(
SELF
->
mc
,
exception
);
rate
=
mediacontrol_get_rate
(
LIBVLC_MC
(
self
)
,
exception
);
Py_END_ALLOW_THREADS
MC_EXCEPT
;
...
...
@@ -503,7 +503,7 @@ MediaControl_set_fullscreen( PyObject *self, PyObject *args )
Py_BEGIN_ALLOW_THREADS
MC_TRY
;
mediacontrol_set_fullscreen
(
SELF
->
mc
,
fs
,
exception
);
mediacontrol_set_fullscreen
(
LIBVLC_MC
(
self
)
,
fs
,
exception
);
Py_END_ALLOW_THREADS
MC_EXCEPT
;
...
...
@@ -520,7 +520,7 @@ MediaControl_get_fullscreen( PyObject *self, PyObject *args )
Py_BEGIN_ALLOW_THREADS
MC_TRY
;
fs
=
mediacontrol_get_fullscreen
(
SELF
->
mc
,
exception
);
fs
=
mediacontrol_get_fullscreen
(
LIBVLC_MC
(
self
)
,
exception
);
Py_END_ALLOW_THREADS
MC_EXCEPT
;
...
...
@@ -539,7 +539,7 @@ MediaControl_set_visual( PyObject *self, PyObject *args )
Py_BEGIN_ALLOW_THREADS
MC_TRY
;
mediacontrol_set_visual
(
SELF
->
mc
,
visual
,
exception
);
mediacontrol_set_visual
(
LIBVLC_MC
(
self
)
,
visual
,
exception
);
Py_END_ALLOW_THREADS
MC_EXCEPT
;
...
...
bindings/python/vlcglue.h
View file @
22f86cc3
...
...
@@ -40,7 +40,6 @@ typedef int Py_ssize_t;
#define PY_SSIZE_T_MIN INT_MIN
#endif
#define SELF ((MediaControl*)self)
/**********************************************************************
* Exceptions handling
...
...
@@ -138,6 +137,7 @@ staticforward PyTypeObject vlcMedia_Type;
#define LIBVLC_INSTANCE(self) (((vlcInstance*)self)->p_instance)
#define LIBVLC_MEDIAPLAYER(self) (((vlcMediaPlayer*)self)->p_mp)
#define LIBVLC_MEDIA(self) (((vlcMedia*)self)->p_media)
#define LIBVLC_MC(self) (((MediaControl*)self)->mc)
#define LIBVLC_TRY libvlc_exception_init( &ex );
...
...
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