summaryrefslogtreecommitdiff
path: root/src/YalpClients/EflClient
diff options
context:
space:
mode:
authorNicole Vreden <damba@mecka.net>2010-02-14 23:13:46 +0100
committerNicole Vreden <damba@mecka.net>2010-02-14 23:13:46 +0100
commit10d162383b94150f779fd0caa32feb0b6862a98d (patch)
treef56ce38bedd4a2ab0b0378923bb84bcc5ce0f964 /src/YalpClients/EflClient
parent65eee8eacb08fe6c2aa08a8cd87fce4aa2034d9b (diff)
Python-EFL-GUI: new class Media
- added class Media for streaming functions Signed-off-by: Nicole Vreden <damba@mecka.net>
Diffstat (limited to 'src/YalpClients/EflClient')
-rw-r--r--src/YalpClients/EflClient/media.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/YalpClients/EflClient/media.py b/src/YalpClients/EflClient/media.py
new file mode 100644
index 0000000..461527b
--- /dev/null
+++ b/src/YalpClients/EflClient/media.py
@@ -0,0 +1,28 @@
+#!/usr/bin/env python
+import socket
+import emotion
+import playlist
+import YalpInterfaces, CosNaming, YalpInterfaces__POA
+
+class Media(object):
+ def __init__(self, result, servercon, win, c):
+ self.result = result
+ self.servercon = servercon
+ self.win = win
+ self.c = c
+
+ def callback(self, obj, str):
+ songlist = []
+ songlist.append(self.result)
+ ip = socket.gethostbyname(socket.gethostname())
+
+ info = YalpInterfaces.AccessInfo("huhu", "huhu", "xine", "openmoko",
+ YalpInterfaces.STREAM)
+ stream = YalpInterfaces.Output(0, info, songlist, YalpInterfaces.CREATE, ip)
+ ret = self.servercon.control(stream)
+ startstream = YalpInterfaces.Output(0,stream, songlist,
+ YalpInterfaces.START, ip)
+ print startstream
+ vid = emotion.Emotion(self.win.canvas,module_filename="xine")
+ #video = playlist.Selection(self.win, self.c, vid, startstream)
+ video = playlist.Selection(self.win, self.c, vid, startstream)