Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: support no_proxy mode with camera-streamer (bookworm) #238

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion libs/camera-streamer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function run_multi() {
}

function run_ayucamstream() {
local cam_sec ust_bin dev pt res rtsp rtsp_pt fps cstm start_param
local cam_sec ust_bin dev pt res rtsp rtsp_pt fps cstm noprx start_param
local v4l2ctl
cam_sec="${1}"
ust_bin="${BASE_CN_PATH}/bin/camera-streamer/camera-streamer"
Expand All @@ -36,11 +36,21 @@ function run_ayucamstream() {
rtsp=$(get_param "cam ${cam_sec}" enable_rtsp)
rtsp_pt=$(get_param "cam ${cam_sec}" rtsp_port)
cstm="$(get_param "cam ${cam_sec}" custom_flags 2> /dev/null)"
noprx="$(get_param "crowsnest" no_proxy 2> /dev/null)"
## construct start parameter
# set http port
#
start_param=( --http-port="${pt}" )

if [[ -n "${noprx}" ]] && [[ "${noprx}" = "true" ]]; then
# See https://github.com/mainsail-crew/crowsnest/pull/221#issuecomment-1863555700 for why
# we cannot assume the binary has support for `--http-listen`.
if $ust_bin --help | grep -q "http-listen"; then
start_param+=( --http-listen "0.0.0.0" )
t3chguy marked this conversation as resolved.
Show resolved Hide resolved
log_msg "INFO: Set to 'no_proxy' mode! Using 0.0.0.0!"
fi
fi

# Set device
start_param+=( --camera-path="${dev}" )

Expand Down