| 786 | self.player.get_state(timeout=50*gst.MSECOND) # 50 ms |
| 787 | |
| 788 | def scale_button_release_cb(self, widget, event): |
| 789 | # see seek.cstop_seek |
| 790 | widget.disconnect(self.changed_id) |
| 791 | self.changed_id = -1 |
| 792 | |
| 793 | self.button.set_sensitive(True) |
| 794 | if self.seek_timeout_id != -1: |
| 795 | gobject.source_remove(self.seek_timeout_id) |
| 796 | self.seek_timeout_id = -1 |
| 797 | else: |
| 798 | gst.debug('released slider, setting back to playing') |
| 799 | if self.was_playing: |
| 800 | self.player.play() |
| 801 | |
| 802 | if self.update_id != -1: |
| 803 | self.error('Had a previous update timeout id') |
| 804 | else: |
| 805 | self.update_id = gobject.timeout_add(self.UPDATE_INTERVAL, |
| 806 | self.update_scale_cb) |
| 807 | |
| 808 | def update_scale_cb(self): |
| 809 | had_duration = self.p_duration != gst.CLOCK_TIME_NONE |