summaryrefslogtreecommitdiff
path: root/src/camera
diff options
context:
space:
mode:
authorNikita Kostovsky <nikita@kostovsky.me>2025-11-13 12:12:07 +0100
committerNikita Kostovsky <nikita@kostovsky.me>2025-11-13 12:12:07 +0100
commit3396ea3e7cf5a0def0ea720bcb863b374fd1cd0e (patch)
tree55082bf91ff2dabd2957f0cf11150a7d39ababc3 /src/camera
parentc33006b2a8468f48cfbace39fe7c534f910fce0d (diff)
implement GET_pixels in http server
Diffstat (limited to 'src/camera')
-rw-r--r--src/camera/veyeimx287m.cpp12
-rw-r--r--src/camera/veyeimx287m.h5
2 files changed, 17 insertions, 0 deletions
diff --git a/src/camera/veyeimx287m.cpp b/src/camera/veyeimx287m.cpp
index 5b745aa..16ab344 100644
--- a/src/camera/veyeimx287m.cpp
+++ b/src/camera/veyeimx287m.cpp
@@ -16,7 +16,9 @@
#include <QElapsedTimer>
+// orpheus
#include "constants.h"
+#include "httpservice.h"
#include "imagealgos.h"
#include "mem_utils.h"
#include "pixels.h"
@@ -308,6 +310,9 @@ bool VeyeIMX287m::init()
if (!initCam())
return false;
+ if (!initHttpServer())
+ return false;
+
return true;
}
@@ -620,6 +625,13 @@ bool VeyeIMX287m::initCam()
return true;
}
+bool VeyeIMX287m::initHttpServer()
+{
+ m_httpServer = std::make_shared<HttpServer>(this);
+
+ return m_httpServer != nullptr;
+}
+
void VeyeIMX287m::dequeueFrameLoop(std::stop_token stopToken)
{
// std::cout << "VeyeIMX287m: start stream" << std::endl;
diff --git a/src/camera/veyeimx287m.h b/src/camera/veyeimx287m.h
index b28ce96..5afc84b 100644
--- a/src/camera/veyeimx287m.h
+++ b/src/camera/veyeimx287m.h
@@ -10,6 +10,8 @@
#include "icamera.h"
+class HttpServer;
+
class VeyeIMX287m : public ICamera
{
constexpr static char videoDevice[] = "/dev/video0";
@@ -51,6 +53,7 @@ private:
bool openCam();
bool selectCam(int camIdx = 0);
bool initCam();
+ bool initHttpServer();
void dequeueFrameLoop(std::stop_token stopToken);
void calcFrameLoop(std::stop_token stopToken);
@@ -82,4 +85,6 @@ private:
std::jthread m_streamThread;
// std::jthread m_calcThreads[1];
std::jthread m_calcThreads[4];
+
+ std::shared_ptr<HttpServer> m_httpServer;
};