Skip to content

Commit c95970b

Browse files
committed
Add RTSP_STI option
1 parent b842ccd commit c95970b

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

src/static/static/yi-hack/etc/system.conf

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ RTSP=yes
1111
RTSP_ALT=standard
1212
RTSP_STREAM=high
1313
RTSP_AUDIO=yes
14+
RTSP_STI=yes
1415
SPEAKER_AUDIO=yes
1516
SNAPSHOT=yes
1617
SNAPSHOT_VIDEO=no

src/static/static/yi-hack/script/check_conf.sh

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ RTSP=yes
1818
RTSP_ALT=standard
1919
RTSP_STREAM=high
2020
RTSP_AUDIO=yes
21+
RTSP_STI=yes
2122
SPEAKER_AUDIO=yes
2223
SNAPSHOT=yes
2324
SNAPSHOT_VIDEO=no

src/static/static/yi-hack/script/service.sh

+6-3
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ init_config()
8383

8484
RTSP_RES=$(get_config RTSP_STREAM)
8585
RTSP_ALT=$(get_config RTSP_ALT)
86+
if [[ $(get_config RTSP_ALT) == "standard" ]] && [[ $(get_config RTSP_STI) != "yes" ]]; then
87+
RTSP_STI="-s"
88+
fi
8689
fi
8790

8891
if [[ $(get_config ONVIF_NETIF) == "wlan0" ]] ; then
@@ -180,19 +183,19 @@ start_rtsp()
180183
h264grabber -m $MODEL_SUFFIX -r low $H264GRABBER_AUDIO -f &
181184
sleep 1
182185
fi
183-
$RTSP_DAEMON -m $MODEL_SUFFIX -r low $RTSP_AUDIO_OPTION $P_RTSP_PORT $RTSP_USER $RTSP_PASSWORD $RTSP_AUDIO_BC &
186+
$RTSP_DAEMON -m $MODEL_SUFFIX -r low $RTSP_STI $RTSP_AUDIO_OPTION $P_RTSP_PORT $RTSP_USER $RTSP_PASSWORD $RTSP_AUDIO_BC &
184187
elif [[ $RTSP_RES == "high" ]]; then
185188
if [ "$RTSP_ALT" == "yes" ]; then
186189
h264grabber -m $MODEL_SUFFIX -r high $H264GRABBER_AUDIO -f &
187190
sleep 1
188191
fi
189-
$RTSP_DAEMON -m $MODEL_SUFFIX -r high $RTSP_AUDIO_OPTION $P_RTSP_PORT $RTSP_USER $RTSP_PASSWORD $RTSP_AUDIO_BC &
192+
$RTSP_DAEMON -m $MODEL_SUFFIX -r high $RTSP_STI $RTSP_AUDIO_OPTION $P_RTSP_PORT $RTSP_USER $RTSP_PASSWORD $RTSP_AUDIO_BC &
190193
elif [[ $RTSP_RES == "both" ]]; then
191194
if [ "$RTSP_ALT" == "yes" ]; then
192195
h264grabber -m $MODEL_SUFFIX -r both $H264GRABBER_AUDIO -f &
193196
sleep 1
194197
fi
195-
$RTSP_DAEMON -m $MODEL_SUFFIX -r both $RTSP_AUDIO_OPTION $P_RTSP_PORT $RTSP_USER $RTSP_PASSWORD $RTSP_AUDIO_BC &
198+
$RTSP_DAEMON -m $MODEL_SUFFIX -r both $RTSP_STI $RTSP_AUDIO_OPTION $P_RTSP_PORT $RTSP_USER $RTSP_PASSWORD $RTSP_AUDIO_BC &
196199
fi
197200

198201
WD_COUNT=$(ps | grep wd_rtsp.sh | grep -v grep | grep -c ^)

0 commit comments

Comments
 (0)