{"id":253,"url":"https://patchwork.libcamera.org/api/1.1/patches/253/?format=json","web_url":"https://patchwork.libcamera.org/patch/253/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20190116135949.2097-5-jacopo@jmondi.org>","date":"2019-01-16T13:59:48","name":"[libcamera-devel,v2,4/5] libcamera: pipeline: Allows more expressive names","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"7eb6c2fa659a3218a2c6a91cbe2f6b319818bf4f","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/1.1/people/3/?format=json","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/253/mbox/","series":[{"id":85,"url":"https://patchwork.libcamera.org/api/1.1/series/85/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=85","date":"2019-01-16T13:59:44","name":"libcamera: pipeline: Add Intel IPU3 pipeline handler","version":2,"mbox":"https://patchwork.libcamera.org/series/85/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/253/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/253/checks/","tags":{},"headers":{"Return-Path":"<jacopo@jmondi.org>","Received":["from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net\n\t[217.70.183.198])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8005A60C9A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 16 Jan 2019 14:59:51 +0100 (CET)","from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 13AF2C0015;\n\tWed, 16 Jan 2019 13:59:50 +0000 (UTC)"],"X-Originating-IP":"2.224.242.101","From":"Jacopo Mondi <jacopo@jmondi.org>","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","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v2 4/5] libcamera: pipeline: Allows more\n\texpressive names","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Wed, 16 Jan 2019 13:59:51 -0000"},"content":"Allow the registration of pipeline handlers with more expressive names\nthan the pipeline handler factory class name.\n\nResult is the following:\n-DBG pipeline_handler.cpp:119 Registered pipeline handler \"PipeHandlerVimc\"\n-DBG pipeline_handler.cpp:119 Registered pipeline handler \"PipelineHandlerIPU3\"\n+DBG pipeline_handler.cpp:119 Registered pipeline handler \"VIMC virtual driver pipeline handler\"\n+DBG pipeline_handler.cpp:119 Registered pipeline handler \"Intel IPU3 pipeline handler\"\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/include/pipeline_handler.h | 4 ++--\n src/libcamera/pipeline/vimc.cpp          | 2 +-\n 2 files changed, 3 insertions(+), 3 deletions(-)","diff":"diff --git a/src/libcamera/include/pipeline_handler.h b/src/libcamera/include/pipeline_handler.h\nindex fdf8b8d..180f599 100644\n--- a/src/libcamera/include/pipeline_handler.h\n+++ b/src/libcamera/include/pipeline_handler.h\n@@ -43,12 +43,12 @@ private:\n \tstatic std::map<std::string, PipelineHandlerFactory *> &registry();\n };\n \n-#define REGISTER_PIPELINE_HANDLER(handler) \\\n+#define REGISTER_PIPELINE_HANDLER(handler, name) \\\n class handler##Factory : public PipelineHandlerFactory { \\\n public: \\\n \thandler##Factory() \\\n \t{ \\\n-\t\tPipelineHandlerFactory::registerType(#handler, this); \\\n+\t\tPipelineHandlerFactory::registerType(name, this); \\\n \t} \\\n \tvirtual PipelineHandler *create() { \\\n \t\treturn new handler(); \\\ndiff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp\nindex 720d9c2..21af902 100644\n--- a/src/libcamera/pipeline/vimc.cpp\n+++ b/src/libcamera/pipeline/vimc.cpp\n@@ -88,6 +88,6 @@ bool PipeHandlerVimc::match(DeviceEnumerator *enumerator)\n \treturn true;\n }\n \n-REGISTER_PIPELINE_HANDLER(PipeHandlerVimc);\n+REGISTER_PIPELINE_HANDLER(PipeHandlerVimc, \"VIMC virtual driver pipeline handler\");\n \n } /* namespace libcamera */\n","prefixes":["libcamera-devel","v2","4/5"]}