diff options
Diffstat (limited to 'src/YalpClients/EflClient/playlist.py')
| -rw-r--r-- | src/YalpClients/EflClient/playlist.py | 43 |
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() - |
