projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d643c9f
)
Gst: Add python version of GST_TIME_ARGS
author
Olivier Crête
<olivier.crete@collabora.com>
Tue, 3 Dec 2013 22:49:11 +0000
(17:49 -0500)
committer
Olivier Crête
<olivier.crete@collabora.com>
Tue, 3 Dec 2013 23:00:38 +0000
(18:00 -0500)
gi/overrides/Gst.py
patch
|
blob
|
history
diff --git
a/gi/overrides/Gst.py
b/gi/overrides/Gst.py
index
74c38c5
..
c35e221
100644
(file)
--- 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