From 47bb89113f37e5d8e6e6f21bb129fc2e0c7dcb9c Mon Sep 17 00:00:00 2001 From: Nicole Vreden Date: Thu, 25 Feb 2010 21:31:48 +0100 Subject: Yalp-EFL-GUI: Receiving Streams -changed Class-Design Signed-off-by: Nicole Vreden --- src/YalpClients/EflClient/playlist.py | 36 +++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) (limited to 'src/YalpClients/EflClient/playlist.py') diff --git a/src/YalpClients/EflClient/playlist.py b/src/YalpClients/EflClient/playlist.py index 58f2919..484872f 100755 --- a/src/YalpClients/EflClient/playlist.py +++ b/src/YalpClients/EflClient/playlist.py @@ -8,37 +8,49 @@ import ecore import emotion import evas import elementary +import YalpInterfaces, CosNaming, YalpInterfaces__POA +import evas.c_evas import media class Selection(object): - def __init__(self, win, c, stream): + def __init__(self, win, c): self.win = win self.c = c - self.vid = emotion.Emotion(self.win.canvas, module_filename="xine") - self.stream = stream + self.vid = emotion.Emotion(self.win.canvas, module_filename="gstreamer") self.add_button() - self.play_video() - self.c.signal_callback_add("mouse,clicked,1", "medialist_buttonframe", self.huhu) + self.c.signal_callback_add("mouse,clicked,1", "medialist_buttonframe", + self.play_video) def add_button(self): addbutton = elementary.Button(self.win) addbutton.label_set("Play") self.c.part_swallow("medialist_buttonframe", addbutton) addbutton.show() + + def set_stream(self, songs, servercon): + self.songlist = songs + self.servercon = servercon + print "songlist", songs + - def huhu(self): - print "huhu" - - def play_video(self): - print self.stream + def play_video(self, dummy, dumm, duemmer): ip = "127.0.0.1" port = 9993 + info = YalpInterfaces.AccessInfo("huhu", "huhu", "xine", "openmoko", + YalpInterfaces.STREAM) + stream = YalpInterfaces.Output(0, info, self.songlist, + YalpInterfaces.CREATE, ip) + ret = self.servercon.control(stream) + stream.outputAction = YalpInterfaces.START + ret = self.servercon.control(stream) + print "stream.info:", stream.info + print "stream from", ip, port self.vid.file_set("http://"+ip+":"+str(port)) #self.vid.file_set("/home/manut/test.avi") print "self.vid", self.vid self.c.part_swallow("video", self.vid) - #self.vid.show() - #self.vid.play = True + self.vid.show() + self.vid.play = True -- cgit v1.2.3