summaryrefslogtreecommitdiff
path: root/src/YalpClients/EflClient/playlist.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/YalpClients/EflClient/playlist.py')
-rwxr-xr-xsrc/YalpClients/EflClient/playlist.py29
1 files changed, 22 insertions, 7 deletions
diff --git a/src/YalpClients/EflClient/playlist.py b/src/YalpClients/EflClient/playlist.py
index 03e88cc..4d3f12c 100755
--- a/src/YalpClients/EflClient/playlist.py
+++ b/src/YalpClients/EflClient/playlist.py
@@ -21,6 +21,8 @@ class Selection(object):
self.add_button()
self.c.signal_callback_add("mouse,clicked,1", "medialist_buttonframe",
self.play_video)
+ self.c.signal_callback_add("mouse,clicked,1", "stop_buttonframe",
+ self.stop_video)
def add_button(self):
addbutton = elementary.Button(self.win)
@@ -28,6 +30,16 @@ class Selection(object):
self.c.part_swallow("medialist_buttonframe", addbutton)
addbutton.show()
+ stopbutton = elementary.Button(self.win)
+ stopbutton.label_set("Stop")
+ self.c.part_swallow("stop_buttonframe", stopbutton)
+ stopbutton.show()
+
+ hidebutton = elementary.Button(self.win)
+ hidebutton.label_set("Hide")
+ self.c.part_swallow("hide_buttonframe", hidebutton)
+ hidebutton.show()
+
def set_stream(self, songs, servercon):
self.songlist = songs
self.servercon = servercon
@@ -37,19 +49,22 @@ class Selection(object):
def play_video(self, dummy, dumm, duemmer):
ip = "10.0.3.180"
port = 9993
- info = YalpInterfaces.AccessInfo("huhu", "huhu", "xine", "openmoko",
+ self.info = YalpInterfaces.AccessInfo("huhu", "huhu", "xine", "openmoko",
YalpInterfaces.STREAM)
- stream = YalpInterfaces.Output(0, info, self.songlist,
+ self.stream = YalpInterfaces.Output(0, self.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
+ ret = self.servercon.control(self.stream)
+ self.stream.outputAction = YalpInterfaces.START
+ ret = self.servercon.control(self.stream)
+ print "stream.info:", self.stream.info
print "stream from", ip, port
self.vid.file_set("http://"+ip+":"+str(port))
- print "self.vid", self.vid
self.c.part_swallow("video", self.vid)
self.vid.show()
self.vid.play = True
+ def stop_video(self, huhu, haha, hoho):
+ self.stream.outputAction = YalpInterfaces.STOP
+ ret = self.servercon.control(self.stream)
+ self.vid.play = False