Controllo sul timeout del player in connessione
Leonardo Robol [2009-11-03 17:20]
Controllo sul timeout del player in connessione
diff --git a/RaiTV/VideoWidget.py b/RaiTV/VideoWidget.py
index 08445f3..2aa0011 100644
--- a/RaiTV/VideoWidget.py
+++ b/RaiTV/VideoWidget.py
@@ -130,7 +130,7 @@ class VideoWidget(gtk.DrawingArea):
## Stoppiamo ogni video
if self.playing:
self.stop()
- self.player.join()
+
self.player = GstPlayer(self.window.xid, uri)
self.player.start()
self.playing = True
@@ -146,7 +146,10 @@ class VideoWidget(gtk.DrawingArea):
self.playing = False
if self.player is not None:
self.player.exit()
- self.player.join()
+ self.player.join(2)
+ if self.player.isAlive():
+ print " => Ops, l'ho ucciso brutalmente"
+ del self.player
def play(self):
diff --git a/raitv.py b/raitv.py
index 6e4cb7d..b99c783 100755
--- a/raitv.py
+++ b/raitv.py
@@ -3,8 +3,8 @@
#
#
-import gtk, pygtk, gst
-from RaiTV import VideoWidget, Interface
+import gtk, pygtk
+from RaiTV import Interface
ui = Interface.UI()