Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
e729adf6
Commit
e729adf6
authored
Jun 18, 2007
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bindings/python: Try to match the libvlc input to media_instance changes.
parent
f1190ffe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
24 deletions
+24
-24
bindings/python/vlc_input.c
bindings/python/vlc_input.c
+23
-23
bindings/python/vlcglue.h
bindings/python/vlcglue.h
+1
-1
No files found.
bindings/python/vlc_input.c
View file @
e729adf6
...
@@ -32,7 +32,7 @@ vlcInput_get_length( PyObject *self, PyObject *args )
...
@@ -32,7 +32,7 @@ vlcInput_get_length( PyObject *self, PyObject *args )
libvlc_exception_t
ex
;
libvlc_exception_t
ex
;
vlc_int64_t
i_ret
;
vlc_int64_t
i_ret
;
LIBVLC_TRY
;
LIBVLC_TRY
;
i_ret
=
libvlc_
input_get_length
(
LIBVLC_INPUT
->
p_input
,
&
ex
);
i_ret
=
libvlc_
media_instancet_get_length
(
libvlc_media_instanceT
->
p_md
,
&
ex
);
LIBVLC_EXCEPT
;
LIBVLC_EXCEPT
;
return
Py_BuildValue
(
"L"
,
i_ret
);
return
Py_BuildValue
(
"L"
,
i_ret
);
}
}
...
@@ -43,7 +43,7 @@ vlcInput_get_time( PyObject *self, PyObject *args )
...
@@ -43,7 +43,7 @@ vlcInput_get_time( PyObject *self, PyObject *args )
libvlc_exception_t
ex
;
libvlc_exception_t
ex
;
vlc_int64_t
i_ret
;
vlc_int64_t
i_ret
;
LIBVLC_TRY
;
LIBVLC_TRY
;
i_ret
=
libvlc_
input_get_time
(
LIBVLC_INPUT
->
p_input
,
&
ex
);
i_ret
=
libvlc_
media_instancet_get_time
(
libvlc_media_instanceT
->
p_md
,
&
ex
);
LIBVLC_EXCEPT
;
LIBVLC_EXCEPT
;
return
Py_BuildValue
(
"L"
,
i_ret
);
return
Py_BuildValue
(
"L"
,
i_ret
);
}
}
...
@@ -58,7 +58,7 @@ vlcInput_set_time( PyObject *self, PyObject *args )
...
@@ -58,7 +58,7 @@ vlcInput_set_time( PyObject *self, PyObject *args )
return
NULL
;
return
NULL
;
LIBVLC_TRY
;
LIBVLC_TRY
;
libvlc_
input_set_time
(
LIBVLC_INPUT
->
p_input
,
i_time
,
&
ex
);
libvlc_
media_instancet_set_time
(
libvlc_media_instanceT
->
p_md
,
i_time
,
&
ex
);
LIBVLC_EXCEPT
;
LIBVLC_EXCEPT
;
Py_INCREF
(
Py_None
);
Py_INCREF
(
Py_None
);
return
Py_None
;
return
Py_None
;
...
@@ -70,7 +70,7 @@ vlcInput_get_position( PyObject *self, PyObject *args )
...
@@ -70,7 +70,7 @@ vlcInput_get_position( PyObject *self, PyObject *args )
libvlc_exception_t
ex
;
libvlc_exception_t
ex
;
float
f_ret
;
float
f_ret
;
LIBVLC_TRY
;
LIBVLC_TRY
;
f_ret
=
libvlc_
input_get_position
(
LIBVLC_INPUT
->
p_input
,
&
ex
);
f_ret
=
libvlc_
media_instancet_get_position
(
libvlc_media_instanceT
->
p_md
,
&
ex
);
LIBVLC_EXCEPT
;
LIBVLC_EXCEPT
;
return
Py_BuildValue
(
"f"
,
f_ret
);
return
Py_BuildValue
(
"f"
,
f_ret
);
}
}
...
@@ -85,7 +85,7 @@ vlcInput_set_position( PyObject *self, PyObject *args )
...
@@ -85,7 +85,7 @@ vlcInput_set_position( PyObject *self, PyObject *args )
return
NULL
;
return
NULL
;
LIBVLC_TRY
;
LIBVLC_TRY
;
libvlc_
input_set_position
(
LIBVLC_INPUT
->
p_input
,
f_pos
,
&
ex
);
libvlc_
media_instancet_set_position
(
libvlc_media_instanceT
->
p_md
,
f_pos
,
&
ex
);
LIBVLC_EXCEPT
;
LIBVLC_EXCEPT
;
Py_INCREF
(
Py_None
);
Py_INCREF
(
Py_None
);
return
Py_None
;
return
Py_None
;
...
@@ -97,7 +97,7 @@ vlcInput_will_play( PyObject *self, PyObject *args )
...
@@ -97,7 +97,7 @@ vlcInput_will_play( PyObject *self, PyObject *args )
libvlc_exception_t
ex
;
libvlc_exception_t
ex
;
int
i_ret
;
int
i_ret
;
LIBVLC_TRY
;
LIBVLC_TRY
;
i_ret
=
libvlc_
input_will_play
(
LIBVLC_INPUT
->
p_input
,
&
ex
);
i_ret
=
libvlc_
media_instancet_will_play
(
libvlc_media_instanceT
->
p_md
,
&
ex
);
LIBVLC_EXCEPT
;
LIBVLC_EXCEPT
;
return
Py_BuildValue
(
"i"
,
i_ret
);
return
Py_BuildValue
(
"i"
,
i_ret
);
}
}
...
@@ -108,7 +108,7 @@ vlcInput_get_rate( PyObject *self, PyObject *args )
...
@@ -108,7 +108,7 @@ vlcInput_get_rate( PyObject *self, PyObject *args )
libvlc_exception_t
ex
;
libvlc_exception_t
ex
;
float
f_ret
;
float
f_ret
;
LIBVLC_TRY
;
LIBVLC_TRY
;
f_ret
=
libvlc_
input_get_rate
(
LIBVLC_INPUT
->
p_input
,
&
ex
);
f_ret
=
libvlc_
media_instancet_get_rate
(
libvlc_media_instanceT
->
p_md
,
&
ex
);
LIBVLC_EXCEPT
;
LIBVLC_EXCEPT
;
return
Py_BuildValue
(
"f"
,
f_ret
);
return
Py_BuildValue
(
"f"
,
f_ret
);
}
}
...
@@ -123,7 +123,7 @@ vlcInput_set_rate( PyObject *self, PyObject *args )
...
@@ -123,7 +123,7 @@ vlcInput_set_rate( PyObject *self, PyObject *args )
return
NULL
;
return
NULL
;
LIBVLC_TRY
;
LIBVLC_TRY
;
libvlc_
input_set_rate
(
LIBVLC_INPUT
->
p_input
,
f_rate
,
&
ex
);
libvlc_
media_instancet_set_rate
(
libvlc_media_instanceT
->
p_md
,
f_rate
,
&
ex
);
LIBVLC_EXCEPT
;
LIBVLC_EXCEPT
;
Py_INCREF
(
Py_None
);
Py_INCREF
(
Py_None
);
return
Py_None
;
return
Py_None
;
...
@@ -135,7 +135,7 @@ vlcInput_get_state( PyObject *self, PyObject *args )
...
@@ -135,7 +135,7 @@ vlcInput_get_state( PyObject *self, PyObject *args )
libvlc_exception_t
ex
;
libvlc_exception_t
ex
;
int
i_ret
;
int
i_ret
;
LIBVLC_TRY
;
LIBVLC_TRY
;
i_ret
=
libvlc_
input_get_state
(
LIBVLC_INPUT
->
p_input
,
&
ex
);
i_ret
=
libvlc_
media_instancet_get_state
(
libvlc_media_instanceT
->
p_md
,
&
ex
);
LIBVLC_EXCEPT
;
LIBVLC_EXCEPT
;
return
Py_BuildValue
(
"i"
,
i_ret
);
return
Py_BuildValue
(
"i"
,
i_ret
);
}
}
...
@@ -146,7 +146,7 @@ vlcInput_has_vout( PyObject *self, PyObject *args )
...
@@ -146,7 +146,7 @@ vlcInput_has_vout( PyObject *self, PyObject *args )
libvlc_exception_t
ex
;
libvlc_exception_t
ex
;
int
i_ret
;
int
i_ret
;
LIBVLC_TRY
;
LIBVLC_TRY
;
i_ret
=
libvlc_
input_has_vout
(
LIBVLC_INPUT
->
p_input
,
&
ex
);
i_ret
=
libvlc_
media_instancet_has_vout
(
libvlc_media_instanceT
->
p_md
,
&
ex
);
LIBVLC_EXCEPT
;
LIBVLC_EXCEPT
;
return
Py_BuildValue
(
"i"
,
i_ret
);
return
Py_BuildValue
(
"i"
,
i_ret
);
}
}
...
@@ -157,7 +157,7 @@ vlcInput_get_fps( PyObject *self, PyObject *args )
...
@@ -157,7 +157,7 @@ vlcInput_get_fps( PyObject *self, PyObject *args )
libvlc_exception_t
ex
;
libvlc_exception_t
ex
;
float
f_ret
;
float
f_ret
;
LIBVLC_TRY
;
LIBVLC_TRY
;
f_ret
=
libvlc_
input_get_fps
(
LIBVLC_INPUT
->
p_input
,
&
ex
);
f_ret
=
libvlc_
media_instancet_get_fps
(
libvlc_media_instanceT
->
p_md
,
&
ex
);
LIBVLC_EXCEPT
;
LIBVLC_EXCEPT
;
return
Py_BuildValue
(
"f"
,
f_ret
);
return
Py_BuildValue
(
"f"
,
f_ret
);
}
}
...
@@ -169,7 +169,7 @@ vlcInput_audio_get_track( PyObject *self, PyObject *args )
...
@@ -169,7 +169,7 @@ vlcInput_audio_get_track( PyObject *self, PyObject *args )
int
i_ret
;
int
i_ret
;
LIBVLC_TRY
;
LIBVLC_TRY
;
i_ret
=
libvlc_audio_get_track
(
LIBVLC_INPUT
->
p_input
,
&
ex
);
i_ret
=
libvlc_audio_get_track
(
libvlc_media_instanceT
->
p_md
,
&
ex
);
LIBVLC_EXCEPT
;
LIBVLC_EXCEPT
;
return
Py_BuildValue
(
"i"
,
i_ret
);
return
Py_BuildValue
(
"i"
,
i_ret
);
}
}
...
@@ -184,7 +184,7 @@ vlcInput_audio_set_track( PyObject *self, PyObject *args )
...
@@ -184,7 +184,7 @@ vlcInput_audio_set_track( PyObject *self, PyObject *args )
return
NULL
;
return
NULL
;
LIBVLC_TRY
;
LIBVLC_TRY
;
libvlc_audio_set_track
(
LIBVLC_INPUT
->
p_input
,
i_track
,
&
ex
);
libvlc_audio_set_track
(
libvlc_media_instanceT
->
p_md
,
i_track
,
&
ex
);
LIBVLC_EXCEPT
;
LIBVLC_EXCEPT
;
Py_INCREF
(
Py_None
);
Py_INCREF
(
Py_None
);
return
Py_None
;
return
Py_None
;
...
@@ -196,7 +196,7 @@ vlcInput_toggle_fullscreen( PyObject *self, PyObject *args )
...
@@ -196,7 +196,7 @@ vlcInput_toggle_fullscreen( PyObject *self, PyObject *args )
libvlc_exception_t
ex
;
libvlc_exception_t
ex
;
LIBVLC_TRY
;
LIBVLC_TRY
;
libvlc_toggle_fullscreen
(
LIBVLC_INPUT
->
p_input
,
&
ex
);
libvlc_toggle_fullscreen
(
libvlc_media_instanceT
->
p_md
,
&
ex
);
LIBVLC_EXCEPT
;
LIBVLC_EXCEPT
;
Py_INCREF
(
Py_None
);
Py_INCREF
(
Py_None
);
return
Py_None
;
return
Py_None
;
...
@@ -212,7 +212,7 @@ vlcInput_set_fullscreen( PyObject *self, PyObject *args )
...
@@ -212,7 +212,7 @@ vlcInput_set_fullscreen( PyObject *self, PyObject *args )
return
NULL
;
return
NULL
;
LIBVLC_TRY
;
LIBVLC_TRY
;
libvlc_set_fullscreen
(
LIBVLC_INPUT
->
p_input
,
i_fullscreen
,
&
ex
);
libvlc_set_fullscreen
(
libvlc_media_instanceT
->
p_md
,
i_fullscreen
,
&
ex
);
LIBVLC_EXCEPT
;
LIBVLC_EXCEPT
;
Py_INCREF
(
Py_None
);
Py_INCREF
(
Py_None
);
return
Py_None
;
return
Py_None
;
...
@@ -225,7 +225,7 @@ vlcInput_get_fullscreen( PyObject *self, PyObject *args )
...
@@ -225,7 +225,7 @@ vlcInput_get_fullscreen( PyObject *self, PyObject *args )
int
i_ret
;
int
i_ret
;
LIBVLC_TRY
;
LIBVLC_TRY
;
i_ret
=
libvlc_get_fullscreen
(
LIBVLC_INPUT
->
p_input
,
&
ex
);
i_ret
=
libvlc_get_fullscreen
(
libvlc_media_instanceT
->
p_md
,
&
ex
);
LIBVLC_EXCEPT
;
LIBVLC_EXCEPT
;
return
Py_BuildValue
(
"i"
,
i_ret
);
return
Py_BuildValue
(
"i"
,
i_ret
);
}
}
...
@@ -237,7 +237,7 @@ vlcInput_get_height( PyObject *self, PyObject *args )
...
@@ -237,7 +237,7 @@ vlcInput_get_height( PyObject *self, PyObject *args )
int
i_ret
;
int
i_ret
;
LIBVLC_TRY
;
LIBVLC_TRY
;
i_ret
=
libvlc_video_get_height
(
LIBVLC_INPUT
->
p_input
,
&
ex
);
i_ret
=
libvlc_video_get_height
(
libvlc_media_instanceT
->
p_md
,
&
ex
);
LIBVLC_EXCEPT
;
LIBVLC_EXCEPT
;
return
Py_BuildValue
(
"i"
,
i_ret
);
return
Py_BuildValue
(
"i"
,
i_ret
);
}
}
...
@@ -249,7 +249,7 @@ vlcInput_get_width( PyObject *self, PyObject *args )
...
@@ -249,7 +249,7 @@ vlcInput_get_width( PyObject *self, PyObject *args )
int
i_ret
;
int
i_ret
;
LIBVLC_TRY
;
LIBVLC_TRY
;
i_ret
=
libvlc_video_get_width
(
LIBVLC_INPUT
->
p_input
,
&
ex
);
i_ret
=
libvlc_video_get_width
(
libvlc_media_instanceT
->
p_md
,
&
ex
);
LIBVLC_EXCEPT
;
LIBVLC_EXCEPT
;
return
Py_BuildValue
(
"i"
,
i_ret
);
return
Py_BuildValue
(
"i"
,
i_ret
);
}
}
...
@@ -262,7 +262,7 @@ vlcInput_get_aspect_ratio( PyObject *self, PyObject *args )
...
@@ -262,7 +262,7 @@ vlcInput_get_aspect_ratio( PyObject *self, PyObject *args )
PyObject
*
o_ret
;
PyObject
*
o_ret
;
LIBVLC_TRY
;
LIBVLC_TRY
;
psz_ret
=
libvlc_video_get_aspect_ratio
(
LIBVLC_INPUT
->
p_input
,
&
ex
);
psz_ret
=
libvlc_video_get_aspect_ratio
(
libvlc_media_instanceT
->
p_md
,
&
ex
);
LIBVLC_EXCEPT
;
LIBVLC_EXCEPT
;
o_ret
=
Py_BuildValue
(
"s"
,
psz_ret
);
o_ret
=
Py_BuildValue
(
"s"
,
psz_ret
);
free
(
psz_ret
);
free
(
psz_ret
);
...
@@ -279,7 +279,7 @@ vlcInput_set_aspect_ratio( PyObject *self, PyObject *args )
...
@@ -279,7 +279,7 @@ vlcInput_set_aspect_ratio( PyObject *self, PyObject *args )
return
NULL
;
return
NULL
;
LIBVLC_TRY
;
LIBVLC_TRY
;
libvlc_video_set_aspect_ratio
(
LIBVLC_INPUT
->
p_input
,
psz_ratio
,
&
ex
);
libvlc_video_set_aspect_ratio
(
libvlc_media_instanceT
->
p_md
,
psz_ratio
,
&
ex
);
LIBVLC_EXCEPT
;
LIBVLC_EXCEPT
;
free
(
psz_ratio
);
free
(
psz_ratio
);
Py_INCREF
(
Py_None
);
Py_INCREF
(
Py_None
);
...
@@ -296,7 +296,7 @@ vlcInput_video_take_snapshot( PyObject *self, PyObject *args )
...
@@ -296,7 +296,7 @@ vlcInput_video_take_snapshot( PyObject *self, PyObject *args )
return
NULL
;
return
NULL
;
LIBVLC_TRY
;
LIBVLC_TRY
;
libvlc_video_take_snapshot
(
LIBVLC_INPUT
->
p_input
,
psz_filename
,
&
ex
);
libvlc_video_take_snapshot
(
libvlc_media_instanceT
->
p_md
,
psz_filename
,
&
ex
);
LIBVLC_EXCEPT
;
LIBVLC_EXCEPT
;
Py_INCREF
(
Py_None
);
Py_INCREF
(
Py_None
);
return
Py_None
;
return
Py_None
;
...
@@ -313,7 +313,7 @@ vlcInput_video_resize( PyObject *self, PyObject *args )
...
@@ -313,7 +313,7 @@ vlcInput_video_resize( PyObject *self, PyObject *args )
return
NULL
;
return
NULL
;
LIBVLC_TRY
;
LIBVLC_TRY
;
libvlc_video_resize
(
LIBVLC_INPUT
->
p_input
,
i_width
,
i_height
,
&
ex
);
libvlc_video_resize
(
libvlc_media_instanceT
->
p_md
,
i_width
,
i_height
,
&
ex
);
LIBVLC_EXCEPT
;
LIBVLC_EXCEPT
;
Py_INCREF
(
Py_None
);
Py_INCREF
(
Py_None
);
return
Py_None
;
return
Py_None
;
...
@@ -330,7 +330,7 @@ vlcInput_video_reparent( PyObject *self, PyObject *args )
...
@@ -330,7 +330,7 @@ vlcInput_video_reparent( PyObject *self, PyObject *args )
return
NULL
;
return
NULL
;
LIBVLC_TRY
;
LIBVLC_TRY
;
i_ret
=
libvlc_video_reparent
(
LIBVLC_INPUT
->
p_input
,
i_visual
,
&
ex
);
i_ret
=
libvlc_video_reparent
(
libvlc_media_instanceT
->
p_md
,
i_visual
,
&
ex
);
LIBVLC_EXCEPT
;
LIBVLC_EXCEPT
;
return
Py_BuildValue
(
"i"
,
i_ret
);
return
Py_BuildValue
(
"i"
,
i_ret
);
}
}
...
...
bindings/python/vlcglue.h
View file @
e729adf6
...
@@ -118,7 +118,7 @@ typedef struct
...
@@ -118,7 +118,7 @@ typedef struct
typedef
struct
typedef
struct
{
{
PyObject_HEAD
PyObject_HEAD
libvlc_
input_t
*
p_input
;
libvlc_
media_instance_t
*
p_md
;
}
vlcInput
;
}
vlcInput
;
/* Forward declarations */
/* Forward declarations */
...
...
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