summaryrefslogtreecommitdiff
path: root/hacks
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-11-23 10:44:39 +0100
committerCarl Hetherington <cth@carlh.net>2020-01-08 21:56:47 +0100
commit1d796edf59da644e91bd443505fb76e0397a1439 (patch)
treef66ea71a218dc9b0392bc4d7e164760c76097fe2 /hacks
parent89e92b3e7effafd2ca3aa1e9300777f2d2fb6183 (diff)
Basic stress-test function for player.
Diffstat (limited to 'hacks')
-rw-r--r--hacks/stress.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/hacks/stress.py b/hacks/stress.py
new file mode 100644
index 000000000..46d06382b
--- /dev/null
+++ b/hacks/stress.py
@@ -0,0 +1,22 @@
+#!/usr/bin/python3
+
+import random
+
+def make(dcp, output, seeks):
+ with open(output, 'w') as f:
+ # Open the DCP and start it playing
+ print("O %s" % dcp, file=f)
+ print("P", file=f)
+ for i in range(seeks):
+ # Wait a bit
+ print("W %d" % random.randint(500, 60000), file=f)
+ # Seek
+ print("K %d" % random.randint(0, 4095), file=f)
+ # Make sure we're still playing
+ print("P", file=f)
+ print("S", file=f)
+
+
+make("/home/carl/DCP/Examples/BohemianRhapsody_TLR-7_S_DE-XX_DE_51_2K_TCFG_20180514_TM_IOP_OV/", "boho", 64)
+
+