Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Kaufmann <humitos@gmail.com>2012-08-27 13:23:35 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2012-08-27 13:35:33 (GMT)
commit7a954aea816e9b994ddd3d9dcac9897bc47b5aec (patch)
tree807dd778727f92d8eecd040cc9b5aa7467637849
parente110fb9acfecdb539c39c2e4255fe487cf59908e (diff)
Fix testing functionality
Can be used from the commandline like in: python jukeboxactivity.py file:///tmp/video_file.mp4 Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org> Signed-off-by: Manuel Kaufmann <humitos@gmail.com>
-rw-r--r--jukeboxactivity.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/jukeboxactivity.py b/jukeboxactivity.py
index e900263..5555ed1 100644
--- a/jukeboxactivity.py
+++ b/jukeboxactivity.py
@@ -21,7 +21,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
-
+import sys
import logging
import tempfile
from gettext import gettext as _
@@ -885,9 +885,6 @@ if __name__ == '__main__':
view = VideoWidget()
- #view.set_file_location(sys.argv[1])
-
- player = GstPlayer(view)
#player.connect("eos", self._player_eos_cb)
#player.connect("error", self._player_error_cb)
#player.connect("tag", self._player_new_tag_cb)
@@ -895,7 +892,14 @@ if __name__ == '__main__':
window.add(view)
- player.set_uri('http://78.46.73.237:8000/prog')
- player.play()
+ view.show()
+ def map_cb(widget):
+ player = GstPlayer(view)
+ player.set_uri(sys.argv[1])
+ player.play()
+
+ window.connect('map', map_cb)
+ window.maximize()
window.show_all()
+ window.connect("destroy", gtk.main_quit)
gtk.main()