st/gui: Add warning when v4l driver is disabled on linux

"Failed to open camera!" is a very uninformative error
This commit is contained in:
Christoph Haag 2022-03-04 16:00:49 +01:00 committed by Jakob Bornecrantz
parent bf1edf96eb
commit 7c55c51408

View file

@ -11,6 +11,7 @@
#include "xrt/xrt_settings.h" #include "xrt/xrt_settings.h"
#include "xrt/xrt_frameserver.h" #include "xrt/xrt_frameserver.h"
#include "xrt/xrt_config_drivers.h" #include "xrt/xrt_config_drivers.h"
#include "xrt/xrt_config_os.h"
#include "util/u_misc.h" #include "util/u_misc.h"
#include "util/u_format.h" #include "util/u_format.h"
@ -115,6 +116,9 @@ on_video_device(struct xrt_prober *xp,
xrt_prober_open_video_device(xp, pdev, vs->xfctx, &vs->xfs); xrt_prober_open_video_device(xp, pdev, vs->xfctx, &vs->xfs);
if (vs->xfs == NULL) { if (vs->xfs == NULL) {
U_LOG_E("Failed to open camera!"); U_LOG_E("Failed to open camera!");
#if defined(XRT_OS_LINUX) && !defined(XRT_HAVE_V4L2)
U_LOG_E("Monado was built with the v4l driver disabled. Most video devices require this driver!");
#endif
free(vs->xfctx); free(vs->xfctx);
vs->xfctx = NULL; vs->xfctx = NULL;
return; return;