From 0f5ee9580f44cf46b4b6861d25bc39df94bf09d3 Mon Sep 17 00:00:00 2001 From: stan Date: Wed, 28 Jan 2009 11:28:03 +0000 Subject: [PATCH] Conditional compilation for V4L2 stuff. git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2728 e3e1d417-86f3-4887-817a-d78f3d33393f --- src/zm_local_camera.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/zm_local_camera.cpp b/src/zm_local_camera.cpp index 40e4bd6bc..9d7ca1c41 100644 --- a/src/zm_local_camera.cpp +++ b/src/zm_local_camera.cpp @@ -1283,7 +1283,9 @@ int LocalCamera::Capture( Image &image ) switch( palette ) { case VIDEO_PALETTE_YUV420P : +#ifdef ZM_V4L2 case V4L2_PIX_FMT_YUV420 : +#endif // ZM_V4L2 { static unsigned char y_plane[ZM_MAX_IMAGE_DIM]; static char u_plane[ZM_MAX_IMAGE_DIM]; @@ -1356,7 +1358,9 @@ int LocalCamera::Capture( Image &image ) break; } case VIDEO_PALETTE_YUV422P : +#ifdef ZM_V4L2 case V4L2_PIX_FMT_YUV422P : +#endif // ZM_V4L2 { static unsigned char y_plane[ZM_MAX_IMAGE_DIM]; static char u_plane[ZM_MAX_IMAGE_DIM]; @@ -1415,7 +1419,9 @@ int LocalCamera::Capture( Image &image ) } case VIDEO_PALETTE_YUYV : case VIDEO_PALETTE_YUV422 : +#ifdef ZM_V4L2 case V4L2_PIX_FMT_YUYV : +#endif // ZM_V4L2 { int size = width*height*2; unsigned char *s_ptr = buffer; @@ -1450,7 +1456,9 @@ int LocalCamera::Capture( Image &image ) break; } case VIDEO_PALETTE_RGB555 : +#ifdef ZM_V4L2 case V4L2_PIX_FMT_RGB555 : +#endif // ZM_V4L2 { int size = width*height*2; unsigned char r,g,b; @@ -1471,7 +1479,9 @@ int LocalCamera::Capture( Image &image ) break; } case VIDEO_PALETTE_RGB565 : +#ifdef ZM_V4L2 case V4L2_PIX_FMT_RGB565 : +#endif // ZM_V4L2 { int size = width*height*2; unsigned char r,g,b; @@ -1509,6 +1519,7 @@ int LocalCamera::Capture( Image &image ) } break; } +#ifdef ZM_V4L2 case V4L2_PIX_FMT_BGR24 : { int size = width*height*3; @@ -1524,8 +1535,11 @@ int LocalCamera::Capture( Image &image ) buffer = temp_buffer; break; } +#endif // ZM_V4L2 case VIDEO_PALETTE_GREY : +#ifdef ZM_V4L2 case V4L2_PIX_FMT_GREY : +#endif // ZM_V4L2 { //int size = width*height; //for ( int i = 0; i < size; i++ )