fix: fixes focus_absolute not correct after streamer started

Some devices tend to lose focus_absolut value
after the Streamer starts.

This will check for 'brokenfocus' devices and
set focus_absolute again after the stream services has started.

Signed-off-by: Stephan Wendel <me@stephanwe.de>
This commit is contained in:
Stephan Wendel 2022-04-08 19:38:04 +02:00
parent 2e3cf93568
commit 3bfea5ad19
No known key found for this signature in database
GPG Key ID: F465B83ACBA45639

View File

@ -62,17 +62,6 @@ main
}
function brokenfocus {
# call get_dev_id <device>
# ex.: get_dev_id /dev/v4l/by-id/mywierd-cam-index0
# spits out device id like lsusb
function get_dev_id {
local device uevent_path
device="$(realpath "${1}" | sed 's|/dev/||')"
uevent_path="/sys/class/video4linux/${device}/device/uevent"
grep "PRODUCT" "${uevent_path}" | cut -d'=' -f2 | awk -F'/' '{print $1":"$2}'
}
# checks if "focus_absolute" is configured
# call if_focus_absolute <mycamnameornumber>
# returns 1 = true, 0 = false