diff options
| author | Nicole Vreden <damba@mecka.net> | 2010-02-25 21:31:48 +0100 |
|---|---|---|
| committer | Nicole Vreden <damba@mecka.net> | 2010-02-25 21:31:48 +0100 |
| commit | 47bb89113f37e5d8e6e6f21bb129fc2e0c7dcb9c (patch) | |
| tree | 6d63e00e70ee16bd26c3fee9af72d1b203947941 /src | |
| parent | 3cfdb235df1ee164181d89e7a30877e637c422f7 (diff) | |
Yalp-EFL-GUI: Receiving Streams
-changed Class-Design
Signed-off-by: Nicole Vreden <damba@mecka.net>
Diffstat (limited to 'src')
| -rwxr-xr-x | src/YalpClients/EflClient/client.py | 7 | ||||
| -rwxr-xr-x | src/YalpClients/EflClient/media.py | 19 | ||||
| -rwxr-xr-x | src/YalpClients/EflClient/medialist.py | 10 | ||||
| -rwxr-xr-x | src/YalpClients/EflClient/playlist.py | 36 | ||||
| -rwxr-xr-x | src/YalpOutputs/YalpVlcTelnetOutput/YalpOutputPluginImpl.java | 2 |
5 files changed, 40 insertions, 34 deletions
diff --git a/src/YalpClients/EflClient/client.py b/src/YalpClients/EflClient/client.py index 073e6e2..86e3232 100755 --- a/src/YalpClients/EflClient/client.py +++ b/src/YalpClients/EflClient/client.py @@ -5,6 +5,7 @@ from omniORB import CORBA import YalpInterfaces, CosNaming, YalpInterfaces__POA import medialist import media +import playlist class Corba(object): def __init__(self, win, c): @@ -36,9 +37,11 @@ class Corba(object): mlist.append (YalpInterfaces.VIDEO) mlist.append (YalpInterfaces.SOUND) deps = self.blubb.search(searchentry, mlist) - m = medialist.Medias(self.win, self.c) + m = medialist.Medialist(self.win, self.c) + video = playlist.Selection(self.win, self.c) + print deps[0] for dep in deps[0]: - current = media.Media(dep, self.blubb, self.win, self.c) + current = media.Media(dep, video, self.blubb, self.win, self.c) m.add_media(current) diff --git a/src/YalpClients/EflClient/media.py b/src/YalpClients/EflClient/media.py index 692b27b..871369e 100755 --- a/src/YalpClients/EflClient/media.py +++ b/src/YalpClients/EflClient/media.py @@ -6,26 +6,15 @@ import YalpInterfaces, CosNaming, YalpInterfaces__POA import evas.c_evas class Media(object): - def __init__(self, result, servercon, win, c): + def __init__(self, result, video, servercon, win, c): self.result = result self.servercon = servercon self.win = win self.c = c - + self.video = video + def callback(self, obj, str): songlist = [] songlist.append(self.result) - ip = socket.gethostbyname(socket.gethostname()) + self.video.set_stream(songlist, self.servercon) - info = YalpInterfaces.AccessInfo("huhu", "huhu", "xine", "openmoko", - YalpInterfaces.STREAM) - stream = YalpInterfaces.Output(0, info, songlist, YalpInterfaces.CREATE, ip) - ret = self.servercon.control(stream) - stream.outputAction = YalpInterfaces.START - ret = self.servercon.control(stream) - print "stream.info:", stream.info - video = playlist.Selection(self.win, self.c, stream) - video.add_button() - #def hide_frames(self, obj, signal, source): - #self.c.signal_emit("signal_from_python", "") - diff --git a/src/YalpClients/EflClient/medialist.py b/src/YalpClients/EflClient/medialist.py index ff1a48b..9943798 100755 --- a/src/YalpClients/EflClient/medialist.py +++ b/src/YalpClients/EflClient/medialist.py @@ -9,7 +9,9 @@ import emotion import evas import elementary -class Medias(object): +import playlist + +class Medialist(object): def __init__(self, win, c): self.win = win self.c = c @@ -22,7 +24,7 @@ class Medias(object): self.medialist.item_append(media.result.name, None, None, media.callback) self.medialist.show() self.medialist.go() - - def hide_frames(self, obj, signal, source): - self.c.signal_emit("signal_from_python", "") + #video = playlist.Selection(self.win, self.c, stream) + #video = playlist.Selection(self.win, self.c) + #video.add_button() 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 diff --git a/src/YalpOutputs/YalpVlcTelnetOutput/YalpOutputPluginImpl.java b/src/YalpOutputs/YalpVlcTelnetOutput/YalpOutputPluginImpl.java index 0ff1387..0487310 100755 --- a/src/YalpOutputs/YalpVlcTelnetOutput/YalpOutputPluginImpl.java +++ b/src/YalpOutputs/YalpVlcTelnetOutput/YalpOutputPluginImpl.java @@ -240,7 +240,7 @@ public class YalpOutputPluginImpl extends OutputPluginInterfacePOA { String comp, control; - if (howtoStream.info.params == "openmoko") + if (howtoStream.info.params.equals ("openmoko")) { comp = "#transcode{vcodec=theo,vb=256,scale=1,"; comp += "acodec=vorb,ab=64,channels=2}"; |
