diff options
author | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2021-03-10 17:44:42 +0000 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2021-03-29 12:18:02 +0100 |
commit | d874b3e34173811fa89b68b4b71f22182bc5fd98 (patch) | |
tree | 585f2e4edc1e7880d5364ff9cde00dc7214428cc /include | |
parent | dcc024760a8d4eb35b7d0ca285f566bb1b3e773b (diff) |
libcamera: request: Provide a sequence number
Provide a sequence number on Requests which are added by the pipeline
handler.
Each pipeline handler keeps a requestSequence per CameraData and
increments everytime a request is queued on that camera.
The sequence number is associated with the Request and can be utilised
for assisting with debugging, and printing the queueing sequence of in
flight requests.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/libcamera/internal/pipeline_handler.h | 4 | ||||
-rw-r--r-- | include/libcamera/request.h | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h index 6aca0b46..9bdda8f3 100644 --- a/include/libcamera/internal/pipeline_handler.h +++ b/include/libcamera/internal/pipeline_handler.h @@ -38,7 +38,7 @@ class CameraData { public: explicit CameraData(PipelineHandler *pipe) - : pipe_(pipe) + : pipe_(pipe), requestSequence_(0) { } virtual ~CameraData() = default; @@ -48,6 +48,8 @@ public: ControlInfoMap controlInfo_; ControlList properties_; + uint32_t requestSequence_; + private: LIBCAMERA_DISABLE_COPY(CameraData) }; diff --git a/include/libcamera/request.h b/include/libcamera/request.h index 6e5aad5f..cd5a2474 100644 --- a/include/libcamera/request.h +++ b/include/libcamera/request.h @@ -50,6 +50,7 @@ public: int addBuffer(const Stream *stream, FrameBuffer *buffer); FrameBuffer *findBuffer(const Stream *stream) const; + uint32_t sequence() const { return sequence_; } uint64_t cookie() const { return cookie_; } Status status() const { return status_; } @@ -71,6 +72,7 @@ private: BufferMap bufferMap_; std::unordered_set<FrameBuffer *> pending_; + uint32_t sequence_; const uint64_t cookie_; Status status_; bool cancelled_; |