mirror of
https://github.com/gtxaspec/wz_mini_hacks.git
synced 2025-08-09 20:14:04 +00:00
add encoder mode parameter validation check
This commit is contained in:
@@ -424,13 +424,21 @@ if [[ "$RTSP_HI_RES_ENABLED" == "true" ]]; then
|
||||
echo "rtsp audio disabled"
|
||||
fi
|
||||
|
||||
if [[ "$RTSP_HI_RES_ENC_PARAMETER" != "" ]]; then
|
||||
if [[ "$V2" == "true" ]]; then
|
||||
watch -n30 -t "/system/bin/impdbg --enc_rc_s 0:0:4:$RTSP_HI_RES_ENC_PARAMETER" > /dev/null 2>&1 &
|
||||
else
|
||||
watch -n30 -t "/system/bin/impdbg --enc_rc_s 0:44:4:$RTSP_HI_RES_ENC_PARAMETER" > /dev/null 2>&1 &
|
||||
fi
|
||||
fi
|
||||
if [[ "$RTSP_HI_RES_ENC_PARAMETER" != "" ]]; then
|
||||
if [[ "$V2" == "true" ]]; then
|
||||
if [[ $RTSP_HI_RES_ENC_PARAMETER =~ "^[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 &
|
||||
else
|
||||
echo "Invalid encoder value"
|
||||
fi
|
||||
else
|
||||
if [[ $RTSP_HI_RES_ENC_PARAMETER =~ "^[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"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$RTSP_HI_RES_MAX_BITRATE" != "" ]]; then
|
||||
if [[ "$V2" == "true" ]]; then
|
||||
@@ -493,13 +501,21 @@ if [[ "$RTSP_LOW_RES_ENABLED" == "true" ]]; then
|
||||
echo "rtsp audio disabled"
|
||||
fi
|
||||
|
||||
if [[ "$RTSP_LOW_RES_ENC_PARAMETER" != "" ]]; then
|
||||
if [[ "$V2" == "true" ]]; then
|
||||
watch -n30 -t "/system/bin/impdbg --enc_rc_s 1:0:4:$RTSP_LOW_RES_ENC_PARAMETER" > /dev/null 2>&1 &
|
||||
else
|
||||
watch -n30 -t "/system/bin/impdbg --enc_rc_s 1:44:4:$RTSP_LOW_RES_ENC_PARAMETER" > /dev/null 2>&1 &
|
||||
fi
|
||||
fi
|
||||
if [[ "$RTSP_LOW_RES_ENC_PARAMETER" != "" ]]; then
|
||||
if [[ "$V2" == "true" ]]; then
|
||||
if [[ $RTSP_LOW_RES_ENC_PARAMETER =~ "^[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 &
|
||||
else
|
||||
echo "Invalid encoder value"
|
||||
fi
|
||||
else
|
||||
if [[ $RTSP_LOW_RES_ENC_PARAMETER =~ "^[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"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$RTSP_LOW_RES_MAX_BITRATE" != "" ]]; then
|
||||
if [[ "$V2" == "true" ]]; then
|
||||
|
Reference in New Issue
Block a user