mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-05 09:00:54 +00:00
Gst: Add python version of GST_TIME_ARGS
This commit is contained in:
parent
d643c9f7ba
commit
8542c4b219
1 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue