diff options
| author | Nikita Kostovsky <nikita@kostovsky.me> | 2026-07-11 18:34:34 +0200 |
|---|---|---|
| committer | Nikita Kostovsky <nikita@kostovsky.me> | 2026-07-11 18:35:26 +0200 |
| commit | 169ddcb09cd26fa0a685f691f63b49e70e1be93b (patch) | |
| tree | 201622d62d02db2719998f5510b70f4fda03e1d8 /src/protocols/httpserver.cpp | |
| parent | 7703c9efc6768d3a25eec4266594ab594cc91d4c (diff) | |
minor fixes and debugging
Diffstat (limited to 'src/protocols/httpserver.cpp')
| -rw-r--r-- | src/protocols/httpserver.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/protocols/httpserver.cpp b/src/protocols/httpserver.cpp index 219bd76..e5772da 100644 --- a/src/protocols/httpserver.cpp +++ b/src/protocols/httpserver.cpp @@ -45,7 +45,7 @@ bool HttpServer::start() // TODO: route automatically const auto pixelsPath = apiPrefix + "/pixels"; const auto profilesPath = apiPrefix + "/profile"; - qDebug().noquote() << Q_FUNC_INFO << ": pixelsPath: " << pixelsPath; + // qDebug().noquote() << Q_FUNC_INFO << ": pixelsPath: " << pixelsPath; // TODO: get rid of lamdas, there should be a better way m_server->route(pixelsPath, [this]() { return GET_pixels(); }); @@ -73,7 +73,7 @@ bool HttpServer::start() const auto result = m_server->listen(m_address, m_port); - qDebug().noquote() << Q_FUNC_INFO << ": listen: " << result; + // qDebug().noquote() << Q_FUNC_INFO << ": listen: " << result; if (!result) { m_server.reset(); @@ -134,6 +134,14 @@ QHttpServerResponse HttpServer::GET_pixels() // FIXME: inc m_camera->processedCounter // FIXME: not thread-safe, don't use this static shared_ptr at all const auto pixels = image->sharedPixels(); + if (false) { + const QString dstFN{"/tmp/raw_pixels"}; + + qDebug() << "save raw pixels to" << dstFN; + if (!pixels->save(dstFN)) { + qCritical() << "cannot save pixels to" << dstFN; + } + } // const auto lines = pixelsToLines(::pixels); const auto lines = pixelsToLines(*pixels); |
