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
91f06acc
Commit
91f06acc
authored
Aug 03, 2009
by
Olivier Aubert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
python-ctypes: give running example
Invoking python vlc.py filename.avi will play the given movie.
parent
cdb7b4af
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
bindings/python-ctypes/footer.py
bindings/python-ctypes/footer.py
+15
-3
bindings/python-ctypes/header.py
bindings/python-ctypes/header.py
+2
-0
No files found.
bindings/python-ctypes/footer.py
View file @
91f06acc
...
...
@@ -40,14 +40,26 @@ callbackmethod=ctypes.CFUNCTYPE(None, Event, ctypes.c_void_p)
@
callbackmethod
def
debug_callback
(
event
,
data
):
print
"Debug callback method"
print
"Event:"
,
event
print
"Event:"
,
event
.
type
print
"Data"
,
data
if
__name__
==
'__main__'
:
import
sys
import
gobject
@
callbackmethod
def
end_callback
(
event
,
data
):
print
"End of stream"
sys
.
exit
(
0
)
if
sys
.
argv
[
1
:]:
i
=
vlc
.
Instance
()
i
=
Instance
()
m
=
i
.
media_new
(
sys
.
argv
[
1
])
p
=
MediaPlayer
()
p
=
i
.
media_player_new
()
p
.
set_media
(
m
)
p
.
play
()
# Loop
e
=
p
.
event_manager
()
e
.
event_attach
(
EventType
.
MediaPlayerPaused
,
end_callback
,
None
)
gobject
.
MainLoop
().
run
()
bindings/python-ctypes/header.py
View file @
91f06acc
...
...
@@ -154,3 +154,5 @@ def check_vlc_exception(result, func, args):
if
c
:
raise
Exception
(
args
[
-
1
].
message
)
return
result
### End of header.py ###
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