Hyperion "Light", Build improvements and minor fixes (#1400)

* Allow build, if no grabbers are enabled

* Align available functions to right Qt version

* Update to next development version

* Align available functions to right Qt version

* fix workflows (apt/nightly)

* Disable QNetworkConfigurationManager deprecation warnings

* Initial go on Smart Pointers

* Add Deallocation

* Correct QT_WARNING_DISABLE_DEPRECATED (available since 5.9)

* Cluster Build Variables

* Hyperion Light

* Address build warnings

* Hyperion Light - UI

* Update Protobuf to latest master

* Removed compiler warnings

* Added restart ability to systray

* Correct Protobuf

* Ignore 'no-return' warning on protobuf build

* hyperion-remote: Fix auto discovery of hyperion server

* Fix Qt version override

* Update changelog

* Remove Grabber Components, if no Grabber exists

* Standalone Grabber - Fix fps default

* Remote Control - Have Source Selction accrosswhole screen

* Enable Blackborder detection only, if relevant input sources available

* Enable Blackborder detection only, if relevant input sources available

* Remote UI - rearrange containers

* - QT5/6 path for arm64 added
- Remove ZLib Dependency
- Fix macOS bundle info details
- Cleanup

Co-authored-by: Paulchen Panther <16664240+Paulchen-Panther@users.noreply.github.com>
Co-authored-by: Paulchen Panther <Paulchen-Panter@protonmail.com>
This commit is contained in:
LordGrey
2022-01-07 14:47:51 +01:00
committed by GitHub
parent c38ec60208
commit 2f573a117f
83 changed files with 1785 additions and 1284 deletions

View File

@@ -2,34 +2,34 @@ add_subdirectory(hyperiond)
add_subdirectory(hyperion-remote)
# The following binaries are just compiled if requested
if (ENABLE_AMLOGIC)
if (ENABLE_AMLOGIC AND ENABLE_FLATBUF_CONNECT)
add_subdirectory(hyperion-aml)
endif()
if(ENABLE_V4L2)
if(ENABLE_V4L2 AND ENABLE_FLATBUF_CONNECT)
add_subdirectory(hyperion-v4l2)
endif()
if(ENABLE_X11)
if(ENABLE_X11 AND ENABLE_FLATBUF_CONNECT)
add_subdirectory(hyperion-x11)
endif()
if(ENABLE_XCB)
if(ENABLE_XCB AND ENABLE_FLATBUF_CONNECT)
add_subdirectory(hyperion-xcb)
endif()
if(ENABLE_DISPMANX)
if(ENABLE_DISPMANX AND ENABLE_FLATBUF_CONNECT)
add_subdirectory(hyperion-dispmanx)
endif()
if(ENABLE_FB)
if(ENABLE_FB AND ENABLE_FLATBUF_CONNECT)
add_subdirectory(hyperion-framebuffer)
endif()
if(ENABLE_QT)
if(ENABLE_QT AND ENABLE_FLATBUF_CONNECT)
add_subdirectory(hyperion-qt)
endif()
if(ENABLE_OSX)
if(ENABLE_OSX AND ENABLE_FLATBUF_CONNECT)
add_subdirectory(hyperion-osx)
endif()

View File

@@ -25,7 +25,7 @@ add_executable(${PROJECT_NAME}
target_link_libraries(${PROJECT_NAME}
commandline
hyperion-utils
flatbufserver
flatbufconnect
flatbuffers
amlogic-grabber
framebuffer-grabber

View File

@@ -44,7 +44,7 @@ int main(int argc, char ** argv)
// create the option parser and initialize all parser
Parser parser("AmLogic capture application for Hyperion. Will automatically search a Hyperion server if -a option isn't used. Please note that if you have more than one server running it's more or less random which one will be used.");
IntOption & argFps = parser.add<IntOption> ('f', "framerate", "Capture frame rate. %1", QString("Range %1-%2fps, default: [%3]").arg(GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ).arg(GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ).arg(GrabberWrapper::DEFAULT_RATE_HZ), GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ, GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ);
IntOption & argFps = parser.add<IntOption> ('f', "framerate", QString("Capture frame rate. Range %1-%2fps").arg(GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ).arg(GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ), QString::number(GrabberWrapper::DEFAULT_RATE_HZ), GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ, GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ);
IntOption & argSizeDecimation = parser.add<IntOption> ('s', "size-decimator", "Decimation factor for the output image size [default=%1]", QString::number(GrabberWrapper::DEFAULT_PIXELDECIMATION), 1);
IntOption & argCropLeft = parser.add<IntOption> (0x0, "crop-left", "Number of pixels to crop from the left of the picture before decimation");

View File

@@ -33,7 +33,7 @@ add_executable( ${PROJECT_NAME}
target_link_libraries( ${PROJECT_NAME}
commandline
hyperion-utils
flatbufserver
flatbufconnect
flatbuffers
dispmanx-grabber
${Dispmanx_LIBRARIES}

View File

@@ -45,7 +45,7 @@ int main(int argc, char ** argv)
// create the option parser and initialize all parameters
Parser parser("Dispmanx capture application for Hyperion. Will automatically search a Hyperion server if -a option isn't used. Please note that if you have more than one server running it's more or less random which one will be used.");
IntOption & argFps = parser.add<IntOption> ('f', "framerate", "Capture frame rate. %1", QString("Range %1-%2fps, default: [%3]").arg(GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ).arg(GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ).arg(GrabberWrapper::DEFAULT_RATE_HZ), GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ, GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ);
IntOption & argFps = parser.add<IntOption> ('f', "framerate", QString("Capture frame rate. Range %1-%2fps").arg(GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ).arg(GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ), QString::number(GrabberWrapper::DEFAULT_RATE_HZ), GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ, GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ);
IntOption & argSizeDecimation = parser.add<IntOption> ('s', "size-decimator", "Decimation factor for the output image size [default=%1]", QString::number(GrabberWrapper::DEFAULT_PIXELDECIMATION), 1);
IntOption & argCropLeft = parser.add<IntOption> (0x0, "crop-left", "Number of pixels to crop from the left of the picture before decimation");

View File

@@ -25,7 +25,7 @@ add_executable( ${PROJECT_NAME}
target_link_libraries( ${PROJECT_NAME}
commandline
hyperion-utils
flatbufserver
flatbufconnect
flatbuffers
framebuffer-grabber
ssdp

View File

@@ -46,7 +46,7 @@ int main(int argc, char ** argv)
Option & argDevice = parser.add<Option> ('d', "device", "Set the framebuffer device [default: %1]", "/dev/fb0");
IntOption & argFps = parser.add<IntOption> ('f', "framerate", "Capture frame rate. %1", QString("Range %1-%2fps, default: [%3]").arg(GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ).arg(GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ).arg(GrabberWrapper::DEFAULT_RATE_HZ), GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ, GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ);
IntOption & argFps = parser.add<IntOption> ('f', "framerate", QString("Capture frame rate. Range %1-%2fps").arg(GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ).arg(GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ), QString::number(GrabberWrapper::DEFAULT_RATE_HZ), GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ, GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ);
IntOption & argSizeDecimation = parser.add<IntOption> ('s', "size-decimator", "Decimation factor for the output image size [default=%1]", QString::number(GrabberWrapper::DEFAULT_PIXELDECIMATION), 1);
IntOption & argCropLeft = parser.add<IntOption> (0x0, "crop-left", "Number of pixels to crop from the left of the picture before decimation");

View File

@@ -25,7 +25,7 @@ add_executable( ${PROJECT_NAME}
target_link_libraries( ${PROJECT_NAME}
commandline
hyperion-utils
flatbufserver
flatbufconnect
flatbuffers
osx-grabber
ssdp

View File

@@ -40,7 +40,7 @@ int main(int argc, char ** argv)
IntOption & argDisplay = parser.add<IntOption> ('d', "display", "Set the display to capture [default: %1]", "0");
IntOption & argFps = parser.add<IntOption> ('f', "framerate", "Capture frame rate. %1", QString("Range %1-%2fps, default: [%3]").arg(GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ).arg(GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ).arg(GrabberWrapper::DEFAULT_RATE_HZ), GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ, GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ);
IntOption & argFps = parser.add<IntOption> ('f', "framerate", QString("Capture frame rate. Range %1-%2fps").arg(GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ).arg(GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ), QString::number(GrabberWrapper::DEFAULT_RATE_HZ), GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ, GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ);
IntOption & argSizeDecimation = parser.add<IntOption> ('s', "size-decimator", "Decimation factor for the output image size [default=%1]", QString::number(GrabberWrapper::DEFAULT_PIXELDECIMATION), 1);
IntOption & argCropLeft = parser.add<IntOption> (0x0, "crop-left", "Number of pixels to crop from the left of the picture before decimation");

View File

@@ -32,7 +32,7 @@ add_executable(${PROJECT_NAME}
target_link_libraries(${PROJECT_NAME}
commandline
qt-grabber
flatbufserver
flatbufconnect
flatbuffers
ssdp
Qt${QT_VERSION_MAJOR}::Core

View File

@@ -47,7 +47,7 @@ int main(int argc, char ** argv)
IntOption & argDisplay = parser.add<IntOption> ('d', "display", "Set the display to capture [default: %1]", "0");
IntOption & argFps = parser.add<IntOption> ('f', "framerate", "Capture frame rate. %1", QString("Range %1-%2fps, default: [%3]").arg(GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ).arg(GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ).arg(GrabberWrapper::DEFAULT_RATE_HZ), GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ, GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ);
IntOption & argFps = parser.add<IntOption> ('f', "framerate", QString("Capture frame rate. Range %1-%2fps").arg(GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ).arg(GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ), QString::number(GrabberWrapper::DEFAULT_RATE_HZ), GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ, GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ);
IntOption & argSizeDecimation = parser.add<IntOption> ('s', "size-decimator", "Decimation factor for the output image size [default=%1]", QString::number(GrabberWrapper::DEFAULT_PIXELDECIMATION), 1);
IntOption & argCropLeft = parser.add<IntOption> (0x0, "crop-left", "Number of pixels to crop from the left of the picture before decimation");

View File

@@ -93,7 +93,7 @@ int main(int argc, char * argv[])
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// art variable definition append art to Parser short-, long option description, optional default value //
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Option & argAddress = parser.add<Option> ('a', "address" , "The hostname or IP-address (IPv4 or IPv6) of the hyperion server.\nDefault port: 19444.\nSample addresses:\nHost : hyperion.fritz.box\nIPv4 : 127.0.0.1:19444\nIPv6 : [2001:1:2:3:4:5:6:7]");
Option & argAddress = parser.add<Option> ('a', "address" , "The hostname or IP-address (IPv4 or IPv6) of the hyperion server.\nDefault port: 19444.\nSample addresses:\nHost : hyperion.fritz.box\nIPv4 : 127.0.0.1:19444\nIPv6 : [2001:1:2:3:4:5:6:7]", "127.0.0.1");
Option & argToken = parser.add<Option> ('t', "token" , "If authorization tokens are required, this token is used");
Option & argInstance = parser.add<Option> ('I', "instance" , "Select a specific target instance by name for your command. By default it uses always the first instance");
IntOption & argPriority = parser.add<IntOption> ('p', "priority" , "Used to the provided priority channel (suggested 2-99) [default: %1]", "50");
@@ -200,7 +200,7 @@ int main(int argc, char * argv[])
// server searching by ssdp
QString address = argAddress.value(parser);
if(argAddress.value(parser) == "127.0.0.1:19444")
if(address == "127.0.0.1" || address == "127.0.0.1:19444")
{
SSDPDiscover discover;
address = discover.getFirstService(searchType::STY_JSONSERVER);

View File

@@ -26,7 +26,7 @@ target_link_libraries(${PROJECT_NAME}
v4l2-grabber
commandline
hyperion-utils
flatbufserver
flatbufconnect
flatbuffers
ssdp
Qt${QT_VERSION_MAJOR}::Core

View File

@@ -56,11 +56,12 @@ int main(int argc, char** argv)
Option & argDevice = parser.add<Option> ('d', "device", "The device to use, can be /dev/video0 [default: %1 (auto detected)]", "auto");
IntOption & argInput = parser.add<IntOption> ('i', "input", "The device input [default: %1]", "0");
SwitchOption<VideoStandard> & argVideoStandard= parser.add<SwitchOption<VideoStandard>>('v', "video-standard", "The used video standard. Valid values are PAL, NTSC, SECAM or no-change. [default: %1]", "no-change");
SwitchOption<PixelFormat> & argPixelFormat = parser.add<SwitchOption<PixelFormat>> (0x0, "pixel-format", "The use pixel format. Valid values are YUYV, UYVY, RGB32, MJPEG or no-change. [default: %1]", "no-change");
IntOption & argFps = parser.add<IntOption> ('f', "framerate", "Capture frame rate. %1", QString("Range %1-%2fps, default: [%3]").arg(GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ).arg(GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ).arg(GrabberWrapper::DEFAULT_RATE_HZ), GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ, GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ);
SwitchOption<FlipMode> & argFlipMode = parser.add<SwitchOption<FlipMode>>(0x0, "flip-mode", "The used image flip mode. Valid values are HORIZONTAL, VERTICAL, BOTH or no-change. [default: %1]", "no-change");
IntOption & argWidth = parser.add<IntOption> ('w', "width", "Width of the captured image [default: %1]", "640", 640);
IntOption & argHeight = parser.add<IntOption> ('h', "height", "Height of the captured image [default: %1]", "480", 480);
SwitchOption<PixelFormat> & argPixelFormat = parser.add<SwitchOption<PixelFormat>> (0x0, "pixel-format", "The use pixel format. Valid values are YUYV, UYVY, RGB32, MJPEG or no-change. [default: %1]", "no-change");
IntOption & argFps = parser.add<IntOption> ('f', "framerate", QString("Capture frame rate. Range %1-%2fps").arg(GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ).arg(GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ), QString::number(GrabberWrapper::DEFAULT_RATE_HZ), GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ, GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ);
SwitchOption<FlipMode> & argFlipMode = parser.add<SwitchOption<FlipMode>>(0x0, "flip-mode", "The used image flip mode. Valid values are HORIZONTAL, VERTICAL, BOTH or no-change. [default: %1]", "no-change");
IntOption & argWidth = parser.add<IntOption> ('w', "width", "Width of the captured image [default: %1]", "640", 640);
IntOption & argHeight = parser.add<IntOption> ('h', "height", "Height of the captured image [default: %1]", "480", 480);
IntOption & argSizeDecimation = parser.add<IntOption> ('s', "size-decimator", "Decimation factor for the output image size [default=%1]", QString::number(GrabberWrapper::DEFAULT_PIXELDECIMATION), 1);
IntOption & argCropWidth = parser.add<IntOption> (0x0, "crop-width", "Number of pixels to crop from the left and right sides of the picture before decimation [default: %1]", "0");
IntOption & argCropHeight = parser.add<IntOption> (0x0, "crop-height", "Number of pixels to crop from the top and the bottom of the picture before decimation [default: %1]", "0");

View File

@@ -32,7 +32,7 @@ add_executable(${PROJECT_NAME}
target_link_libraries(${PROJECT_NAME}
commandline
hyperion-utils
flatbufserver
flatbufconnect
flatbuffers
x11-grabber
ssdp

View File

@@ -41,7 +41,7 @@ int main(int argc, char ** argv)
// create the option parser and initialize all parameters
Parser parser("X11 capture application for Hyperion. Will automatically search a Hyperion server if -a option isn't used. Please note that if you have more than one server running it's more or less random which one will be used.");
IntOption & argFps = parser.add<IntOption> ('f', "framerate", "Capture frame rate. %1", QString("Range %1-%2fps, default: [%3]").arg(GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ).arg(GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ).arg(GrabberWrapper::DEFAULT_RATE_HZ), GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ, GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ);
IntOption & argFps = parser.add<IntOption> ('f', "framerate", QString("Capture frame rate. Range %1-%2fps").arg(GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ).arg(GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ), QString::number(GrabberWrapper::DEFAULT_RATE_HZ), GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ, GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ);
IntOption & argSizeDecimation = parser.add<IntOption> ('s', "size-decimator", "Decimation factor for the output image size [default=%1]", QString::number(GrabberWrapper::DEFAULT_PIXELDECIMATION), 1);
IntOption & argCropWidth = parser.add<IntOption> (0x0, "crop-width", "Number of pixels to crop from the left and right sides of the picture before decimation [default: %1]", "0");

View File

@@ -25,7 +25,7 @@ add_executable(${PROJECT_NAME}
target_link_libraries(${PROJECT_NAME}
commandline
hyperion-utils
flatbufserver
flatbufconnect
flatbuffers
xcb-grabber
ssdp

View File

@@ -41,7 +41,7 @@ int main(int argc, char ** argv)
// create the option parser and initialize all parameters
Parser parser("XCB capture application for Hyperion. Will automatically search a Hyperion server if -a option isn't used. Please note that if you have more than one server running it's more or less random which one will be used.");
IntOption & argFps = parser.add<IntOption> ('f', "framerate", "Capture frame rate. %1", QString("Range %1-%2fps, default: [%3]").arg(GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ).arg(GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ).arg(GrabberWrapper::DEFAULT_RATE_HZ), GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ, GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ);
IntOption & argFps = parser.add<IntOption> ('f', "framerate", QString("Capture frame rate. Range %1-%2fps").arg(GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ).arg(GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ), QString::number(GrabberWrapper::DEFAULT_RATE_HZ), GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ, GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ);
IntOption & argSizeDecimation = parser.add<IntOption> ('s', "size-decimator", "Decimation factor for the output image size [default=%1]", QString::number(GrabberWrapper::DEFAULT_PIXELDECIMATION), 1);
IntOption & argCropWidth = parser.add<IntOption> (0x0, "crop-width", "Number of pixels to crop from the left and right sides of the picture before decimation [default: %1]", "0");

View File

@@ -49,8 +49,6 @@ target_link_libraries(${PROJECT_NAME}
hyperion
effectengine
jsonserver
flatbufserver
protoserver
webserver
ssdp
database
@@ -68,6 +66,15 @@ else()
target_link_libraries( ${PROJECT_NAME} ${PYTHON_LIBRARIES} )
endif()
if(ENABLE_FLATBUF_SERVER)
target_link_libraries(${PROJECT_NAME} flatbufserver)
endif()
if(ENABLE_PROTOBUF_SERVER)
target_link_libraries(${PROJECT_NAME} protoserver)
endif()
if (ENABLE_AVAHI)
target_link_libraries(${PROJECT_NAME} bonjour)
endif (ENABLE_AVAHI)
@@ -137,13 +144,13 @@ endif (ENABLE_CEC)
if (APPLE)
set_target_properties( ${PROJECT_NAME} PROPERTIES
MACOSX_BUNDLE TRUE
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/cmake/osxbundle/Info.plist
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/cmake/osxbundle/Info.plist.in
MACOSX_BUNDLE_BUNDLE_NAME "Hyperion"
MACOSX_BUNDLE_BUNDLE_VERSION ${HYPERION_VERSION}
MACOSX_BUNDLE_COPYRIGHT "Copyright (c) 2014-2021 Hyperion Project"
MACOSX_BUNDLE_GUI_IDENTIFIER "com.hyperion-project.${PROJECT_NAME}"
MACOSX_BUNDLE_ICON_FILE "Hyperion.icns"
MACOSX_BUNDLE_INFO_STRING "${PROJECT_NAME} Version ${HYPERION_VERSION}"
MACOSX_BUNDLE_INFO_STRING "${PROJECT_NAME} ${HYPERION_VERSION}"
MACOSX_BUNDLE_LONG_VERSION_STRING ${HYPERION_VERSION}
MACOSX_BUNDLE_SHORT_VERSION_STRING ${HYPERION_VERSION}
)
@@ -191,7 +198,7 @@ if (WIN32)
message(STATUS "Found windeployqt: ${WINDEPLOYQT_EXECUTABLE} PATH_HINT:${QT_BIN_DIR}")
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${WINDEPLOYQT_EXECUTABLE} ${WINDEPLOYQT_PARAMS_RUNTIME} "$<TARGET_FILE:${PROJECT_NAME}>")
endif()
find_package(OpenSSL REQUIRED)
if (OPENSSL_FOUND)
string(REGEX MATCHALL "[0-9]+" openssl_versions "${OPENSSL_VERSION}")

View File

@@ -29,10 +29,14 @@
#include "hyperiond.h"
// Flatbuffer Server
#ifdef ENABLE_FLATBUF_SERVER
#include <flatbufserver/FlatBufferServer.h>
#endif
// Protobuffer Server
#ifdef ENABLE_PROTOBUF_SERVER
#include <protoserver/ProtoServer.h>
#endif
// ssdp
#include <ssdp/SSDPHandler.h>
@@ -83,7 +87,9 @@ HyperionDaemon::HyperionDaemon(const QString& rootPath, QObject* parent, bool lo
, _qtGrabber(nullptr)
, _dxGrabber(nullptr)
, _ssdp(nullptr)
#ifdef ENABLE_CEC
, _cecHandler(nullptr)
#endif
, _currVideoMode(VideoMode::VIDEO_2D)
{
HyperionDaemon::daemon = this;
@@ -179,6 +185,7 @@ void HyperionDaemon::freeObjects()
delete _jsonServer;
_jsonServer = nullptr;
#if defined(ENABLE_FLATBUF_SERVER)
if (_flatBufferServer != nullptr)
{
auto flatBufferServerThread = _flatBufferServer->thread();
@@ -187,7 +194,9 @@ void HyperionDaemon::freeObjects()
delete flatBufferServerThread;
_flatBufferServer = nullptr;
}
#endif
#if defined(ENABLE_PROTOBUF_SERVER)
if (_protoServer != nullptr)
{
auto protoServerThread = _protoServer->thread();
@@ -196,6 +205,7 @@ void HyperionDaemon::freeObjects()
delete protoServerThread;
_protoServer = nullptr;
}
#endif
//ssdp before webserver
if (_ssdp != nullptr)
@@ -268,6 +278,7 @@ void HyperionDaemon::startNetworkServices()
_jsonServer = new JsonServer(getSetting(settings::JSONSERVER));
connect(this, &HyperionDaemon::settingsChanged, _jsonServer, &JsonServer::handleSettingsUpdate);
#if defined(ENABLE_FLATBUF_SERVER)
// Create FlatBuffer server in thread
_flatBufferServer = new FlatBufferServer(getSetting(settings::FLATBUFSERVER));
QThread* fbThread = new QThread(this);
@@ -277,7 +288,9 @@ void HyperionDaemon::startNetworkServices()
connect(fbThread, &QThread::finished, _flatBufferServer, &FlatBufferServer::deleteLater);
connect(this, &HyperionDaemon::settingsChanged, _flatBufferServer, &FlatBufferServer::handleSettingsUpdate);
fbThread->start();
#endif
#if defined(ENABLE_PROTOBUF_SERVER)
// Create Proto server in thread
_protoServer = new ProtoServer(getSetting(settings::PROTOSERVER));
QThread* pThread = new QThread(this);
@@ -287,6 +300,7 @@ void HyperionDaemon::startNetworkServices()
connect(pThread, &QThread::finished, _protoServer, &ProtoServer::deleteLater);
connect(this, &HyperionDaemon::settingsChanged, _protoServer, &ProtoServer::handleSettingsUpdate);
pThread->start();
#endif
// Create Webserver in thread
_webserver = new WebServer(getSetting(settings::WEBSERVER), false);
@@ -416,8 +430,6 @@ void HyperionDaemon::handleSettingsUpdate(settings::type settingsType, const QJs
if (_prevType != type)
{
Info(_log, "set screen capture device to '%s'", QSTRING_CSTR(type));
// stop all capture interfaces
#ifdef ENABLE_FB
if (_fbGrabber != nullptr)

View File

@@ -58,6 +58,8 @@
typedef QObject DirectXWrapper;
#endif
#include <hyperion/GrabberWrapper.h>
#include <utils/Logger.h>
#include <utils/VideoMode.h>
@@ -180,10 +182,16 @@ private:
QtWrapper* _qtGrabber;
DirectXWrapper* _dxGrabber;
SSDPHandler* _ssdp;
CECHandler* _cecHandler;
FlatBufferServer* _flatBufferServer;
ProtoServer* _protoServer;
#ifdef ENABLE_CEC
CECHandler* _cecHandler;
#endif
#if defined(ENABLE_FLATBUF_SERVER)
FlatBufferServer* _flatBufferServer;
#endif
#if defined(ENABLE_PROTOBUF_SERVER)
ProtoServer* _protoServer;
#endif
int _grabber_width;
int _grabber_height;
int _grabber_pixelDecimation;

View File

@@ -14,6 +14,7 @@
#include <QSettings>
#include <utils/ColorRgb.h>
#include <utils/Process.h>
#include <effectengine/EffectDefinition.h>
#include <effectengine/Effect.h>
#include <webserver/WebServer.h>
@@ -72,19 +73,23 @@ void SysTray::createTrayIcon()
quitAction = new QAction(tr("&Quit"), this);
quitAction->setIcon(QPixmap(":/quit.svg"));
connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
connect(quitAction, &QAction::triggered, qApp, QApplication::quit);
restartAction = new QAction(tr("&Restart"), this);
restartAction->setIcon(QPixmap(":/restart.svg"));
connect(restartAction, &QAction::triggered, this , [=](){ Process::restartHyperion(); });
colorAction = new QAction(tr("&Color"), this);
colorAction->setIcon(QPixmap(":/color.svg"));
connect(colorAction, SIGNAL(triggered()), this, SLOT(showColorDialog()));
connect(colorAction, &QAction::triggered, this, &SysTray::showColorDialog);
settingsAction = new QAction(tr("&Settings"), this);
settingsAction->setIcon(QPixmap(":/settings.svg"));
connect(settingsAction, SIGNAL(triggered()), this, SLOT(settings()));
connect(settingsAction, &QAction::triggered, this, &SysTray::settings);
clearAction = new QAction(tr("&Clear"), this);
clearAction->setIcon(QPixmap(":/clear.svg"));
connect(clearAction, SIGNAL(triggered()), this, SLOT(clearEfxColor()));
connect(clearAction, &QAction::triggered, this, &SysTray::clearEfxColor);
const std::list<EffectDefinition> efxs = _hyperion->getEffects();
_trayIconMenu = new QMenu(this);
@@ -98,7 +103,7 @@ void SysTray::createTrayIcon()
if (efx.file.mid(0, 1) != ":")
{
QAction *efxAction = new QAction(efx.name, this);
connect(efxAction, SIGNAL(triggered()), this, SLOT(setEffect()));
connect(efxAction, &QAction::triggered, this, &SysTray::setEffect);
_trayIconEfxMenu->addAction(efxAction);
}
}
@@ -113,7 +118,7 @@ void SysTray::createTrayIcon()
if (efx.file.mid(0, 1) == ":")
{
QAction *efxAction = new QAction(efx.name, this);
connect(efxAction, SIGNAL(triggered()), this, SLOT(setEffect()));
connect(efxAction, &QAction::triggered, this, &SysTray::setEffect);
_trayIconEfxMenu->addAction(efxAction);
}
}
@@ -121,7 +126,7 @@ void SysTray::createTrayIcon()
#ifdef _WIN32
autorunAction = new QAction(tr("&Disable autostart"), this);
autorunAction->setIcon(QPixmap(":/autorun.svg"));
connect(autorunAction, SIGNAL(triggered()), this, SLOT(setAutorunState()));
connect(autorunAction, &QAction::triggered, this, &SysTray::setAutorunState);
_trayIconMenu->addAction(autorunAction);
_trayIconMenu->addSeparator();
@@ -133,6 +138,7 @@ void SysTray::createTrayIcon()
_trayIconMenu->addMenu(_trayIconEfxMenu);
_trayIconMenu->addAction(clearAction);
_trayIconMenu->addSeparator();
_trayIconMenu->addAction(restartAction);
_trayIconMenu->addAction(quitAction);
_trayIcon = new QSystemTrayIcon(this);
@@ -242,12 +248,10 @@ void SysTray::handleInstanceStateChange(InstanceState state, quint8 instance, co
_hyperion = _instanceManager->getHyperionInstance(0);
createTrayIcon();
connect(_trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
this, SLOT(iconActivated(QSystemTrayIcon::ActivationReason)));
connect(_trayIcon, &QSystemTrayIcon::activated, this, &SysTray::iconActivated);
connect(quitAction, &QAction::triggered, _trayIcon, &QSystemTrayIcon::hide, Qt::DirectConnection);
connect(&_colorDlg, &QColorDialog::currentColorChanged, this, &SysTray::setColor);
connect(&_colorDlg, SIGNAL(currentColorChanged(const QColor&)), this, SLOT(setColor(const QColor &)));
QIcon icon(":/hyperion-icon-32px.png");
_trayIcon->setIcon(icon);
_trayIcon->show();

View File

@@ -54,6 +54,7 @@ private:
#endif
QAction *quitAction;
QAction *restartAction;
QAction *startAction;
QAction *stopAction;
QAction *colorAction;