aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/rtp/rtp_replay.st
blob: e26d07388ea641f3f16a6880a27f0e006568187c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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.
]