Skip to content

Commit 99cfba5

Browse files
authored
[Automated] Merged develop into target master
2 parents c0c9c41 + 618d887 commit 99cfba5

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

libs/camera-streamer.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function run_multi() {
2525
}
2626

2727
function run_ayucamstream() {
28-
local cam_sec ust_bin dev pt res rtsp rtsp_pt fps cstm start_param
28+
local cam_sec ust_bin dev pt res rtsp rtsp_pt fps cstm noprx start_param
2929
local v4l2ctl
3030
cam_sec="${1}"
3131
ust_bin="${BASE_CN_PATH}/bin/camera-streamer/camera-streamer"
@@ -36,11 +36,21 @@ function run_ayucamstream() {
3636
rtsp=$(get_param "cam ${cam_sec}" enable_rtsp)
3737
rtsp_pt=$(get_param "cam ${cam_sec}" rtsp_port)
3838
cstm="$(get_param "cam ${cam_sec}" custom_flags 2> /dev/null)"
39+
noprx="$(get_param "crowsnest" no_proxy 2> /dev/null)"
3940
## construct start parameter
4041
# set http port
4142
#
4243
start_param=( --http-port="${pt}" )
4344

45+
if [[ -n "${noprx}" ]] && [[ "${noprx}" = "true" ]]; then
46+
# See https://github.com/mainsail-crew/crowsnest/pull/221#issuecomment-1863555700 for why
47+
# we cannot assume the binary has support for `--http-listen`.
48+
if ${ust_bin} --help | grep -q "http-listen"; then
49+
start_param+=( --http-listen=0.0.0.0 )
50+
log_msg "INFO: Set to 'no_proxy' mode! Using 0.0.0.0!"
51+
fi
52+
fi
53+
4454
# Set device
4555
start_param+=( --camera-path="${dev}" )
4656

0 commit comments

Comments
 (0)