mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Added flag to disable dispmanx from build
Former-commit-id: 6630f588a739a08601c0db79abd2cdf0b1c1839c
This commit is contained in:
parent
adea0895c4
commit
d60cca9e20
@ -1,9 +1,20 @@
|
||||
project(hyperion)
|
||||
|
||||
# define the minimum cmake version (as required by cmake)
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
#set(CMAKE_TOOLCHAIN_FILE /opt/raspberrypi/Toolchain-RaspberryPi.cmake)
|
||||
|
||||
# set the build options
|
||||
option (ENABLE_DISPMANX "Enable the RPi dispmanx grabber" ON)
|
||||
message(STATUS "ENABLE_DISPMANX = " ${ENABLE_DISPMANX})
|
||||
|
||||
# Createt the configuration file
|
||||
# configure a header file to pass some of the CMake settings
|
||||
# to the source code
|
||||
configure_file ("${PROJECT_SOURCE_DIR}/HyperionConfig.h.in" "${PROJECT_BINARY_DIR}/HyperionConfig.h")
|
||||
include_directories("${PROJECT_BINARY_DIR}")
|
||||
|
||||
# Define the main-project name
|
||||
project(Hyperion)
|
||||
|
||||
@ -37,8 +48,9 @@ find_package(Qt4 COMPONENTS QtCore QtGui QtNetwork REQUIRED QUIET)
|
||||
# add protocol buffers
|
||||
find_package(Protobuf REQUIRED)
|
||||
|
||||
#add libusb
|
||||
#add libusb and pthreads
|
||||
find_package(libusb-1.0 REQUIRED)
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
#SET(QT_DONT_USE_QTGUI TRUE)
|
||||
#SET(QT_USE_QTCONSOLE TRUE)
|
||||
|
4
HyperionConfig.h.in
Normal file
4
HyperionConfig.h.in
Normal file
@ -0,0 +1,4 @@
|
||||
// Generated config file
|
||||
|
||||
// Define to enable the dispmanx grabber
|
||||
#cmakedefine ENABLE_DISPMANX
|
Binary file not shown.
@ -1 +1 @@
|
||||
d59ae219a9dad5cd6138c23122df5e3313e473cb
|
||||
5031f4b1d3a2682b6df94ba6671bcc97f9b5a4d1
|
@ -4,10 +4,13 @@ SET(CURRENT_HEADER_DIR ${CMAKE_SOURCE_DIR}/include)
|
||||
SET(CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/libsrc)
|
||||
|
||||
add_subdirectory(bootsequence)
|
||||
add_subdirectory(dispmanx-grabber)
|
||||
add_subdirectory(hyperion)
|
||||
add_subdirectory(jsonserver)
|
||||
add_subdirectory(protoserver)
|
||||
add_subdirectory(boblightserver)
|
||||
add_subdirectory(utils)
|
||||
add_subdirectory(xbmcvideochecker)
|
||||
|
||||
if (ENABLE_DISPMANX)
|
||||
add_subdirectory(dispmanx-grabber)
|
||||
endif (ENABLE_DISPMANX)
|
||||
|
@ -24,7 +24,7 @@ BootSequence * BootSequenceFactory::createBootSequence(Hyperion * hyperion, cons
|
||||
const unsigned duration_ms = jsonConfig["duration_ms"].asUInt();
|
||||
return new RainbowBootSequence(hyperion, duration_ms);
|
||||
}
|
||||
else if (type == "knightrider" || type == "knight rider")
|
||||
else if (type == "knightrider" || type == "knight rider" || "knight_rider")
|
||||
{
|
||||
std::cout << "SELECTED BOOT SEQUENCE: " << "KITT" << std::endl;
|
||||
const unsigned duration_ms = jsonConfig["duration_ms"].asUInt();
|
||||
@ -34,5 +34,3 @@ BootSequence * BootSequenceFactory::createBootSequence(Hyperion * hyperion, cons
|
||||
std::cerr << "Unknown boot-sequence selected; boot-sequence disabled." << std::endl;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
@ -79,4 +79,5 @@ target_link_libraries(hyperion
|
||||
hyperion-utils
|
||||
serialport
|
||||
${QT_LIBRARIES}
|
||||
${LIBUSB_1_LIBRARIES})
|
||||
${LIBUSB_1_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT})
|
||||
|
@ -168,7 +168,7 @@ void JsonClientConnection::handleServerInfoCommand(const Json::Value &message)
|
||||
item["priority"] = priority;
|
||||
if (priorityInfo.timeoutTime_ms != -1)
|
||||
{
|
||||
item["duration_ms"] = priorityInfo.timeoutTime_ms - now;
|
||||
item["duration_ms"] = Json::Value::UInt(priorityInfo.timeoutTime_ms - now);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,8 +5,11 @@ add_executable(hyperiond
|
||||
target_link_libraries(hyperiond
|
||||
bootsequence
|
||||
hyperion
|
||||
dispmanx-grabber
|
||||
xbmcvideochecker
|
||||
jsonserver
|
||||
protoserver
|
||||
boblightserver)
|
||||
|
||||
if (ENABLE_DISPMANX)
|
||||
target_link_libraries(hyperiond dispmanx-grabber)
|
||||
endif (ENABLE_DISPMANX)
|
||||
|
@ -6,6 +6,9 @@
|
||||
#include <QCoreApplication>
|
||||
#include <QResource>
|
||||
|
||||
// config includes
|
||||
#include "HyperionConfig.h"
|
||||
|
||||
// Json-Schema includes
|
||||
#include <utils/jsonschema/JsonFactory.h>
|
||||
|
||||
@ -15,8 +18,10 @@
|
||||
// Bootsequence includes
|
||||
#include <bootsequence/BootSequenceFactory.h>
|
||||
|
||||
#ifdef ENABLE_DISPMANX
|
||||
// Dispmanx grabber includes
|
||||
#include <dispmanx-grabber/DispmanxWrapper.h>
|
||||
#endif
|
||||
|
||||
// XBMC Video checker includes
|
||||
#include <xbmcvideochecker/XBMCVideoChecker.h>
|
||||
@ -118,6 +123,7 @@ int main(int argc, char** argv)
|
||||
std::cout << "XBMC video checker created and started" << std::endl;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_DISPMANX
|
||||
// Construct and start the frame-grabber if the configuration is present
|
||||
DispmanxWrapper * dispmanx = nullptr;
|
||||
if (config.isMember("framegrabber"))
|
||||
@ -137,6 +143,12 @@ int main(int argc, char** argv)
|
||||
dispmanx->start();
|
||||
std::cout << "Frame grabber created and started" << std::endl;
|
||||
}
|
||||
#else
|
||||
if (config.isMember("framegrabber"))
|
||||
{
|
||||
std::cerr << "The dispmanx framegrabber can not be instantiated, becuse it has been left out from the build" << std::endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Create Json server if configuration is present
|
||||
JsonServer * jsonServer = nullptr;
|
||||
@ -171,7 +183,9 @@ int main(int argc, char** argv)
|
||||
|
||||
// Delete all component
|
||||
delete bootSequence;
|
||||
#ifdef ENABLE_DISPMANX
|
||||
delete dispmanx;
|
||||
#endif
|
||||
delete xbmcVideoChecker;
|
||||
delete jsonServer;
|
||||
delete protoServer;
|
||||
|
@ -27,7 +27,9 @@ add_executable(test_image2ledsmap
|
||||
target_link_libraries(test_image2ledsmap
|
||||
hyperion)
|
||||
|
||||
add_subdirectory(dispmanx2png)
|
||||
if (ENABLE_DISPMANX)
|
||||
add_subdirectory(dispmanx2png)
|
||||
endif (ENABLE_DISPMANX)
|
||||
|
||||
add_executable(test_blackborderdetector
|
||||
TestBlackBorderDetector.cpp)
|
||||
|
Loading…
Reference in New Issue
Block a user