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

Method do_query

old_examples/synchronizer.py:405–420  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

403
404 def _start_queries(self):
405 def do_query():
406 try:
407 # HACK: self.remuxbin.query() should do the same
408 # (requires implementing a vmethod, dunno how to do that
409 # although i think it's possible)
410 # HACK: why does self.query_position(..) not give useful
411 # answers?
412 pad = self.resyncbin.get_pad('src')
413 pos, format = pad.query_position(gst.FORMAT_TIME)
414 dur, format = pad.query_duration(gst.FORMAT_TIME)
415 if pos != gst.CLOCK_TIME_NONE:
416 self.pdialog.update_position(pos, duration)
417 except:
418 # print 'query failed'
419 pass
420 return True
421 if self._query_id == -1:
422 self._query_id = gobject.timeout_add(100, # 10 Hz
423 do_query)

Callers

nothing calls this directly

Calls 2

query_positionMethod · 0.45
update_positionMethod · 0.45

Tested by

no test coverage detected