mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
remove protobuf (part 2)
This commit is contained in:
@@ -10,9 +10,9 @@ ELSE()
|
||||
ENDIF()
|
||||
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../../libsrc/protoserver
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../../libsrc/flatbufserver
|
||||
${BCM_INCLUDE_DIRS}
|
||||
${PROTOBUF_INCLUDE_DIRS}
|
||||
${FLATBUFFERS_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
set(Hyperion_Dispmanx_HEADERS
|
||||
@@ -34,9 +34,11 @@ target_link_libraries( ${PROJECT_NAME}
|
||||
commandline
|
||||
blackborder
|
||||
hyperion-utils
|
||||
protoclient
|
||||
flatbufserver
|
||||
flatbuffers
|
||||
dispmanx-grabber
|
||||
${Dispmanx_LIBRARIES}
|
||||
ssdp
|
||||
Qt5::Core
|
||||
Qt5::Gui
|
||||
Qt5::Network
|
||||
|
@@ -3,12 +3,15 @@
|
||||
#include <QCoreApplication>
|
||||
#include <QImage>
|
||||
|
||||
#include <protoserver/ProtoConnectionWrapper.h>
|
||||
#include <flatbufserver/FlatBufferConnection.h>
|
||||
#include "DispmanxWrapper.h"
|
||||
|
||||
#include "HyperionConfig.h"
|
||||
#include <commandline/Parser.h>
|
||||
|
||||
// ssdp discover
|
||||
#include <ssdp/SSDPDiscover.h>
|
||||
|
||||
using namespace commandline;
|
||||
|
||||
// save the image as screenshot
|
||||
@@ -31,7 +34,7 @@ int main(int argc, char ** argv)
|
||||
try
|
||||
{
|
||||
// create the option parser and initialize all parameters
|
||||
Parser parser("Dispmanx capture application for Hyperion");
|
||||
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 [default: %1]", "10");
|
||||
IntOption & argWidth = parser.add<IntOption> (0x0, "width", "Width of the captured image [default: %1]", "64", 32, 4096);
|
||||
@@ -90,11 +93,26 @@ int main(int argc, char ** argv)
|
||||
}
|
||||
else
|
||||
{
|
||||
// Create the Proto-connection with hyperiond
|
||||
ProtoConnectionWrapper protoWrapper(argAddress.value(parser), argPriority.getInt(parser), 1000, parser.isSet(argSkipReply));
|
||||
// server searching by ssdp
|
||||
QString address;
|
||||
if(parser.isSet(argAddress))
|
||||
{
|
||||
address = argAddress.value(parser);
|
||||
}
|
||||
else
|
||||
{
|
||||
SSDPDiscover discover;
|
||||
address = discover.getFirstService(STY_FLATBUFSERVER);
|
||||
if(address.isEmpty())
|
||||
{
|
||||
address = argAddress.value(parser);
|
||||
}
|
||||
}
|
||||
// Create the Flabuf-connection
|
||||
FlatBufferConnection flatbuf("Dispmanx Standalone", address, argPriority.getInt(parser), parser.isSet(argSkipReply));
|
||||
|
||||
// Connect the screen capturing to the proto processing
|
||||
QObject::connect(&dispmanxWrapper, SIGNAL(sig_screenshot(const Image<ColorRgb> &)), &protoWrapper, SLOT(receiveImage(Image<ColorRgb>)));
|
||||
// Connect the screen capturing to flatbuf connection processing
|
||||
QObject::connect(&dispmanxWrapper, SIGNAL(sig_screenshot(const Image<ColorRgb> &)), &flatbuf, SLOT(setImage(Image<ColorRgb>)));
|
||||
|
||||
// Start the capturing
|
||||
dispmanxWrapper.start();
|
||||
|
Reference in New Issue
Block a user