summaryrefslogtreecommitdiff
path: root/src/YalpClients
diff options
context:
space:
mode:
Diffstat (limited to 'src/YalpClients')
-rwxr-xr-xsrc/YalpClients/EflClient/playlist.py29
-rwxr-xr-xsrc/YalpClients/EflClient/yalp_gui.edc116
2 files changed, 121 insertions, 24 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
diff --git a/src/YalpClients/EflClient/yalp_gui.edc b/src/YalpClients/EflClient/yalp_gui.edc
index 85ab93e..516c61b 100755
--- a/src/YalpClients/EflClient/yalp_gui.edc
+++ b/src/YalpClients/EflClient/yalp_gui.edc
@@ -205,7 +205,75 @@ collections
}
}
-
+ part
+ {
+ name: "stop_buttonframe";
+ type: SWALLOW;
+ mouse_events: 1;
+ description
+ {
+ state: "default" 0.0;
+ color: 30 89 114 175;
+ rel1
+ {
+ relative: 0.45 0.85;
+ offset: 0 0;
+ }
+ rel2
+ {
+ relative: 0.65 0.9;
+ offset: 0 0;
+ }
+ }
+ description
+ {
+ state: "default" 1.0;
+ color: 0 0 0 0;
+ rel1
+ {
+ relative: 0.0 0.85;
+ }
+ rel2
+ {
+ relative: -0.5 0.9;
+ }
+ }
+ }
+
+ part
+ {
+ name: "hide_buttonframe";
+ type: SWALLOW;
+ mouse_events: 1;
+ description
+ {
+ state: "default" 0.0;
+ color: 30 89 114 175;
+ rel1
+ {
+ relative: 0.75 0.85;
+ offset: 0 0;
+ }
+ rel2
+ {
+ relative: 0.95 0.9;
+ offset: 0 0;
+ }
+ }
+ description
+ {
+ state: "default" 1.0;
+ color: 0 0 0 0;
+ rel1
+ {
+ relative: 0.0 0.85;
+ }
+ rel2
+ {
+ relative: -0.5 0.9;
+ }
+ }
+ }
part
{
@@ -253,46 +321,60 @@ collections
target: "searchframe";
target: "find_buttonframe";
target: "medialist_buttonframe";
+ target: "stop_buttonframe";
+ target: "hide_buttonframe";
target: "medialist";
target: "searcharea";
transition:SINUSOIDAL 1;
}
+
program
{
- name: "show_frames";
- source: "video";
- //source: "main";
+ name: "hide_frames";
+ source: "hide_buttonframe";
signal: "mouse,clicked,1";
- action: STATE_SET "default" 0.0;
- target: "find_buttonframe";
+ action: STATE_SET "default" 1.0;
target: "searchframe";
+ target: "find_buttonframe";
target: "medialist_buttonframe";
+ target: "stop_buttonframe";
+ target: "hide_buttonframe";
target: "medialist";
target: "searcharea";
transition:SINUSOIDAL 1;
}
- /*
program
{
- name: "button_clicked_signal_program";
+ name: "show_frames_video";
+ source: "video";
+ //source: "main";
signal: "mouse,clicked,1";
- source: "medialist";
-
- action: SIGNAL_EMIT "hide_frames" "medialist";
+ action: STATE_SET "default" 0.0;
+ target: "find_buttonframe";
+ target: "searchframe";
+ target: "medialist_buttonframe";
+ target: "stop_buttonframe";
+ target: "hide_buttonframe";
+ target: "medialist";
+ target: "searcharea";
+ transition:SINUSOIDAL 1;
}
program
{
- name: "handle_python_signal_hide";
- signal: "signal_from_python";
-
- action: STATE_SET "default" 1.0;
- target: "searchframe";
+ name: "show_frames_main";
+ source: "main";
+ signal: "mouse,clicked,1";
+ action: STATE_SET "default" 0.0;
target: "find_buttonframe";
+ target: "searchframe";
+ target: "medialist_buttonframe";
+ target: "stop_buttonframe";
+ target: "hide_buttonframe";
target: "medialist";
target: "searcharea";
+ transition:SINUSOIDAL 1;
}
- */
}
}
}