summaryrefslogtreecommitdiff
path: root/roles/streaming/dolmetsch-raspi/templates
diff options
context:
space:
mode:
Diffstat (limited to 'roles/streaming/dolmetsch-raspi/templates')
-rw-r--r--roles/streaming/dolmetsch-raspi/templates/dolmetschctl.service.j23
-rw-r--r--roles/streaming/dolmetsch-raspi/templates/rtp-recv.service.j23
-rw-r--r--roles/streaming/dolmetsch-raspi/templates/rtp-recv.sh.j27
-rw-r--r--roles/streaming/dolmetsch-raspi/templates/rtp-send.service.j23
-rw-r--r--roles/streaming/dolmetsch-raspi/templates/rtp-send.sh.j22
5 files changed, 8 insertions, 10 deletions
diff --git a/roles/streaming/dolmetsch-raspi/templates/dolmetschctl.service.j2 b/roles/streaming/dolmetsch-raspi/templates/dolmetschctl.service.j2
index cd97cc3e..909c8570 100644
--- a/roles/streaming/dolmetsch-raspi/templates/dolmetschctl.service.j2
+++ b/roles/streaming/dolmetsch-raspi/templates/dolmetschctl.service.j2
@@ -2,8 +2,7 @@
Description=dolmetschctl Client
[Service]
-{# TODO: remove hardcoded IP #}
-ExecStart=/opt/dolmetschctl/bin/dolmetschctl 192.168.48.102:8234
+ExecStart=/opt/dolmetschctl/bin/dolmetschctl {{ dolmetsch_raspi_server_address }}:8234
Restart=always
RestartSecs=1s
StartLimitBurst=10
diff --git a/roles/streaming/dolmetsch-raspi/templates/rtp-recv.service.j2 b/roles/streaming/dolmetsch-raspi/templates/rtp-recv.service.j2
index b338ff65..be655128 100644
--- a/roles/streaming/dolmetsch-raspi/templates/rtp-recv.service.j2
+++ b/roles/streaming/dolmetsch-raspi/templates/rtp-recv.service.j2
@@ -2,8 +2,7 @@
Description=RTP Receiver
[Service]
-{# TODO: remove hardcoded IP #}
-ExecStart=/usr/local/bin/rtp-recv.sh 192.168.48.103
+ExecStart=/usr/local/bin/rtp-recv.sh {{ dolmetsch_raspi_client_address }} {{ dolmetsch_raspi_recv_latency }}
Restart=always
RestartSecs=1s
StartLimitBurst=10
diff --git a/roles/streaming/dolmetsch-raspi/templates/rtp-recv.sh.j2 b/roles/streaming/dolmetsch-raspi/templates/rtp-recv.sh.j2
index c9a89f95..1cbd08ea 100644
--- a/roles/streaming/dolmetsch-raspi/templates/rtp-recv.sh.j2
+++ b/roles/streaming/dolmetsch-raspi/templates/rtp-recv.sh.j2
@@ -1,13 +1,14 @@
#!/bin/bash
HOST="$1"
-if [ -z "$HOST" ]; then
- echo "usage: $0 <remote-host>"
+LATENCY="$2"
+if [ -z "$HOST" ] || [ -z "$LATENCY" ]; then
+ echo "usage: $0 <remote-host> <latency-ms>"
exit 1
fi
#export GST_DEBUG=3
-exec gst-launch-1.0 rtpbin name=rtpbin latency=50 \
+exec gst-launch-1.0 rtpbin name=rtpbin "latency=$LATENCY" \
udpsrc port=5000 caps="application/x-rtp,media=(string)audio,encoding-name=(string)OPUS,clock-rate=(int)48000" ! rtpbin.recv_rtp_sink_0 \
rtpbin. ! rtpopusdepay ! opusdec ! alsasink \
udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0 \
diff --git a/roles/streaming/dolmetsch-raspi/templates/rtp-send.service.j2 b/roles/streaming/dolmetsch-raspi/templates/rtp-send.service.j2
index 40a029ab..090bb80a 100644
--- a/roles/streaming/dolmetsch-raspi/templates/rtp-send.service.j2
+++ b/roles/streaming/dolmetsch-raspi/templates/rtp-send.service.j2
@@ -2,8 +2,7 @@
Description=RTP Sender
[Service]
-{# TODO: remove hardcoded IP #}
-ExecStart=/usr/local/bin/rtp-send.sh 192.168.48.102
+ExecStart=/usr/local/bin/rtp-send.sh {{ dolmetsch_raspi_server_address }}
Restart=always
RestartSecs=1s
StartLimitBurst=10
diff --git a/roles/streaming/dolmetsch-raspi/templates/rtp-send.sh.j2 b/roles/streaming/dolmetsch-raspi/templates/rtp-send.sh.j2
index 9754b620..a0dba99a 100644
--- a/roles/streaming/dolmetsch-raspi/templates/rtp-send.sh.j2
+++ b/roles/streaming/dolmetsch-raspi/templates/rtp-send.sh.j2
@@ -8,7 +8,7 @@ fi
#export GST_DEBUG=3
exec gst-launch-1.0 rtpbin name=rtpbin \
- alsasrc device=hw:CODEC ! 'audio/x-raw,rate=48000,channels=1' ! opusenc ! rtpopuspay ! rtpbin.send_rtp_sink_0 \
+ alsasrc device='{{ dolmetsch_raspi_send_alsa_device }}' ! 'audio/x-raw,rate=48000,channels=1' ! opusenc ! rtpopuspay ! rtpbin.send_rtp_sink_0 \
rtpbin.send_rtp_src_0 ! udpsink "host=$HOST" port=5000 \
rtpbin.send_rtcp_src_0 ! udpsink "host=$HOST" port=5001 sync=false async=false \
udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0