summaryrefslogtreecommitdiff
path: root/src/protocols/httpserver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocols/httpserver.cpp')
-rw-r--r--src/protocols/httpserver.cpp12
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);