parent
f5a29bb679
commit
02ef99584c
|
@ -608,12 +608,6 @@ if((NOT HAVE_LIBCRYPTO) AND (NOT HAVE_LIBGNUTLS))
|
|||
"ZoneMinder requires crypto or gnutls but none were found on your system")
|
||||
endif((NOT HAVE_LIBCRYPTO) AND (NOT HAVE_LIBGNUTLS))
|
||||
|
||||
include(FindV4L2)
|
||||
if(V4L2_FOUND)
|
||||
list(APPEND ZM_BIN_LIBS "${V4L2_LIBRARY}")
|
||||
set(optlibsfound "${optlibsfound} v4l2")
|
||||
endif(V4L2_FOUND)
|
||||
|
||||
# Check for V4L header files and enable ZM_HAS_V4L, ZM_HAS_V4L1, ZM_HAS_V4L2 accordingly
|
||||
# Setting to zeros first is required because ZM uses #define for these
|
||||
set(ZM_HAS_V4L 0)
|
||||
|
|
|
@ -32,8 +32,6 @@
|
|||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include <libv4l2.h>
|
||||
|
||||
/* Workaround for GNU/kFreeBSD */
|
||||
#if defined(__FreeBSD_kernel__)
|
||||
#ifndef ENODATA
|
||||
|
@ -48,8 +46,8 @@ static int vidioctl( int fd, int request, void *arg )
|
|||
int result = -1;
|
||||
do
|
||||
{
|
||||
result = v4l2_ioctl( fd, request, arg );
|
||||
} while ( result == -1 && ( ( errno == EINTR ) || (errno == EAGAIN)) );
|
||||
result = ioctl( fd, request, arg );
|
||||
} while ( result == -1 && errno == EINTR );
|
||||
return( result );
|
||||
}
|
||||
|
||||
|
@ -826,7 +824,7 @@ void LocalCamera::Initialise()
|
|||
v4l2_data.reqbufs.count = 1;
|
||||
}
|
||||
} else {
|
||||
v4l2_data.reqbufs.count = 2;
|
||||
v4l2_data.reqbufs.count = 8;
|
||||
}
|
||||
Debug( 3, "Request buffers count is %d", v4l2_data.reqbufs.count );
|
||||
|
||||
|
@ -870,9 +868,9 @@ void LocalCamera::Initialise()
|
|||
Fatal( "Unable to query video buffer: %s", strerror(errno) );
|
||||
|
||||
v4l2_data.buffers[i].length = vid_buf.length;
|
||||
v4l2_data.buffers[i].start = v4l2_mmap( NULL, vid_buf.length, PROT_READ|PROT_WRITE, MAP_SHARED, vid_fd, vid_buf.m.offset );
|
||||
v4l2_data.buffers[i].start = mmap( NULL, vid_buf.length, PROT_READ|PROT_WRITE, MAP_SHARED, vid_fd, vid_buf.m.offset );
|
||||
|
||||
if ( MAP_FAILED == v4l2_data.buffers[i].start )
|
||||
if ( v4l2_data.buffers[i].start == MAP_FAILED )
|
||||
Fatal( "Can't map video buffer %d (%d bytes) to memory: %s(%d)", i, vid_buf.length, strerror(errno), errno );
|
||||
|
||||
#if HAVE_LIBSWSCALE
|
||||
|
|
Loading…
Reference in New Issue