Date: Fri, 01 Jan 2021 14:14:47 +0000 From: bugzilla-noreply@freebsd.org To: multimedia@FreeBSD.org Subject: [Bug 252327] multimedia/v4l-utils: v4l2-ctl can't determine the device type Message-ID: <bug-252327-12827@https.bugs.freebsd.org/bugzilla/>
index | next in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252327 Bug ID: 252327 Summary: multimedia/v4l-utils: v4l2-ctl can't determine the device type Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: multimedia@FreeBSD.org Reporter: trueos@norwegianrockcat.com Assignee: multimedia@FreeBSD.org Flags: maintainer-feedback?(multimedia@FreeBSD.org) v4l2-ctl allows you to set options on a web camera. For example, changing the power line frequency to 50 Hz to get rid of flicker with lights in Europe. Unfortunately, it seems that v4l2-ctl can't determine the device type. Running it with any sort of webcam produces the following: v4l2-ctl -L Unable to detect what device /dev/video0 is, exiting. Looking at the source code it seems that mi_media_detect_type() in media-info.cpp is using the Linux sysfs and uevent to get information about the device type. This information doesn't exist on FreeBSD (at least not in that form). If one hardcodes(!) the type to MEDIA_TYPE_VIDEO, the information does show up: ./v4l2-ctl -L brightness 0x00980900 (int) : min=0 max=255 step=1 default=128 value=128 contrast 0x00980901 (int) : min=0 max=255 step=1 default=128 value=128 saturation 0x00980902 (int) : min=0 max=255 step=1 default=128 value=128 white_balance_temperature_auto 0x0098090c (bool) : default=1 value=1 gain 0x00980913 (int) : min=0 max=255 step=1 default=0 value=136 power_line_frequency 0x00980918 (menu) : min=0 max=2 default=2 value=1 0: Disabled 1: 50 Hz 2: 60 Hz white_balance_temperature 0x0098091a (int) : min=2000 max=6500 step=1 default=4000 value=3385 flags=inactive sharpness 0x0098091b (int) : min=0 max=255 step=1 default=128 value=128 backlight_compensation 0x0098091c (int) : min=0 max=1 step=1 default=0 value=0 exposure_auto 0x009a0901 (menu) : min=0 max=3 default=3 value=3 1: Manual Mode 3: Aperture Priority Mode exposure_absolute 0x009a0902 (int) : min=3 max=2047 step=1 default=250 value=299 flags=inactive exposure_auto_priority 0x009a0903 (bool) : default=0 value=1 pan_absolute 0x009a0908 (int) : min=-36000 max=36000 step=3600 default=0 value=0 tilt_absolute 0x009a0909 (int) : min=-36000 max=36000 step=3600 default=0 value=0 focus_absolute 0x009a090a (int) : min=0 max=250 step=5 default=0 value=50 flags=inactive focus_auto 0x009a090c (bool) : default=1 value=1 zoom_absolute 0x009a090d (int) : min=100 max=500 step=1 default=100 value=100 Naturally, hard coding this value is not a permanent solution, but it does show that things work afterwards. There are still issues in setting values (getsubopt returns differently), but the first step is to get the items to recognize correctly. -- You are receiving this mail because: You are the assignee for the bug.help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-252327-12827>
