Changeset - 05db77383cc1
[Not reviewed]
default
0 2 0
drewp@bigasterisk.com - 12 years ago 2013-06-10 18:35:01
drewp@bigasterisk.com
remember gst pulseaudio package for playback
Ignore-this: 24d59d4fa5f34e94dd3af4af2d660c30
2 files changed with 5 insertions and 4 deletions:
0 comments (0 inline, 0 general)
light9/ascoltami/player.py
Show inline comments
 
@@ -32,16 +32,15 @@ class Player(object):
 

	
 
        bus = self.pipeline.get_bus()
 
        # not working- see notes in pollForMessages
 
        #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)
 
            if self.lastWatchTime < self.autoStopTime < t:
 
                log.info("autostop")
 
                self.pause()
 
@@ -158,12 +157,14 @@ class Player(object):
 

	
 
    def resume(self):
 
        self.pipeline.set_state(Gst.State.PLAYING)
 

	
 
    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
 
        # working out well. I'd get pauses at other times that were
 
        # hard to remove.
 

	
makefile
Show inline comments
 
@@ -46,7 +46,7 @@ tkdnd_build:
 
	./configure
 
	make
 

	
 
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
0 comments (0 inline, 0 general)