add additional option for rcmode validation

This commit is contained in:
Alfonso Gamboa 2022-06-12 23:34:41 -07:00
parent d68109d1fe
commit 9ea262913e

View File

@ -426,14 +426,14 @@ if [[ "$RTSP_HI_RES_ENABLED" == "true" ]]; then
if [[ "$RTSP_HI_RES_ENC_PARAMETER" != "" ]]; then
if [[ "$V2" == "true" ]]; then
if [[ $RTSP_HI_RES_ENC_PARAMETER =~ "^[1|2|4|8]$" ]]; then
if [[ $RTSP_HI_RES_ENC_PARAMETER =~ "^[0|1|2|4|8]$" ]]; then
watch -n30 -t "/system/bin/impdbg --enc_rc_s 0:0:4:$RTSP_HI_RES_ENC_PARAMETER" > /dev/null 2>&1 &
sleep 5
else
echo "Invalid encoder value"
fi
else
if [[ $RTSP_HI_RES_ENC_PARAMETER =~ "^[1|2|4|8]$" ]]; then
if [[ $RTSP_HI_RES_ENC_PARAMETER =~ "^[0|1|2|4|8]$" ]]; then
watch -n30 -t "/system/bin/impdbg --enc_rc_s 0:44:4:$RTSP_HI_RES_ENC_PARAMETER" > /dev/null 2>&1 &
else
echo "Invalid encoder value"
@ -506,14 +506,14 @@ if [[ "$RTSP_LOW_RES_ENABLED" == "true" ]]; then
if [[ "$RTSP_LOW_RES_ENC_PARAMETER" != "" ]]; then
if [[ "$V2" == "true" ]]; then
if [[ $RTSP_LOW_RES_ENC_PARAMETER =~ "^[1|2|4|8]$" ]]; then
if [[ $RTSP_LOW_RES_ENC_PARAMETER =~ "^[0|1|2|4|8]$" ]]; then
watch -n30 -t "/system/bin/impdbg --enc_rc_s 1:0:4:$RTSP_LOW_RES_ENC_PARAMETER" > /dev/null 2>&1 &
sleep 5
else
echo "Invalid encoder value"
fi
else
if [[ $RTSP_LOW_RES_ENC_PARAMETER =~ "^[1|2|4|8]$" ]]; then
if [[ $RTSP_LOW_RES_ENC_PARAMETER =~ "^[0|1|2|4|8]$" ]]; then
watch -n30 -t "/system/bin/impdbg --enc_rc_s 1:44:4:$RTSP_LOW_RES_ENC_PARAMETER" > /dev/null 2>&1 &
else
echo "Invalid encoder value"