21 template<
typename FrameContext>
26 template<
typename T>
friend class FCQueue;
30 template<
typename FrameContext>
47 FrameContext &frameContext = contexts_[frame % contexts_.size()];
60 if (frame != 0 && frame <= frameContext.frame)
62 <<
"Frame " << frame <<
" already initialised";
64 init(frameContext, frame);
71 FrameContext &frameContext = contexts_[frame % contexts_.size()];
81 if (frame < frameContext.frame)
82 LOG(
FCQueue, Fatal) <<
"Frame context for " << frame
83 <<
" has been overwritten by " 84 << frameContext.frame;
86 if (frame == frameContext.frame)
99 <<
"Obtained an uninitialised FrameContext for " << frame;
101 init(frameContext, frame);
107 void init(
FrameContext &frameContext,
const uint32_t frame)
110 frameContext.frame = frame;
113 std::vector<FrameContext> contexts_;
#define LOG(category, severity)
Log a message.
Top-level libcamera namespace.
Definition: backtrace.h:17
void clear()
Clear the contexts queue.
Definition: fc_queue.h:39
A support class for managing FrameContext instances in IPA modules.
Definition: fc_queue.h:22
FCQueue(unsigned int size)
Construct a frame contexts queue of a specified size.
Definition: fc_queue.h:34
FrameContext & alloc(const uint32_t frame)
Allocate and return a FrameContext for the frame.
Definition: fc_queue.h:45
#define LOG_DECLARE_CATEGORY(name)
Declare a category of log messages.
Context for a frame.
Definition: fc_queue.h:24