projects
/
vidi-player.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d4d41f1
)
vidi/Player.py: move the signal callback initialization to the __init__ method
author
Antonio Ospite <ao2@ao2.it>
Mon, 28 Nov 2016 12:22:13 +0000
(13:22 +0100)
committer
Antonio Ospite <ao2@ao2.it>
Mon, 28 Nov 2016 12:22:13 +0000
(13:22 +0100)
vidi/Player.py
patch
|
blob
|
history
diff --git
a/vidi/Player.py
b/vidi/Player.py
index
26a9832
..
bd826bc
100755
(executable)
--- a/
vidi/Player.py
+++ b/
vidi/Player.py
@@
-30,6
+30,10
@@
GObject.threads_init()
class Player(object):
def __init__(self, pipeline):
self.pipeline = pipeline
class Player(object):
def __init__(self, pipeline):
self.pipeline = pipeline
+ bus = self.pipeline.get_bus()
+ bus.add_signal_watch()
+ bus.connect("message", self.bus_message_cb)
+
self.mainloop = GObject.MainLoop()
@staticmethod
self.mainloop = GObject.MainLoop()
@staticmethod
@@
-46,10
+50,6
@@
class Player(object):
self.quit()
def play(self):
self.quit()
def play(self):
- bus = self.pipeline.get_bus()
- bus.add_signal_watch()
- bus.connect("message", self.bus_message_cb)
-
self.pipeline.set_state(Gst.State.PLAYING)
try:
self.pipeline.set_state(Gst.State.PLAYING)
try: