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

Merge pull request #23970 from mshabunin:fix-v4l-test

videoio: fix v4l2 test on older platforms (centos)
This commit is contained in:
Alexander Smorkalov
2023-07-11 18:16:28 +03:00
committed by GitHub
+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 {