[vlc-commits] python bindings: fix marquee filter declaration
Olivier Aubert
git at videolan.org
Fri Oct 5 21:49:06 CEST 2012
vlc/python | branch: master | Olivier Aubert <olivier.aubert at liris.cnrs.fr> | Fri Oct 5 21:46:57 2012 +0200| [4c4df053e4b35d41d3f10798a882ebdaf46a2785] | committer: Olivier Aubert
python bindings: fix marquee filter declaration
Since the video pipeline changes, the marquee filter should be declared at the Instance level and cannot be declared as a Media option. Fix the example player code.
See http://forum.videolan.org/viewtopic.php?f=32&t=104669&p=354390&hilit=python#p354390 for details
> http://git.videolan.org/gitweb.cgi/vlc/python.git/?a=commit;h=4c4df053e4b35d41d3f10798a882ebdaf46a2785
---
footer.py | 11 +++++------
generated/vlc.py | 13 ++++++-------
2 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/footer.py b/footer.py
index 9a14fc4..8aea91b 100644
--- a/footer.py
+++ b/footer.py
@@ -118,9 +118,9 @@ if __name__ == '__main__':
print('Error: %s file not readable' % movie)
sys.exit(1)
- instance = Instance()
+ instance = Instance("--sub-source marq")
try:
- media = instance.media_new(movie, 'sub-filter=marq') # load marqee option
+ media = instance.media_new(movie)
except NameError:
print('NameError: %s (%s vs LibVLC %s)' % (sys.exc_info()[1],
__version__,
@@ -130,13 +130,12 @@ if __name__ == '__main__':
player.set_media(media)
player.play()
- # Some marquee examples. Marquee requires 'sub-filter=marq' in the
- # media_new() call above. See also the Media.add_options method
- # and <http://www.videolan.org/doc/play-howto/en/ch04.html>
+ # Some marquee examples. Marquee requires '--sub-source marq' in the
+ # Instance() call above. See <http://www.videolan.org/doc/play-howto/en/ch04.html>
player.video_set_marquee_int(VideoMarqueeOption.Enable, 1)
player.video_set_marquee_int(VideoMarqueeOption.Size, 24) # pixels
player.video_set_marquee_int(VideoMarqueeOption.Position, Position.Bottom)
- if True: # only one marquee can be specified
+ if False: # only one marquee can be specified
player.video_set_marquee_int(VideoMarqueeOption.Timeout, 5000) # millisec, 0==forever
t = media.get_mrl() # movie
else: # update marquee text periodically
diff --git a/generated/vlc.py b/generated/vlc.py
index a0e6f8c..ad0bdd0 100755
--- a/generated/vlc.py
+++ b/generated/vlc.py
@@ -48,7 +48,7 @@ import sys
from inspect import getargspec
__version__ = "N/A"
-build_date = "Fri Oct 5 21:35:59 2012"
+build_date = "Fri Oct 5 21:46:31 2012"
if sys.version_info[0] > 2:
str = str
@@ -6075,9 +6075,9 @@ if __name__ == '__main__':
print('Error: %s file not readable' % movie)
sys.exit(1)
- instance = Instance()
+ instance = Instance("--sub-source marq")
try:
- media = instance.media_new(movie, 'sub-filter=marq') # load marqee option
+ media = instance.media_new(movie)
except NameError:
print('NameError: %s (%s vs LibVLC %s)' % (sys.exc_info()[1],
__version__,
@@ -6087,13 +6087,12 @@ if __name__ == '__main__':
player.set_media(media)
player.play()
- # Some marquee examples. Marquee requires 'sub-filter=marq' in the
- # media_new() call above. See also the Media.add_options method
- # and <http://www.videolan.org/doc/play-howto/en/ch04.html>
+ # Some marquee examples. Marquee requires '--sub-source marq' in the
+ # Instance() call above. See <http://www.videolan.org/doc/play-howto/en/ch04.html>
player.video_set_marquee_int(VideoMarqueeOption.Enable, 1)
player.video_set_marquee_int(VideoMarqueeOption.Size, 24) # pixels
player.video_set_marquee_int(VideoMarqueeOption.Position, Position.Bottom)
- if True: # only one marquee can be specified
+ if False: # only one marquee can be specified
player.video_set_marquee_int(VideoMarqueeOption.Timeout, 5000) # millisec, 0==forever
t = media.get_mrl() # movie
else: # update marquee text periodically
More information about the vlc-commits
mailing list