#pragma once #include #include #include namespace fgc { // One captured frame, owning a copy of its pixel buffer (was image_store_8bit). struct Frame { std::vector data; uint32_t width = 0; uint32_t height = 0; int channels = 0; // 1 (mono) or 3 (RGB) long long timestamp_ms = 0; // Unix epoch ms int cam_id = 0; // index into the configured camera list }; // Abstraction over the camera array. Implemented by VimbaCameraSource (Allied // Vision Vimba X) and MockCameraSource (synthetic frames, no hardware). // // Completed frames are delivered to the callback set via setFrameCallback(); // the consumer (ImagePipeline) encodes and stores them. class ICameraSource { public: using FrameCallback = std::function; virtual ~ICameraSource() = default; virtual void open() = 0; // acquire/open cameras virtual void close() = 0; virtual void start() = 0; // begin acquisition virtual void stop() = 0; // Software-trigger a capture. Returns true on success. virtual bool trigger() = 0; virtual void setFrameCallback(FrameCallback cb) = 0; // Number of cameras this source manages. virtual int cameraCount() const = 0; }; } // namespace fgc