#pragma once #include #include "constants.h" #include "image.h" class InnoMakerOV9281 { public: using buffer_t = std::array; public: InnoMakerOV9281(); ~InnoMakerOV9281(); public: bool init(); bool setExposureTimeMs(int value); bool setGain(int value); bool getImage(Image &image); private: bool setCamParam(unsigned int v4l2controlId, int value); bool openCam(); bool selectCam(int camIdx = 0); bool initCam(); private: int m_cam_fd{-1}; static constexpr uint8_t BUFFER_COUNT{3}; uint8_t *video_buffer_ptr[BUFFER_COUNT]; // buffer_t m_buf; };