From 3396ea3e7cf5a0def0ea720bcb863b374fd1cd0e Mon Sep 17 00:00:00 2001 From: Nikita Kostovsky Date: Thu, 13 Nov 2025 12:12:07 +0100 Subject: implement GET_pixels in http server --- src/camera/veyeimx287m.cpp | 12 ++++++++++++ src/camera/veyeimx287m.h | 5 +++++ 2 files changed, 17 insertions(+) (limited to 'src/camera') 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 +// 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(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 m_httpServer; }; -- cgit v1.2.3-70-g09d2