summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2017-05-07 00:50:19 +0200
committerJonas Smedegaard <dr@jones.dk>2017-05-07 00:50:19 +0200
commit0d01c144a85c59fdf2cd0fe7bd93c346b0c6f438 (patch)
treebe3e40eca5ddc50e859556114f7ee0117f7161a8 /bin
parent4f0a8d550a013f57886cc15543b01fa0185a7d81 (diff)
Tidy functions: Move generic ones together.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/stream15
1 files changed, 7 insertions, 8 deletions
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"
}