Skip to content
This repository was archived by the owner on May 6, 2021. It is now read-only.

Commit f3003eb

Browse files
committed
Move V4L2 grabber code to separate library
1 parent e8bde19 commit f3003eb

File tree

14 files changed

+39
-14
lines changed

14 files changed

+39
-14
lines changed
File renamed without changes.

libsrc/CMakeLists.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,4 @@ add_subdirectory(leddevice)
1212
add_subdirectory(utils)
1313
add_subdirectory(xbmcvideochecker)
1414
add_subdirectory(effectengine)
15-
16-
if (ENABLE_DISPMANX)
17-
add_subdirectory(dispmanx-grabber)
18-
endif (ENABLE_DISPMANX)
15+
add_subdirectory(grabber)

libsrc/grabber/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
if (ENABLE_DISPMANX)
3+
add_subdirectory(dispmanx)
4+
endif (ENABLE_DISPMANX)
5+
6+
if (ENABLE_V4L2)
7+
add_subdirectory(v4l2)
8+
endif (ENABLE_V4L2)

libsrc/dispmanx-grabber/CMakeLists.txt renamed to libsrc/grabber/dispmanx/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ find_package(BCM REQUIRED)
44
include_directories(${BCM_INCLUDE_DIRS})
55

66
# Define the current source locations
7-
SET(CURRENT_HEADER_DIR ${CMAKE_SOURCE_DIR}/include/dispmanx-grabber)
8-
SET(CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/libsrc/dispmanx-grabber)
7+
SET(CURRENT_HEADER_DIR ${CMAKE_SOURCE_DIR}/include/grabber)
8+
SET(CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/libsrc/grabber/dispmanx)
99

1010
# Group the headers that go through the MOC compiler
1111
SET(DispmanxGrabberQT_HEADERS

libsrc/dispmanx-grabber/DispmanxWrapper.cpp renamed to libsrc/grabber/dispmanx/DispmanxWrapper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
#include <hyperion/ImageProcessorFactory.h>
88
#include <hyperion/ImageProcessor.h>
99

10-
// Local-dispmanx includes
11-
#include <dispmanx-grabber/DispmanxWrapper.h>
10+
// Dispmanx grabber includes
11+
#include <grabber/DispmanxWrapper.h>
1212
#include "DispmanxFrameGrabber.h"
1313

1414

libsrc/grabber/v4l2/CMakeLists.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Define the current source locations
2+
SET(CURRENT_HEADER_DIR ${CMAKE_SOURCE_DIR}/include/grabber)
3+
SET(CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/libsrc/grabber/v4l2)
4+
5+
SET(V4L2_HEADERS
6+
${CURRENT_HEADER_DIR}/V4L2Grabber.h
7+
)
8+
9+
SET(V4L2_SOURCES
10+
${CURRENT_SOURCE_DIR}/V4L2Grabber.cpp
11+
)
12+
13+
add_library(v4l2-grabber
14+
${V4L2_HEADERS}
15+
${V4L2_SOURCES}
16+
)
17+
18+
target_link_libraries(v4l2-grabber
19+
hyperion-utils)

src/hyperion-v4l2/V4L2Grabber.cpp renamed to libsrc/grabber/v4l2/V4L2Grabber.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include <sys/ioctl.h>
1515
#include <linux/videodev2.h>
1616

17-
#include "V4L2Grabber.h"
17+
#include "grabber/V4L2Grabber.h"
1818

1919
#define CLEAR(x) memset(&(x), 0, sizeof(x))
2020

0 commit comments

Comments
 (0)