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

Method _start_queries

old_examples/synchronizer.py:404–423  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

402 return None
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)
424
425 def _stop_queries(self):
426 if self._query_id != -1:

Callers 1

_bus_watchMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected