Hi everyone, I'm using libVLC with python's bindings to embeded streams in a GTK Socket; I've got a class Player for VLC:
class Player(gtk.Socket):
def __init__(self, id):
gtk.Socket.__init__(self)
def loadfile(self, filename, wid):
filename=filename.replace("\"","")
p=vlc.MediaPlayer(filename.strip())
p.set_xwindow(wid)
p.play()
and a View class for embedding VLC stream in a GTK Drawing Area:
class View(gtk.DrawingArea):
def __init__(self, id):
gtk.DrawingArea.__init__(self)
self.Screen = Player(id)
It's works fine but, I'm playing videos files but also rtsp live streams and when a problem occur on the network, VLC don't try to start playing my rtsp stream again.
I've seen on StackOverflow something like my problem (here: http://stackoverflow.com/questions/3595649/vlc-python-eventmanager-callback-type) and I understand that I must use the EventManager but I'm a newbie in python and VLC programming and I don't understand how to implement it on my code. Moreover I don't know what a "callback method" is.
Thanks in advance for anyhelp.