⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rtpw_test.sh

📁 mediastreamer2是开源的网络传输媒体流的库
💻 SH
字号:
#!/bin/sh# # usage: rtpw_test <rtpw_commands># # tests the rtpw sender and receiver functionsRTPW=rtpwDEST_PORT=9999DURATION=3key=2b2edc5034f61a72345ca5986d7bfd0189aa6dc2ecab32fd9af74df6dfc6ARGS="-k $key -ae"# First, we run "killall" to get rid of all existing rtpw processes.# This step also enables this script to clean up after itself; if this# script is interrupted after the rtpw processes are started but before# they are killed, those processes will linger.  Re-running the script# will get rid of them.killall rtpw 2&>/dev/nullif test -x $RTPW; thenecho  $0 ": starting rtpw receiver process... "./$RTPW $* $ARGS -r 0.0.0.0 $DEST_PORT  &receiver_pid=$!echo $0 ": receiver PID = $receiver_pid"sleep 1 # verify that the background job is runningps | grep -q $receiver_pidretval=$?echo $retvalif [ $retval != 0 ]; then    echo $0 ": error"    exit 254fiecho  $0 ": starting rtpw sender process..."./$RTPW $* $ARGS -s 127.0.0.1 $DEST_PORT  &sender_pid=$!echo $0 ": sender PID = $sender_pid"# verify that the background job is runningps | grep -q $sender_pidretval=$?echo $retvalif [ $retval != 0 ]; then    echo $0 ": error"    exit 255fisleep $DURATIONkill $receiver_pidkill $sender_pidecho $0 ": done (test passed)"else echo "error: can't find executable" $RTPWexit 1fi# EOF

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -