Commit 8542c4b2 authored by Olivier Crête's avatar Olivier Crête 👻

Gst: Add python version of GST_TIME_ARGS

parent d643c9f7
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment