diff options
author | Jonas Smedegaard <dr@jones.dk> | 2017-02-26 15:42:05 +0100 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2017-02-26 15:42:38 +0100 |
commit | d9fc96d135fa868206c0b85bb42f46188a4c5648 (patch) | |
tree | 498dbb77b22359f0ae25a4e16c2bbccdf29e465b | |
parent | 63f25d1e4b4a69cca51e8319d8270f5ccdbb721b (diff) |
Use variable ID (and drop port variables used only once each).
-rwxr-xr-x | bin/recv-gst-rtp-v-a | 14 |
1 files changed, 6 insertions, 8 deletions
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 \ |