libcamera: pipeline_handler: Store the camera manager pointer

Instead of passing the camera manager pointer to the match() function,
and later to more PipelineHandler functions, store it in the
PipelineHandler::manager_ member variable at construction time and
access it from there.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
Laurent Pinchart
2019-01-23 21:53:17 +02:00
parent eb1ecc92ce
commit e597598abf
6 changed files with 66 additions and 36 deletions

View File

@@ -98,8 +98,8 @@ int CameraManager::start()
* all pipelines it can provide.
*/
while (1) {
PipelineHandler *pipe = factory->create();
if (!pipe->match(this, enumerator_.get())) {
PipelineHandler *pipe = factory->create(this);
if (!pipe->match(enumerator_.get())) {
delete pipe;
break;
}