mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
implement proto forwarding for hyperiond internal v4l2 grabber
cleanup Former-commit-id: 669f139386633e3435cdc33639134819464afd4d
This commit is contained in:
@@ -94,6 +94,9 @@ void V4L2Wrapper::newFrame(const Image<ColorRgb> &image)
|
||||
// process the new image
|
||||
_processor->process(image, _ledColors);
|
||||
|
||||
// forward to other hyperions
|
||||
emit emitImage(_priority, image, _timeout_ms);
|
||||
|
||||
// send colors to Hyperion
|
||||
emit emitColors(_priority, _ledColors, _timeout_ms);
|
||||
}
|
||||
|
@@ -6,7 +6,6 @@ SET(CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/libsrc/hyperion)
|
||||
# Group the headers that go through the MOC compiler
|
||||
SET(Hyperion_QT_HEADERS
|
||||
${CURRENT_HEADER_DIR}/Hyperion.h
|
||||
${CURRENT_HEADER_DIR}/MessageForwarder.h
|
||||
|
||||
${CURRENT_SOURCE_DIR}/LinearColorSmoothing.h
|
||||
)
|
||||
@@ -19,6 +18,7 @@ SET(Hyperion_HEADERS
|
||||
${CURRENT_HEADER_DIR}/PriorityMuxer.h
|
||||
|
||||
${CURRENT_SOURCE_DIR}/MultiColorTransform.h
|
||||
${CURRENT_HEADER_DIR}/MessageForwarder.h
|
||||
)
|
||||
|
||||
SET(Hyperion_SOURCES
|
||||
|
@@ -35,10 +35,6 @@ void MessageForwarder::addProtoSlave(std::string slave)
|
||||
_protoSlaves << QString(slave.c_str());
|
||||
}
|
||||
|
||||
void MessageForwarder::sendMessage()
|
||||
{
|
||||
}
|
||||
|
||||
QStringList MessageForwarder::getProtoSlaves()
|
||||
{
|
||||
return _protoSlaves;
|
||||
|
@@ -70,6 +70,12 @@ void ProtoServer::newMessage(const proto::HyperionRequest * message)
|
||||
_proxy_connections.at(i)->sendMessage(*message);
|
||||
}
|
||||
|
||||
void ProtoServer::sendImageToProtoSlaves(int priority, const Image<ColorRgb> & image, int duration_ms)
|
||||
{
|
||||
for (int i = 0; i < _proxy_connections.size(); ++i)
|
||||
_proxy_connections.at(i)->setImage(image, priority, duration_ms);
|
||||
}
|
||||
|
||||
void ProtoServer::closedConnection(ProtoClientConnection *connection)
|
||||
{
|
||||
std::cout << "Proto connection closed" << std::endl;
|
||||
|
Reference in New Issue
Block a user