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>
This commit is contained in:
@@ -279,7 +279,7 @@ public:
|
||||
std::shared_ptr<PipelineHandler> pipe_;
|
||||
std::string id_;
|
||||
std::set<Stream *> streams_;
|
||||
std::set<Stream *> activeStreams_;
|
||||
std::set<const Stream *> activeStreams_;
|
||||
|
||||
private:
|
||||
bool disconnected_;
|
||||
@@ -889,7 +889,7 @@ int Camera::queueRequest(Request *request)
|
||||
}
|
||||
|
||||
for (auto const &it : request->buffers()) {
|
||||
Stream *stream = it.first;
|
||||
const Stream *stream = it.first;
|
||||
|
||||
if (p_->activeStreams_.find(stream) == p_->activeStreams_.end()) {
|
||||
LOG(Camera, Error) << "Invalid request";
|
||||
|
||||
Reference in New Issue
Block a user