summaryrefslogtreecommitdiff
path: root/src/YalpClients/EflClient/playlist.py
diff options
context:
space:
mode:
authorNicole Vreden <damba@slartibartfast.traut>2010-02-19 20:18:08 +0100
committerNicole Vreden <damba@slartibartfast.traut>2010-02-19 20:18:08 +0100
commit47398dbe18e7adb6b6a1493f18fc98247450e798 (patch)
tree2a7e26068ce52706055e3eeb9a945af37d88ef34 /src/YalpClients/EflClient/playlist.py
parent998d09ecda2e86310331a984f8f760de9ef04e50 (diff)
parented22fce7a9f4332037bf0e9fd97a96b1876acba8 (diff)
Merge remote branch 'origin/damba' into damba
Diffstat (limited to 'src/YalpClients/EflClient/playlist.py')
-rw-r--r--src/YalpClients/EflClient/playlist.py43
1 files changed, 13 insertions, 30 deletions
diff --git a/src/YalpClients/EflClient/playlist.py b/src/YalpClients/EflClient/playlist.py
index 69f3ba3..242aa76 100644
--- a/src/YalpClients/EflClient/playlist.py
+++ b/src/YalpClients/EflClient/playlist.py
@@ -9,41 +9,24 @@ import emotion
import evas
import elementary
+import media
+
class Selection(object):
- def __init__(self, win, c, vid):
+ def __init__(self, win, c, stream):
self.win = win
self.c = c
- self.vid = vid
- self.add_button()
-
- def fill_playlist(self, obj, str, x):
- playlist = elementary.List(self.win);
- playlist.size_hint_weight_set(1.0, 1.0)
- playlist.size_hint_align_set(-1.0, -1.0)
- box1 = elementary.Box(self.win)
- self.win.resize_object_add(box1)
- self.c.part_swallow("playlist", playlist)
- box1.pack_end(playlist)
- playlist.show()
- playlist.item_append(str, None, None, None)
- playlist.go()
- box1.show()
-
- def playbutton_clicked(self, obj, signal, source):
- self.play_video()
-
+ self.vid = emotion.Emotion(win.canvas, module_filename="gstreamer")
+ self.stream = stream
+ self.play_video ()
+
def play_video(self):
- #vid = emotion.Emotion(win.canvas,module_filename="xine");
- self.vid.file_set("Lordi.mpg");
+ print self.stream
+ # ip = self.stream[0][0].destIp THIS CHRASHES!!! -> I know :-)
+ ip = "127.0.0.1"
+ port = 9993
+ print "stream from", ip, port
+ self.vid.file_set("udp://"+ip+":"+str(port))
self.c.part_swallow("video", self.vid)
self.vid.show()
self.vid.play = True
- def add_button(self):
- playbutton = elementary.Button(self.win)
- playbutton.label_set("Play")
- self.c.part_swallow("playlist_buttonframe", playbutton)
- self.c.signal_callback_add("mouse,clicked,1","playlist_buttonframe",
- self.playbutton_clicked)
- playbutton.show()
-