libcamera: camera: Cache the stream configuration in the stream object
The API towards the application and pipeline handler can be simplified if the camera caches which streams have been selected and their respective configuration. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
committed by
Laurent Pinchart
parent
31bb25ae8d
commit
98edf29e01
@@ -253,7 +253,20 @@ int Camera::configureStreams(std::map<Stream *, StreamConfiguration> &config)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return pipe_->configureStreams(this, config);
|
||||
ret = pipe_->configureStreams(this, config);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
activeStreams_.clear();
|
||||
for (auto const &iter : config) {
|
||||
Stream *stream = iter.first;
|
||||
const StreamConfiguration &cfg = iter.second;
|
||||
|
||||
stream->configuration_ = cfg;
|
||||
activeStreams_.push_back(stream);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Camera::exclusiveAccess()
|
||||
|
||||
Reference in New Issue
Block a user