summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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)