Commit c5781106 authored by Olivier Aubert's avatar Olivier Aubert

python-ctypes: override Instance.media_new to allow to directly pass item options

parent 4bc8176f
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment