Closed Bug 1847500 Opened 2 years ago Closed 1 year ago

should check for presence of linux/videodev2.h before enabling V4L2 (or include the proper videoio.h header on NetBSD/OpenBSD)

Categories

(Core :: Widget: Gtk, defect, P5)

Unspecified
OpenBSD
defect

Tracking

()

RESOLVED FIXED
119 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox-esr115 --- unaffected
firefox116 --- wontfix
firefox117 --- wontfix
firefox118 --- wontfix
firefox119 --- fixed

People

(Reporter: gaston, Assigned: gaston)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

on OpenBSD, we have a v4l2-compatible API for webcams etc, but so far no such things for accelerated decoding of videos (which afaict is also confusingly named 'v4l2') so since 116 firefox fails to build v4l2test on OpenBSD/arm64:

/usr/obj/ports/firefox-116.0/firefox-116.0/widget/gtk/v4l2test/v4l2test.cpp:12:10: fatal error: 'linux/videodev2.h' file not found

i think https://searchfox.org/mozilla-central/source/toolkit/moz.configure#545 should be amended to ensure that linux/videodev2.h exists. Or v4l2test.cpp shouldnt include this header if it doesnt exist.

or reuse the same #ifdef dance as used in webrtc, such as in https://searchfox.org/mozilla-central/source/third_party/libwebrtc/moz-patch-stack/0014.patch#26, which would also fix solaris:

+#if defined(__NetBSD__) || defined(__OpenBSD__) // WEBRTC_BSD
+#include <sys/videoio.h>
+#elif defined(__sun)
+#include <sys/videodev2.h>
+#else
 #include <linux/videodev2.h>
+#endif
Summary: should check for presence of linux/videodev2.h before enabling V4L2 → should check for presence of linux/videodev2.h before enabling V4L2 (or include the proper videoio.h header on NetBSD/OpenBSD)
OS: Unspecified → OpenBSD

looking at v4l2test, there's no reason it shouldnt build on OpenBSD, according to http://bxr.su/OpenBSD/sys/sys/videoio.h#1418 the #defines used should exist for us if the right include is used.

not a patch, but the attached test program (adapted quickly from v4l2test.cpp) builds with a plain C compiler and runs on OpenBSD/amd64 (and properly says we dont have M2M support)

$./t -d /dev/video0
v4l2test probing device '/dev/video0'
v4l2test driver uvideo0 card Integrated Camera bus_info usb version 1
ERROR
V4L2 device /dev/video0 does not support M2M modes
Flags: needinfo?(stransky)

Set release status flags based on info from the regressing bug 1839599

Please create a patch for it and attach it here.
Thanks.

Flags: needinfo?(stransky)
Assignee: nobody → landry
Status: NEW → ASSIGNED

:petr, i dont know what is the status of m-c on solaris but you might be interested in the v4l2test patch at some point ?

I don't know either. Right now we are focusing on basic Firefox functionality. I can just confirm that your change doesn't seem to cause any trauble.

Pushed by archaeopteryx@coole-files.de: https://hg.mozilla.org/integration/autoland/rev/ef223d9e18ae include the proper v4l2 header on OpenBSD/NetBSD/solaris r=stransky
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 119 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: