changeset 913:05db77383cc1

remember gst pulseaudio package for playback Ignore-this: 24d59d4fa5f34e94dd3af4af2d660c30
author drewp@bigasterisk.com
date Mon, 10 Jun 2013 18:35:01 +0000
parents 9674c9f015bb
children 092c00f6ba25
files light9/ascoltami/player.py makefile
diffstat 2 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/light9/ascoltami/player.py	Mon Jun 10 17:55:31 2013 +0000
+++ b/light9/ascoltami/player.py	Mon Jun 10 18:35:01 2013 +0000
@@ -35,10 +35,9 @@
         #self.watchForMessages(bus)
       
     def watchTime(self):
-
-        self.pollForMessages()
-        
         try:
+            self.pollForMessages()
+            
             t = self.currentTime()
             log.debug("watch %s < %s < %s",
                       self.lastWatchTime, self.autoStopTime, t)
@@ -161,6 +160,8 @@
 
     def setupAutostop(self):
         dur = self.duration()
+        if dur == 0:
+            raise ValueError("duration=0, can't set autostop")
         self.autoStopTime = (dur - self.autoStopOffset)
         log.info("autostop will be at %s", self.autoStopTime)
         # pipeline.seek can take a stop time, but using that wasn't
--- a/makefile	Mon Jun 10 17:55:31 2013 +0000
+++ b/makefile	Mon Jun 10 18:35:01 2013 +0000
@@ -49,4 +49,4 @@
 bin/ascoltami2: gst_packages link_to_sys_packages
 
 gst_packages:
-	sudo aptitude install python-gi gir1.2-gst-plugins-base-1.0 libgirepository-1.0-1 gir1.2-gstreamer-1.0 gstreamer1.0-tools gstreamer1.0-plugins-good
+	sudo aptitude install python-gi gir1.2-gst-plugins-base-1.0 libgirepository-1.0-1 gir1.2-gstreamer-1.0 gstreamer1.0-tools gstreamer1.0-plugins-good gstreamer1.0-pulseaudio