Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 01 Jan 2021 14:14:47 +0000
From:      bugzilla-noreply@freebsd.org
To:        multimedia@FreeBSD.org
Subject:   maintainer-feedback requested: [Bug 252327] multimedia/v4l-utils: v4l2-ctl can't determine the device type
Message-ID:  <bug-252327-12827-C3B99Gc4Hh@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-252327-12827@https.bugs.freebsd.org/bugzilla/>
References:  <bug-252327-12827@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
Bugzilla Automation <bugzilla@FreeBSD.org> has asked freebsd-multimedia
(Nobody) <multimedia@FreeBSD.org> for maintainer-feedback:
Bug 252327: multimedia/v4l-utils: v4l2-ctl can't determine the device type
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D252327



--- Description ---
v4l2-ctl allows you to set options on a web camera. For example, changing t=
he
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. Runn=
ing
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=3D0 max=3D255 step=3D1
default=3D128 value=3D128
		       contrast 0x00980901 (int)    : min=3D0 max=3D255 step=3D1
default=3D128 value=3D128
		     saturation 0x00980902 (int)    : min=3D0 max=3D255 step=3D1
default=3D128 value=3D128
 white_balance_temperature_auto 0x0098090c (bool)   : default=3D1 value=3D1
			   gain 0x00980913 (int)    : min=3D0 max=3D255 step=3D1
default=3D0 value=3D136
	   power_line_frequency 0x00980918 (menu)   : min=3D0 max=3D2 default=3D2
value=3D1
				0: Disabled
				1: 50 Hz
				2: 60 Hz
      white_balance_temperature 0x0098091a (int)    : min=3D2000 max=3D6500=
 step=3D1
default=3D4000 value=3D3385 flags=3Dinactive
		      sharpness 0x0098091b (int)    : min=3D0 max=3D255 step=3D1
default=3D128 value=3D128
	 backlight_compensation 0x0098091c (int)    : min=3D0 max=3D1 step=3D1
default=3D0 value=3D0
		  exposure_auto 0x009a0901 (menu)   : min=3D0 max=3D3 default=3D3
value=3D3
				1: Manual Mode
				3: Aperture Priority Mode
	      exposure_absolute 0x009a0902 (int)    : min=3D3 max=3D2047 step=3D1
default=3D250 value=3D299 flags=3Dinactive
	 exposure_auto_priority 0x009a0903 (bool)   : default=3D0 value=3D1
		   pan_absolute 0x009a0908 (int)    : min=3D-36000 max=3D36000
step=3D3600 default=3D0 value=3D0
		  tilt_absolute 0x009a0909 (int)    : min=3D-36000 max=3D36000
step=3D3600 default=3D0 value=3D0
		 focus_absolute 0x009a090a (int)    : min=3D0 max=3D250 step=3D5
default=3D0 value=3D50 flags=3Dinactive
		     focus_auto 0x009a090c (bool)   : default=3D1 value=3D1
		  zoom_absolute 0x009a090d (int)    : min=3D100 max=3D500 step=3D1
default=3D100 value=3D100


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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-252327-12827-C3B99Gc4Hh>