From 8542c4b21929b2ed84272deb3ae49a2766c82035 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Olivier=20Cr=C3=AAte?= Date: Tue, 3 Dec 2013 17:49:11 -0500 Subject: [PATCH] Gst: Add python version of GST_TIME_ARGS --- gi/overrides/Gst.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gi/overrides/Gst.py b/gi/overrides/Gst.py index 74c38c5..c35e221 100644 --- a/gi/overrides/Gst.py +++ b/gi/overrides/Gst.py @@ -259,6 +259,16 @@ class Fraction(Gst.Fraction): Fraction = override(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 _gi_gst -- 2.7.4