From 3bfea5ad19d24d2d73cc63cf286c39aafadc2065 Mon Sep 17 00:00:00 2001 From: Stephan Wendel Date: Fri, 8 Apr 2022 19:38:04 +0200 Subject: [PATCH] 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 --- libs/v4l2_control.sh | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/libs/v4l2_control.sh b/libs/v4l2_control.sh index 76d29a6..3e68364 100755 --- a/libs/v4l2_control.sh +++ b/libs/v4l2_control.sh @@ -62,17 +62,6 @@ main } function brokenfocus { - - # call get_dev_id - # 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 # returns 1 = true, 0 = false