Skip to content

Commit fae32a0

Browse files
committed
Merge branch 'rtsp_over_http'
* rtsp_over_http: RTSP over HTTP対応
2 parents 84b1e00 + 47b4deb commit fae32a0

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

configs/overlay_rootfs/scripts/lighttpd.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ fi
2121

2222
if [ "$1" = "restart" ]; then
2323
kill `pidof lighttpd` > /dev/null 2>&1
24-
while netstat -ltn 2> /dev/null | grep :80 > /dev/null; do
24+
while netstat -ltn 2> /dev/null | grep ':80 ' > /dev/null; do
2525
sleep 0.5
2626
done
2727
/usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf

configs/overlay_rootfs/scripts/rtspserver.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ if [ "$1" = "on" -o "$RTSPSERVER" = "on" ]; then
1414
/scripts/cmd video on > /dev/null
1515
/scripts/cmd audio on > /dev/null
1616
if ! pidof v4l2rtspserver > /dev/null ; then
17-
while netstat -ltn 2> /dev/null | grep :8554; do
17+
while netstat -ltn 2> /dev/null | egrep ":(8554|8080)"; do
1818
sleep 0.5
1919
done
20-
/usr/bin/v4l2rtspserver -C 1 -a S16_LE -l 0 /dev/video1,hw:Loopback,0 >> /tmp/log/rtspserver.log 2>&1 &
20+
/usr/bin/v4l2rtspserver -p 8080 -C 1 -a S16_LE -l 0 /dev/video1,hw:Loopback,0 >> /tmp/log/rtspserver.log 2>&1 &
2121
fi
2222
if [ "$RTSP_AUDIO" != "on" ] ; then
2323
/scripts/cmd audio off > /dev/null

web/source/vue/Setting.vue

+14-4
Original file line numberDiff line numberDiff line change
@@ -281,10 +281,18 @@
281281
</ElTooltip>
282282
<ElRow v-if="config.RTSPSERVER === 'on'">
283283
<ElCol :offset="2" :span="7">
284-
<h4>URL</h4>
284+
<h4>RTSP(UDP)</h4>
285285
</ElCol>
286286
<ElCol :span="10">
287-
<ElInput type="text" readonly v-model="RTSP_URL" />
287+
<ElInput type="text" readonly v-model="RTSP_UDP" />
288+
</ElCol>
289+
</ElRow>
290+
<ElRow v-if="config.RTSPSERVER === 'on'">
291+
<ElCol :offset="2" :span="7">
292+
<h4>RTSP(over HTTP)</h4>
293+
</ElCol>
294+
<ElCol :span="10">
295+
<ElInput type="text" readonly v-model="RTSP_OVER_HTTP" />
288296
</ElCol>
289297
</ElRow>
290298

@@ -580,7 +588,8 @@
580588
},
581589
data() {
582590
return {
583-
RTSP_URL: '',
591+
RTSP_UDP: '',
592+
RTSP_OVER_HTTP: '',
584593
config: {
585594
appver: '', // ATOMCam app_ver (/atom/config/app.ver)
586595
ATOMHACKVER: '', // AtomHack Ver (/etc/atomhack.ver)
@@ -739,7 +748,8 @@
739748
this.reboot.dayOfWeekSelect = days.map(d => this.weekDays[(d + 6) % 7]);
740749
}
741750
742-
this.RTSP_URL = `rtsp://${window.location.host}:8554/unicast`;
751+
this.RTSP_UDP = `rtsp://${window.location.host}:8554/unicast`;
752+
this.RTSP_OVER_HTTP = `rtsp://${window.location.host}:8080/unicast`;
743753
744754
setInterval(async () => {
745755
const res = await axios.get('./cgi-bin/cmd.cgi?name=time').catch(err => {

0 commit comments

Comments
 (0)