From 4f0a8d550a013f57886cc15543b01fa0185a7d81 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 7 May 2017 00:42:51 +0200 Subject: Tidy function tee_rtp: Generalize function echo_n. --- bin/stream | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/stream b/bin/stream index 38f8a00..48654e6 100755 --- a/bin/stream +++ b/bin/stream @@ -82,6 +82,11 @@ HEIGHTS_WEBM=360 HEIGHTS_MPEG=360 VBITRATE=256000 +# shellcheck disable=SC2048,SC2059 +echo_n() { + printf "$*" +} + HEIGHTS=$(echo "$HEIGHTS_WEBM $HEIGHTS_MPEG" | tr ' ' '\012' | sort -u) HEIGHTCOUNT=$(echo "$HEIGHTS" | wc --words) @@ -103,9 +108,9 @@ printf_each() { done } -# shellcheck disable=SC2059 tee_rtp() { stream=$1; pt=$2; port=$3; - printf "[select=\'$stream\':f=rtp:payload_type=$pt]rtp://$IP:$port?pkt_size=1200"; } + echo_n "[select=\'$stream\':f=rtp:payload_type=$pt]rtp://$IP:$port?pkt_size=1200" +} # * scale+watermark trick based on http://stackoverflow.com/a/10937357 # * routing based on http://trac.ffmpeg.org/wiki/Creating%20multiple%20outputs#Teepseudo-muxer -- cgit v1.2.3