From patchwork Tue Jan 15 15:18:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 236 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 49D3A60C87 for ; Tue, 15 Jan 2019 16:18:54 +0100 (CET) Received: from pendragon.bb.dnainternet.fi (dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id D06C24F8 for ; Tue, 15 Jan 2019 16:18:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1547565534; bh=rPg7O5lAfsSHYGN90ySpf8AE5T1imF3N1ZckaPWjuqg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ALSDMgx+WDKKdIgGFAM3cjPV/UYYJSOY9wCSqqSoWuxiNSIs6ZE9qy0pAei4Zj3c4 78qJyjMKgBJ/7J1Rc7btvnCemUtd8jcsesHBZ7jv+uPHP3otkcQ6m3/D1jghAsdFJM hYwctNaCKsUeux2Gy3pJi/FdtCMB3di6xdOaewu4= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Tue, 15 Jan 2019 17:18:45 +0200 Message-Id: <20190115151849.1547-5-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190115151849.1547-1-laurent.pinchart@ideasonboard.com> References: <20190115151849.1547-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 4/8] libcamera: pipeline_handler: Rename handlers() method to factories() X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 15:18:55 -0000 The PipelineHandlerFactory::handlers() static method returns a list of factories, not a list of handlers. Rename it accordingly. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund --- src/libcamera/camera_manager.cpp | 4 ++-- src/libcamera/include/pipeline_handler.h | 2 +- src/libcamera/pipeline_handler.cpp | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp index 4313994e97c8..a17bf3d13a04 100644 --- a/src/libcamera/camera_manager.cpp +++ b/src/libcamera/camera_manager.cpp @@ -86,9 +86,9 @@ int CameraManager::start() * file and only fallback on all handlers if there is no * configuration file. */ - std::vector &handlers = PipelineHandlerFactory::handlers(); + std::vector &factories = PipelineHandlerFactory::factories(); - for (PipelineHandlerFactory *factory : handlers) { + for (PipelineHandlerFactory *factory : factories) { /* * Try each pipeline handler until it exhaust * all pipelines it can provide. diff --git a/src/libcamera/include/pipeline_handler.h b/src/libcamera/include/pipeline_handler.h index 764dde9ccc65..e976aaa13546 100644 --- a/src/libcamera/include/pipeline_handler.h +++ b/src/libcamera/include/pipeline_handler.h @@ -39,7 +39,7 @@ public: const std::string &name() const { return name_; } static void registerType(PipelineHandlerFactory *factory); - static std::vector &handlers(); + static std::vector &factories(); private: std::string name_; diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp index 08e3291e741a..4dfbc814a813 100644 --- a/src/libcamera/pipeline_handler.cpp +++ b/src/libcamera/pipeline_handler.cpp @@ -92,7 +92,7 @@ namespace libcamera { * \param[in] name Name of the pipeline handler class * * Creating an instance of the factory registers is with the global list of - * factories, accessible through the handlers() function. + * factories, accessible through the factories() function. * * The factory \a name is used for debug purpose and shall be unique. */ @@ -127,7 +127,7 @@ PipelineHandlerFactory::PipelineHandlerFactory(const char *name) */ void PipelineHandlerFactory::registerType(PipelineHandlerFactory *factory) { - std::vector &factories = handlers(); + std::vector &factories = PipelineHandlerFactory::factories(); for (PipelineHandlerFactory *f : factories) ASSERT(factory->name() != f->name()); @@ -145,7 +145,7 @@ void PipelineHandlerFactory::registerType(PipelineHandlerFactory *factory) * * \return the list of pipeline handler factories */ -std::vector &PipelineHandlerFactory::handlers() +std::vector &PipelineHandlerFactory::factories() { static std::vector factories; return factories;