From c57811067847c2644c2487a749f149057fb448cf Mon Sep 17 00:00:00 2001 From: Olivier Aubert Date: Mon, 16 Nov 2009 17:57:01 +0100 Subject: [PATCH] python-ctypes: override Instance.media_new to allow to directly pass item options --- bindings/python-ctypes/override.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bindings/python-ctypes/override.py b/bindings/python-ctypes/override.py index 2813ac1111..9f9d6a844e 100644 --- a/bindings/python-ctypes/override.py +++ b/bindings/python-ctypes/override.py @@ -51,6 +51,18 @@ class Instance: p._instance=self return p + def media_new(self, mrl, *options): + """Create an empty Media Player object + + Options can be specified as supplementary string parameters, e.g. + m=i.media_new('foo.avi', 'sub-filter=marq{marquee=Hello}', 'vout-filter=invert') + """ + e=VLCException() + m=libvlc_media_new(self, mrl, e) + for o in options: + libvlc_media_add_option(m, o, e) + return m + class MediaControl: """Create a new MediaControl instance -- 2.39.2