1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

videoio: fix v4l2 test on older platforms (centos)

This commit is contained in:
Maksim Shabunin
2023-07-11 17:05:32 +03:00
parent ef9d14f181
commit e3c1405254
+14
View File
@@ -21,6 +21,20 @@
#include <opencv2/core/utils/configuration.private.hpp>
#include <linux/videodev2.h>
// workarounds for older versions
#ifndef V4L2_PIX_FMT_Y10
#define V4L2_PIX_FMT_Y10 v4l2_fourcc('Y', '1', '0', ' ')
#endif
#ifndef V4L2_PIX_FMT_Y12
#define V4L2_PIX_FMT_Y12 v4l2_fourcc('Y', '1', '2', ' ')
#endif
#ifndef V4L2_PIX_FMT_ABGR32
#define V4L2_PIX_FMT_ABGR32 v4l2_fourcc('A', 'R', '2', '4')
#endif
#ifndef V4L2_PIX_FMT_XBGR32
#define V4L2_PIX_FMT_XBGR32 v4l2_fourcc('X', 'R', '2', '4')
#endif
using namespace cv;
namespace opencv_test { namespace {