diff options
author | Jonas Smedegaard <dr@jones.dk> | 2017-05-07 00:42:51 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2017-05-07 00:49:14 +0200 |
commit | 4f0a8d550a013f57886cc15543b01fa0185a7d81 (patch) | |
tree | 67320f62e35db9fc744205ff72a9bfaa01d0d5b2 /bin | |
parent | 20d6f32da1b863cfdbd418b3cd5321a74b1f3db4 (diff) |
Tidy function tee_rtp: Generalize function echo_n.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/stream | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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 |