From 9cc7f38161269b17cadc8b2fc111a0fbc22f1876 Mon Sep 17 00:00:00 2001 From: Sakari Ailus Date: Fri, 13 Apr 2012 23:34:20 +0300 Subject: Add videodev2.h to allow building on systems without latest kernel headers Add videodev2.h as part of yavta. The file is to be updated from linux-media tree manually in the future. Remove existing format definitions in yavta.c since they are no longer needed. Signed-off-by: Sakari Ailus Signed-off-by: Laurent Pinchart --- yavta.c | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'yavta.c') diff --git a/yavta.c b/yavta.c index 72679c2..6f08d08 100644 --- a/yavta.c +++ b/yavta.c @@ -34,7 +34,7 @@ #include #include -#include +#include "videodev2.h" #ifndef V4L2_BUF_FLAG_ERROR #define V4L2_BUF_FLAG_ERROR 0x0040 @@ -98,28 +98,6 @@ static const char *v4l2_buf_type_name(enum v4l2_buf_type type) return "Unknown"; } -#ifndef V4L2_PIX_FMT_SGRBG8 /* 2.6.31 */ -#define V4L2_PIX_FMT_SGRBG8 v4l2_fourcc('G', 'R', 'B', 'G') -#endif -#ifndef V4L2_PIX_FMT_SRGGB8 /* 2.6.33 */ -#define V4L2_PIX_FMT_SRGGB8 v4l2_fourcc('R', 'G', 'G', 'B') -#define V4L2_PIX_FMT_SBGGR10 v4l2_fourcc('B', 'G', '1', '0') -#define V4L2_PIX_FMT_SGBRG10 v4l2_fourcc('G', 'B', '1', '0') -#define V4L2_PIX_FMT_SRGGB10 v4l2_fourcc('R', 'G', '1', '0') -#define V4L2_PIX_FMT_Y10 v4l2_fourcc('Y', '1', '0', ' ') -#endif -#ifndef V4L2_PIX_FMT_SBGGR12 /* 2.6.39 */ -#define V4L2_PIX_FMT_SBGGR12 v4l2_fourcc('B', 'G', '1', '2') -#define V4L2_PIX_FMT_SGBRG12 v4l2_fourcc('G', 'B', '1', '2') -#define V4L2_PIX_FMT_SGRBG12 v4l2_fourcc('B', 'A', '1', '2') -#define V4L2_PIX_FMT_SRGGB12 v4l2_fourcc('R', 'G', '1', '2') -#define V4L2_PIX_FMT_Y12 v4l2_fourcc('Y', '1', '2', ' ') -#endif -#ifndef V4L2_PIX_FMT_NV24 /* 3.3 */ -#define V4L2_PIX_FMT_NV24 v4l2_fourcc('N', 'V', '2', '4') -#define V4L2_PIX_FMT_NV42 v4l2_fourcc('N', 'V', '4', '2') -#endif - static struct { const char *name; unsigned int fourcc; -- cgit v1.2.3