libvlc python bindings and event manager
Posted: 13 Sep 2010 16:38
Hi every one,
I'm using libVLC for playing RTSP stream (from IP cameras) embeded in a GTK Socket.
I have one class for the libVLC
And another class to embed the video in a GTK DrawingArea:
It works fin, thanks =)
Now I would like to know how to force the libVLC to re-start the stream if the network has disconnect. I've seek for a "loop" option but for what I understood, it's only avaiable on the GUI.
I've found the "Event Manager" class but I don't understand how to implement it on my program.It works fine, thanks =)
Now I would like to know how to force the libVLC for re-starting the stream if the network has disconnect. I've seek for a "loop" option but for what I understood, it's only on the GUI.
I've found the "Event Manager" class but I don't understand how to implement it on my program.
Can anyone show me some example or help me?
I'm a newbie in python and moreover in VLC
I'm using libVLC for playing RTSP stream (from IP cameras) embeded in a GTK Socket.
I have one class for the libVLC
Code: Select all
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()
Code: Select all
class View(gtk.DrawingArea):
def __init__(self, id):
gtk.DrawingArea.__init__(self)
self.Screen = Player(id)
Now I would like to know how to force the libVLC to re-start the stream if the network has disconnect. I've seek for a "loop" option but for what I understood, it's only avaiable on the GUI.
I've found the "Event Manager" class but I don't understand how to implement it on my program.It works fine, thanks =)
Now I would like to know how to force the libVLC for re-starting the stream if the network has disconnect. I've seek for a "loop" option but for what I understood, it's only on the GUI.
I've found the "Event Manager" class but I don't understand how to implement it on my program.
Can anyone show me some example or help me?
I'm a newbie in python and moreover in VLC