* @brief Injects per-source payloads for multi-source playback. */
| 553 | * @brief Injects per-source payloads for multi-source playback. |
| 554 | */ |
| 555 | void IO::ConnectionManager::processMultiSourcePayload(const QByteArray& fullPayload, |
| 556 | const QMap<int, QByteArray>& sourcePayloads) |
| 557 | { |
| 558 | Q_ASSERT(!fullPayload.isEmpty()); |
| 559 | Q_ASSERT(!sourcePayloads.isEmpty()); |
| 560 | |
| 561 | if (fullPayload.isEmpty()) |
| 562 | return; |
| 563 | |
| 564 | static auto& console = Console::Handler::instance(); |
| 565 | static auto& server = API::Server::instance(); |
| 566 | static auto& frameBuilder = DataModel::FrameBuilder::instance(); |
| 567 | |
| 568 | const auto captured = makeCapturedData(fullPayload); |
| 569 | server.hotpathTxData(captured->data); |
| 570 | console.hotpathRxData(captured->data); |
| 571 | |
| 572 | for (auto it = sourcePayloads.constBegin(); it != sourcePayloads.constEnd(); ++it) |
| 573 | frameBuilder.hotpathRxSourceFrame(it.key(), makeCapturedData(it.value(), captured->timestamp)); |
| 574 | |
| 575 | #ifdef ENABLE_GRPC |
| 576 | static auto& grpcServer = API::GRPC::GRPCServer::instance(); |
| 577 | grpcServer.hotpathTxData(captured->data); |
| 578 | #endif |
| 579 | } |
| 580 | |
| 581 | /** |
| 582 | * @brief Writes @p data to device 0. |
no test coverage detected