diff options
author | Christian Pointner <equinox@spreadspace.org> | 2021-07-30 22:10:52 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2021-07-30 22:10:52 +0200 |
commit | 2c71bfe6363f5fe9186eeca48384052d3c6cd741 (patch) | |
tree | 44c40fbb26b6ba3e1402a45f8efae2f4d0b59e51 /roles/streaming/dolmetsch-raspi/templates | |
parent | move dolmetsch-raspi to generic folder (diff) |
cleanup dolmetsch-raspi role
Diffstat (limited to 'roles/streaming/dolmetsch-raspi/templates')
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 |