From 0d01c144a85c59fdf2cd0fe7bd93c346b0c6f438 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 7 May 2017 00:50:19 +0200 Subject: Tidy functions: Move generic ones together. --- bin/stream | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'bin') diff --git a/bin/stream b/bin/stream index 48654e6..0d46904 100755 --- a/bin/stream +++ b/bin/stream @@ -86,6 +86,13 @@ VBITRATE=256000 echo_n() { printf "$*" } +# shellcheck disable=SC2048,SC2059 +printf_each() { + skel=$1; shift + for string in $*; do + printf "$skel" "$string" + done +} HEIGHTS=$(echo "$HEIGHTS_WEBM $HEIGHTS_MPEG" | tr ' ' '\012' | sort -u) HEIGHTCOUNT=$(echo "$HEIGHTS" | wc --words) @@ -100,14 +107,6 @@ VCODECCOUNT= [ -z "${SAVEDIR:-}" ] || SAVESTEM="${SAVEDIR:-}/$(date +%Y%m%d-%H%M%S)" [ -z "${SAVEDIR:-}" ] || export FFREPORT=file="$SAVESTEM.log" -# shellcheck disable=SC2048,SC2059 -printf_each() { - skel=$1; shift - for string in $*; do - printf "$skel" "$string" - done -} - tee_rtp() { stream=$1; pt=$2; port=$3; echo_n "[select=\'$stream\':f=rtp:payload_type=$pt]rtp://$IP:$port?pkt_size=1200" } -- cgit v1.2.3