Gst: Add python version of GST_TIME_ARGS

This commit is contained in:
Olivier Crête 2013-12-03 17:49:11 -05:00
parent d643c9f7ba
commit 8542c4b219

View file

@ -259,6 +259,16 @@ class Fraction(Gst.Fraction):
Fraction = override(Fraction) Fraction = override(Fraction)
__all__.append('Fraction') __all__.append('Fraction')
def TIME_ARGS(time):
if time == Gst.CLOCK_TIME_NONE:
return "CLOCK_TIME_NONE"
return "%u:%02u:%02u.%09u" % (time / (Gst.SECOND * 60 * 60),
(time / (Gst.SECOND * 60)) % 60,
(time / Gst.SECOND) % 60,
time % Gst.SECOND)
__all__.append('TIME_ARGS')
import _gi_gst import _gi_gst
_gi_gst _gi_gst