Changeset 1603

Show
Ignore:
Timestamp:
2005-11-03 16:14:53 (3 years ago)
Author:
jkivlighn
Message:

As far as I can tell, this fixes seeking.

In gobject's timeout function, we were calling pipeline.get_state().
This function blocks while waiting for the state change to happen.
Apparently it was just blocking so long that it never returned. Why?...
I'm still not sure exactly...

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • annoamp/trunk/anxplayer.py

    r1602 r1603  
    7070        #anchor_href, anchor_text, desc, empty, end_time, id, img_alt, img_src, meta, start_time, track 
    7171        self.chapter_info = [] 
     72        self.state = gst.STATE_NULL 
    7273 
    7374    def update_time(self): 
     
    9495                        self.current_chapter_callback(-1) #inform the UI, but leave the self.pos alone 
    9596 
    96         if self.bin.get_state()[1] == gst.STATE_PAUSED: 
     97        if self.state == gst.STATE_PAUSED: 
    9798            return False 
    9899        else: 
     
    166167        print "Play." 
    167168        result = self.bin.set_state(gst.STATE_PLAYING) 
     169        self.state = gst.STATE_PLAYING 
    168170        gobject.timeout_add(200, self.update_time) 
    169171         
     
    171173        print "Pause." 
    172174        result = self.bin.set_state(gst.STATE_PAUSED) 
     175        self.state = gst.STATE_PAUSED 
    173176         
    174177    def seek(self,location):