| 768 | self.player.get_state(timeout=50*gst.MSECOND) # 50 ms |
| 769 | |
| 770 | def scale_button_release_cb(self, widget, event): |
| 771 | # see seek.cstop_seek |
| 772 | widget.disconnect(self.changed_id) |
| 773 | self.changed_id = -1 |
| 774 | |
| 775 | self.button.set_sensitive(True) |
| 776 | if self.seek_timeout_id != -1: |
| 777 | gobject.source_remove(self.seek_timeout_id) |
| 778 | self.seek_timeout_id = -1 |
| 779 | else: |
| 780 | gst.debug('released slider, setting back to playing') |
| 781 | if self.was_playing: |
| 782 | self.player.play() |
| 783 | |
| 784 | if self.update_id != -1: |
| 785 | self.error('Had a previous update timeout id') |
| 786 | else: |
| 787 | self.update_id = gobject.timeout_add(self.UPDATE_INTERVAL, |
| 788 | self.update_scale_cb) |
| 789 | |
| 790 | def update_scale_cb(self): |
| 791 | had_duration = self.p_duration != gst.CLOCK_TIME_NONE |