diff options
author | wm4 <wm4@nowhere> | 2015-01-02 19:27:07 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-01-02 19:27:07 +0100 |
commit | 487208b2e18c6e4611e2d2022443f46d15e5174b (patch) | |
tree | 8c2203fb85d5cbfeacc28673ff30f1c6750adf06 /TOOLS/stats-conv.py | |
parent | 83349a0e7300ce9bb923aa31dd3ff664b08ca4a0 (diff) | |
download | mpv-487208b2e18c6e4611e2d2022443f46d15e5174b.tar.bz2 mpv-487208b2e18c6e4611e2d2022443f46d15e5174b.tar.xz |
TOOLS/stas-conv: add timed value event type
Diffstat (limited to 'TOOLS/stats-conv.py')
-rwxr-xr-x | TOOLS/stats-conv.py | 8 |
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)) |