summaryrefslogtreecommitdiff
path: root/src/YalpClients/EflClient/media.py
blob: 41b4d5d86fe92abde0ed605aa19a73f16347efd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env python
import socket
import emotion
import playlist
import YalpInterfaces, CosNaming, YalpInterfaces__POA
import evas.c_evas

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
		#print "result:", self.result
		print "Startstream.Info:", startstream.info
		vid = emotion.Emotion(self.win.canvas,module_filename="gstreamer")
		#video = playlist.Selection(self.win, self.c, vid, startstream)
		video = playlist.Selection(self.win, self.c, vid, startstream)