Move V4L2 grabber code to separate library

Former-commit-id: f3003eb0142af3d085ccf93fff1b297ebc2321fc
This commit is contained in:
johan 2014-02-07 21:11:50 +01:00
parent fe6bfb0ad2
commit f0c35071da
14 changed files with 39 additions and 14 deletions

View File

@ -12,7 +12,4 @@ add_subdirectory(leddevice)
add_subdirectory(utils)
add_subdirectory(xbmcvideochecker)
add_subdirectory(effectengine)
if (ENABLE_DISPMANX)
add_subdirectory(dispmanx-grabber)
endif (ENABLE_DISPMANX)
add_subdirectory(grabber)

View File

@ -0,0 +1,8 @@
if (ENABLE_DISPMANX)
add_subdirectory(dispmanx)
endif (ENABLE_DISPMANX)
if (ENABLE_V4L2)
add_subdirectory(v4l2)
endif (ENABLE_V4L2)

View File

@ -4,8 +4,8 @@ find_package(BCM REQUIRED)
include_directories(${BCM_INCLUDE_DIRS})
# Define the current source locations
SET(CURRENT_HEADER_DIR ${CMAKE_SOURCE_DIR}/include/dispmanx-grabber)
SET(CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/libsrc/dispmanx-grabber)
SET(CURRENT_HEADER_DIR ${CMAKE_SOURCE_DIR}/include/grabber)
SET(CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/libsrc/grabber/dispmanx)
# Group the headers that go through the MOC compiler
SET(DispmanxGrabberQT_HEADERS

View File

@ -7,8 +7,8 @@
#include <hyperion/ImageProcessorFactory.h>
#include <hyperion/ImageProcessor.h>
// Local-dispmanx includes
#include <dispmanx-grabber/DispmanxWrapper.h>
// Dispmanx grabber includes
#include <grabber/DispmanxWrapper.h>
#include "DispmanxFrameGrabber.h"

View File

@ -0,0 +1,19 @@
# Define the current source locations
SET(CURRENT_HEADER_DIR ${CMAKE_SOURCE_DIR}/include/grabber)
SET(CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/libsrc/grabber/v4l2)
SET(V4L2_HEADERS
${CURRENT_HEADER_DIR}/V4L2Grabber.h
)
SET(V4L2_SOURCES
${CURRENT_SOURCE_DIR}/V4L2Grabber.cpp
)
add_library(v4l2-grabber
${V4L2_HEADERS}
${V4L2_SOURCES}
)
target_link_libraries(v4l2-grabber
hyperion-utils)

View File

@ -14,7 +14,7 @@
#include <sys/ioctl.h>
#include <linux/videodev2.h>
#include "V4L2Grabber.h"
#include "grabber/V4L2Grabber.h"
#define CLEAR(x) memset(&(x), 0, sizeof(x))

View File

@ -15,7 +15,6 @@ include_directories(
)
set(Hyperion_V4L2_HEADERS
V4L2Grabber.h
ProtoConnection.h
ImageHandler.h
VideoStandardParameter.h
@ -23,7 +22,6 @@ set(Hyperion_V4L2_HEADERS
set(Hyperion_V4L2_SOURCES
hyperion-v4l2.cpp
V4L2Grabber.cpp
ProtoConnection.cpp
ImageHandler.cpp
)
@ -44,6 +42,7 @@ add_executable(hyperion-v4l2
)
target_link_libraries(hyperion-v4l2
v4l2-grabber
getoptPlusPlus
blackborder
hyperion-utils

View File

@ -12,8 +12,10 @@
// blackborder includes
#include <blackborder/BlackBorderProcessor.h>
// grabber includes
#include "grabber/V4L2Grabber.h"
// hyperion-v4l2 includes
#include "V4L2Grabber.h"
#include "ProtoConnection.h"
#include "VideoStandardParameter.h"
#include "ImageHandler.h"

View File

@ -19,7 +19,7 @@
#ifdef ENABLE_DISPMANX
// Dispmanx grabber includes
#include <dispmanx-grabber/DispmanxWrapper.h>
#include <grabber/DispmanxWrapper.h>
#endif
// XBMC Video checker includes

View File

@ -10,7 +10,7 @@
#include <getoptPlusPlus/getoptpp.h>
// Dispmanx grabber includes
#include <dispmanx-grabber/DispmanxFrameGrabber.h>
#include <grabber/dispmanx/DispmanxFrameGrabber.h>
using namespace vlofgren;