summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-08-11 01:07:37 +0200
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-08-14 13:19:15 +0200
commit27869c5f649c4b524e142014be073b40230ecbc4 (patch)
treece805806bd6c9166e6892887b292109616073b06 /include
parentdac8e9552ccdff137e717270468e584c2a9895b9 (diff)
libcamera: request: Make Stream pointer const
The Stream pointer just acts as a key in the Request object. There is no good use-case to modify a stream from a pointer retrieved from the Request, make it const. This allows pipeline handlers to better express that the Stream pointer is retrieved in a Request should just be treated as a key. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/request.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/libcamera/request.h b/include/libcamera/request.h
index e74f56a7..5976ac50 100644
--- a/include/libcamera/request.h
+++ b/include/libcamera/request.h
@@ -31,7 +31,7 @@ public:
RequestCancelled,
};
- using BufferMap = std::map<Stream *, FrameBuffer *>;
+ using BufferMap = std::map<const Stream *, FrameBuffer *>;
Request(Camera *camera, uint64_t cookie = 0);
Request(const Request &) = delete;
@@ -41,8 +41,8 @@ public:
ControlList &controls() { return *controls_; }
ControlList &metadata() { return *metadata_; }
const BufferMap &buffers() const { return bufferMap_; }
- int addBuffer(Stream *stream, FrameBuffer *buffer);
- FrameBuffer *findBuffer(Stream *stream) const;
+ int addBuffer(const Stream *stream, FrameBuffer *buffer);
+ FrameBuffer *findBuffer(const Stream *stream) const;
uint64_t cookie() const { return cookie_; }
Status status() const { return status_; }