summaryrefslogtreecommitdiffstats
path: root/TOOLS
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-02 19:27:07 +0100
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>2015-01-25 17:00:17 +0900
commit5992ff785c78d97c87de8161dacf5aa727ddd387 (patch)
treecea05594393700b16b517462cecf6ff2f76da869 /TOOLS
parentb6d869406266a79a6dcab3fada0c10e3274bc8e9 (diff)
downloadmpv-5992ff785c78d97c87de8161dacf5aa727ddd387.tar.bz2
mpv-5992ff785c78d97c87de8161dacf5aa727ddd387.tar.xz
TOOLS/stas-conv: add timed value event type
Diffstat (limited to 'TOOLS')
-rwxr-xr-xTOOLS/stats-conv.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/TOOLS/stats-conv.py b/TOOLS/stats-conv.py
index 836e1e8421..bc77e3e32a 100755
--- a/TOOLS/stats-conv.py
+++ b/TOOLS/stats-conv.py
@@ -25,6 +25,8 @@ Currently, the following event types are supported:
'end' <name> end of the named event
'value' <float> <name> a normal value (as opposed to event)
'event-timed' <ts> <name> singular event at the given timestamp
+ 'value-timed' <ts> <float> <name>
+ a value for an event at the given timestamp
<name> singular event
"""
@@ -86,6 +88,12 @@ for line in [line.split("#")[0].strip() for line in open(filename, "r")]:
val = int(val) / 1000 - G.start
e = get_event(name, "event-signal")
e.vals.append((val, 1))
+ elif event.startswith("value-timed "):
+ _, tsval, val, name = event.split(" ", 3)
+ tsval = int(tsval) / 1000 - G.start
+ val = float(val)
+ e = get_event(name, "value")
+ e.vals.append((tsval, val))
else:
e = get_event(event, "event-signal")
e.vals.append((ts, 1))