GNOME Bugzilla – Bug 725410
v4l2videodec: Probe fails if first device does not start with 0
Last modified: 2014-05-08 20:21:12 UTC
Currently, v4l2videodec probe for HW decoder by iterating /dev/videoN, starting as zero. If /dev/video0 does not exist, it fails to find a decoder. This seems like the wrong way to enumerate the devices, still need to find the right way, if anyone have information. Is using udev might be an option ?
After looking at v4l2 utils, it seems that a good way would be to enumerate /sys/class/video4linux/video* . I think it could be nice to improve the element naming (ensure that decoder name does not change) by using /sys/class/video4linux/video*/name. I need to check if that is unique, and characters being used.
This was fixed by: commit aa74871080d93701523e8bc183b2a8432e9b61c5 Author: Nicolas Dufresne <nicolas.dufresne@collabora.co.uk> Date: Fri May 2 21:38:30 2014 -0400 v4l2: Use single pass iterator for M2M probe Instead of having each M2M class do their own probing, use the GstV4l2Iterator and probe all devices in a single pass. https://bugzilla.gnome.org/show_bug.cgi?id=727925 commit 726fc3b5249274d9a56dcd3c7dc45e48c52b912d Author: Nicolas Dufresne <nicolas.dufresne@collabora.com> Date: Fri May 2 16:55:05 2014 -0400 v4l2: Add a common device enumerator This will allow removing code duplication (hence bugs duplication). https://bugzilla.gnome.org/show_bug.cgi?id=727925