Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2012-08-21 21:03:52 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2012-08-22 12:48:15 (GMT)
commit66b8d29f39289b64caef63abe99ecb04228746e7 (patch)
tree4dc8a0638120428c1e37bea2010ca0d6f77e3d8a
parentb35dfa88870665c0c77cd3c274592c79720573c1 (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>
-rw-r--r--jukeboxactivity.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/jukeboxactivity.py b/jukeboxactivity.py
index a84f9af..aebbc98 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 _
@@ -866,20 +866,22 @@ class VideoWidget(Gtk.DrawingArea):
if __name__ == '__main__':
window = Gtk.Window()
-
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)
#player.connect("stream-info", self._player_stream_info_cb)
-
+ view.show()
window.add(view)
- player.set_uri('http://78.46.73.237:8000/prog')
- player.play()
+ 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()