5 # Author: Cyril Deguet <asmax@via.ecp.fr>
10 class VlcError(Exception):
11 "Exception class for libvlc calls"
17 "Manage a streamer with libvlc"
19 def __init__(self, file, address):
22 self.address = address
23 self.id = vlc.create()
26 if vlc.init(self.id, self.address) < 0:
28 if vlc.addTarget(self.id, self.file) < 0:
33 if vlc.play(self.id) < 0:
38 if vlc.stop(self.id) < 0:
43 if vlc.pause(self.id) < 0: