aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/rtp/rtp_replay.st
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/rtp/rtp_replay.st')
-rw-r--r--contrib/rtp/rtp_replay.st21
1 files changed, 21 insertions, 0 deletions
diff --git a/contrib/rtp/rtp_replay.st b/contrib/rtp/rtp_replay.st
new file mode 100644
index 000000000..e26d07388
--- /dev/null
+++ b/contrib/rtp/rtp_replay.st
@@ -0,0 +1,21 @@
+"
+Simple UDP replay from the state files
+"
+
+PackageLoader fileInPackage: #Sockets.
+FileStream fileIn: 'rtp_replay_shared.st'.
+
+
+Eval [
+ | replay file host dport |
+
+ file := Smalltalk arguments at: 1 ifAbsent: [ 'rtpstream.state' ].
+ host := Smalltalk arguments at: 2 ifAbsent: [ '127.0.0.1' ].
+ dport := (Smalltalk arguments at: 3 ifAbsent: [ '4000' ]) asInteger.
+ sport := (Smalltalk arguments at: 4 ifAbsent: [ '0' ]) asInteger.
+
+ replay := RTPReplay on: file fromPort: sport.
+
+ Transcript nextPutAll: 'Going to stream now'; nl.
+ replay streamAudio: host port: dport.
+]