From patchwork Wed Jan 16 13:59:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 253 Return-Path: Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8005A60C9A for ; Wed, 16 Jan 2019 14:59:51 +0100 (CET) X-Originating-IP: 2.224.242.101 Received: from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101]) (Authenticated sender: jacopo@jmondi.org) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 13AF2C0015; Wed, 16 Jan 2019 13:59:50 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Wed, 16 Jan 2019 14:59:48 +0100 Message-Id: <20190116135949.2097-5-jacopo@jmondi.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190116135949.2097-1-jacopo@jmondi.org> References: <20190116135949.2097-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 4/5] libcamera: pipeline: Allows more expressive names 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: Wed, 16 Jan 2019 13:59:51 -0000 Allow the registration of pipeline handlers with more expressive names than the pipeline handler factory class name. Result is the following: -DBG pipeline_handler.cpp:119 Registered pipeline handler "PipeHandlerVimc" -DBG pipeline_handler.cpp:119 Registered pipeline handler "PipelineHandlerIPU3" +DBG pipeline_handler.cpp:119 Registered pipeline handler "VIMC virtual driver pipeline handler" +DBG pipeline_handler.cpp:119 Registered pipeline handler "Intel IPU3 pipeline handler" Signed-off-by: Jacopo Mondi --- src/libcamera/include/pipeline_handler.h | 4 ++-- src/libcamera/pipeline/vimc.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libcamera/include/pipeline_handler.h b/src/libcamera/include/pipeline_handler.h index fdf8b8d..180f599 100644 --- a/src/libcamera/include/pipeline_handler.h +++ b/src/libcamera/include/pipeline_handler.h @@ -43,12 +43,12 @@ private: static std::map ®istry(); }; -#define REGISTER_PIPELINE_HANDLER(handler) \ +#define REGISTER_PIPELINE_HANDLER(handler, name) \ class handler##Factory : public PipelineHandlerFactory { \ public: \ handler##Factory() \ { \ - PipelineHandlerFactory::registerType(#handler, this); \ + PipelineHandlerFactory::registerType(name, this); \ } \ virtual PipelineHandler *create() { \ return new handler(); \ diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp index 720d9c2..21af902 100644 --- a/src/libcamera/pipeline/vimc.cpp +++ b/src/libcamera/pipeline/vimc.cpp @@ -88,6 +88,6 @@ bool PipeHandlerVimc::match(DeviceEnumerator *enumerator) return true; } -REGISTER_PIPELINE_HANDLER(PipeHandlerVimc); +REGISTER_PIPELINE_HANDLER(PipeHandlerVimc, "VIMC virtual driver pipeline handler"); } /* namespace libcamera */