[{"id":1722,"web_url":"https://patchwork.libcamera.org/comment/1722/","msgid":"<20190528163239.GL14336@pendragon.ideasonboard.com>","date":"2019-05-28T16:32:39","subject":"Re: [libcamera-devel] [PATCH 8/8] libcamera: pipeline: vimc: add\n\tdummy IPA","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Paul,\n\nThank you for the patch.\n\nOn Mon, May 27, 2019 at 06:35:40PM -0400, Paul Elder wrote:\n> Make the vimc pipeline handler get the dummy IPA, to show how an IPA can\n> be acquired by a pipeline handler.\n> \n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> ---\n>  src/libcamera/pipeline/vimc.cpp | 10 ++++++++++\n>  1 file changed, 10 insertions(+)\n> \n> diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp\n> index d3ff527..1df5e5a 100644\n> --- a/src/libcamera/pipeline/vimc.cpp\n> +++ b/src/libcamera/pipeline/vimc.cpp\n> @@ -9,10 +9,12 @@\n>  #include <array>\n>  \n>  #include <libcamera/camera.h>\n> +#include <libcamera/ipa/ipa_interface.h>\n>  #include <libcamera/request.h>\n>  #include <libcamera/stream.h>\n>  \n>  #include \"device_enumerator.h\"\n> +#include \"ipa_manager.h\"\n>  #include \"log.h\"\n>  #include \"media_device.h\"\n>  #include \"pipeline_handler.h\"\n> @@ -252,6 +254,14 @@ bool PipelineHandlerVimc::match(DeviceEnumerator *enumerator)\n>  \tif (!media)\n>  \t\treturn false;\n>  \n> +\tIPAManager *ipaManager = IPAManager::instance();\n> +\tipaManager->addDir(\"src/ipa\");\n\nAs explained before, adding directories should not be the responsibility\nof pipeline handlers. Please also make sure to test the IPAManager after\ninstalling libcamera, to make sure directories are right.\n\nThis will create an issue when running libcamera from the build\ndirectory. I'm not sure how we could fix that. One option would be to\naddDir() the build directory in addition to the installation directory,\nbut that's not very nice. Maybe we could override (or extend) the system\nplugin directory with an environment variable ?\n\n> +\tstd::unique_ptr<IPAInterface> ipa = ipaManager->createIPA(this);\n> +\tif (ipa == nullptr)\n> +\t\tLOG(VIMC, Error) << \"no matching IPA found\";\n\nShould this be a fatal error ?\n\nYou should store the ipa in the pipeline data.\n\n> +\telse\n> +\t\tipa->init();\n> +\n>  \tstd::unique_ptr<VimcCameraData> data = utils::make_unique<VimcCameraData>(this);\n>  \n>  \t/* Locate and open the capture video node. */","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C5750600EA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 28 May 2019 18:33:20 +0200 (CEST)","from pendragon.ideasonboard.com (85-76-139-52-nat.elisa-mobile.fi\n\t[85.76.139.52])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 602F7D85;\n\tTue, 28 May 2019 18:33:09 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1559061200;\n\tbh=zs+V1RjBcY4x1Vg/pUD+5UcJeyqIH/0vCizzNmCHR1s=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=FdlGhwuicVv+xqgijozsHZ7WDdNouJFKPXbyfQVy84rNfFEwuq/VjM79iwTulh5v1\n\tl/f9U3DRcHjjlKUovL0CRBBc7NSk4UZxWJIWk64QBpgKqOPCF4vWKLmnMR1b582ovV\n\t0L8SZh2W8YdWM366Z8tNpIbyOp6gFLKqfBMSUOjs=","Date":"Tue, 28 May 2019 19:32:39 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Paul Elder <paul.elder@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190528163239.GL14336@pendragon.ideasonboard.com>","References":"<20190527223540.21855-1-paul.elder@ideasonboard.com>\n\t<20190527223540.21855-9-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20190527223540.21855-9-paul.elder@ideasonboard.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH 8/8] libcamera: pipeline: vimc: add\n\tdummy IPA","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":"Tue, 28 May 2019 16:33:21 -0000"}}]