From 10d162383b94150f779fd0caa32feb0b6862a98d Mon Sep 17 00:00:00 2001 From: Nicole Vreden Date: Sun, 14 Feb 2010 23:13:46 +0100 Subject: Python-EFL-GUI: new class Media - added class Media for streaming functions Signed-off-by: Nicole Vreden --- src/YalpClients/EflClient/media.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/YalpClients/EflClient/media.py (limited to 'src') 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) -- cgit v1.2.3