[vlc-commits] commit: python: add MediaPlayer.set_mrl shortcut (Olivier Aubert )
git at videolan.org
git at videolan.org
Mon Jun 28 18:14:34 CEST 2010
vlc/python | branch: master | Olivier Aubert <olivier.aubert at liris.cnrs.fr> | Mon Jun 28 18:13:54 2010 +0200| [0fc9108dd93b73a6dc24fc8aa3a08416332e9264] | committer: Olivier Aubert
python: add MediaPlayer.set_mrl shortcut
> http://git.videolan.org/gitweb.cgi/vlc/python.git/?a=commit;h=0fc9108dd93b73a6dc24fc8aa3a08416332e9264
---
override.py | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/override.py b/override.py
index c76d1ff..35fa75c 100644
--- a/override.py
+++ b/override.py
@@ -98,6 +98,17 @@ class MediaPlayer:
"""
return self._instance
+ def set_mrl(self, mrl, *options):
+ """Set the MRL to play.
+
+ @param mrl: The MRL
+ @param options: a list of options
+ @return The Media object
+ """
+ m = self.get_instance().media_new(mrl, *options)
+ self.set_media(m)
+ return m
+
class MediaListPlayer:
"""Create a new MediaPlayer instance.
More information about the vlc-commits
mailing list