From d9fc96d135fa868206c0b85bb42f46188a4c5648 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 26 Feb 2017 15:42:05 +0100 Subject: Use variable ID (and drop port variables used only once each). --- bin/recv-gst-rtp-v-a | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'bin') diff --git a/bin/recv-gst-rtp-v-a b/bin/recv-gst-rtp-v-a index 88c874a..2060a33 100755 --- a/bin/recv-gst-rtp-v-a +++ b/bin/recv-gst-rtp-v-a @@ -39,18 +39,16 @@ case "$AUDIO" in esac stream() { - RTPSRCPORT=$((5000+$1-1)) - RTCPSRCPORT=$((5010+$1-1)) - RTCPSINKPORT=$((5020+$1-1)) + ID=$1 CAPS=$2 PLAYBIN=$3 echo \ - udpsrc port=$RTPSRCPORT $RECHOST caps=\""$CAPS"\" \ - ! rtpbin.recv_rtp_sink_$1 rtpbin. \ + udpsrc port=$((5000+ID-1)) $RECHOST caps=\""$CAPS"\" \ + ! rtpbin.recv_rtp_sink_$ID rtpbin. \ ! $PLAYBIN \ - udpsrc port=$RTCPSRCPORT $RECHOST ! rtpbin.recv_rtcp_sink_$1 \ - rtpbin.send_rtcp_src_$1 \ - ! udpsink port=$RTCPSINKPORT $CAMHOST sync=false async=false + udpsrc port=$((5010+ID-1)) $RECHOST ! rtpbin.recv_rtcp_sink_$ID \ + rtpbin.send_rtcp_src_$ID \ + ! udpsink port=$((5020+ID-1)) $CAMHOST sync=false async=false } gst-launch-1.0 -v \ -- cgit v1.2.3