blob: 475b39ed5ba7c4ff41b068fce76eb507d284d58f (
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
32
33
34
35
36
37
38
39
40
41
42
|
#!/usr/bin/env python
import edje
import ecore.evas
import sys
import os
import ecore
import emotion
import evas
import elementary
import media
class Selection(object):
def __init__(self, win, c, stream):
self.win = win
self.c = c
#self.vid = emotion.Emotion(win.canvas, module_filename="gstreamer")
self.stream = stream
self.add_button()
self.play_video ()
self.c.signal_callback_add("mouse,clicked,1", "medialist_buttonframe", self.huhu)
def add_button(self):
addbutton = elementary.Button(self.win)
addbutton.label_set("Play")
self.c.part_swallow("medialist_buttonframe", addbutton)
addbutton.show()
def huhu(self):
print "huhu"
def play_video(self):
print self.stream
ip = "127.0.0.1"
port = 9993
print "stream from", ip, port
self.vid.file_set("udp://"+ip+":"+str(port))
self.c.part_swallow("video", self.vid)
self.vid.show()
self.vid.play = True
|