MCPcopy Create free account
hub / github.com/GStreamer/gst-python / scale_button_press_cb

Method scale_button_press_cb

old_examples/play.py:219–236  ·  view source on GitHub ↗
(self, widget, event)

Source from the content-addressed store, hash-verified

217 return "%02d:%02d" % (seconds / 60, seconds % 60)
218
219 def scale_button_press_cb(self, widget, event):
220 # see seek.c:start_seek
221 gst.debug('starting seek')
222
223 self.button.set_sensitive(False)
224 self.was_playing = self.player.is_playing()
225 if self.was_playing:
226 self.player.pause()
227
228 # don't timeout-update position during seek
229 if self.update_id != -1:
230 gobject.source_remove(self.update_id)
231 self.update_id = -1
232
233 # make sure we get changed notifies
234 if self.changed_id == -1:
235 self.changed_id = self.hscale.connect('value-changed',
236 self.scale_value_changed_cb)
237
238 def scale_value_changed_cb(self, scale):
239 # see seek.c:seek_cb

Callers

nothing calls this directly

Calls 2

is_playingMethod · 0.45
pauseMethod · 0.45

Tested by

no test coverage detected