From patchwork Wed Jun 5 00:53:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 1358 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 327E964720 for ; Wed, 5 Jun 2019 02:53:35 +0200 (CEST) Received: from localhost.localdomain (unknown [96.44.9.117]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 8CB1C9BC; Wed, 5 Jun 2019 02:53:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1559696015; bh=gK0u0l3VetDjQuopNDzrP+AtpRMLmuagyrlF/GCxfA4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V8XHYSlD7WoaQbUYElpDlijm2w4qLT5hpbkanNrcYxmd3RMZz4z0WugYM0yDZypGQ jgRQjDzu4uJZi4UtlRiFbx/BJFNzcojZXHlOfpcxbtthseUcsHSgFORd14QJQH2J6c gil8NAe++n/17dzxseGTd+H+Q6/4cMns9ktSCrEc= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Tue, 4 Jun 2019 20:53:16 -0400 Message-Id: <20190605005316.4835-11-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190605005316.4835-1-paul.elder@ideasonboard.com> References: <20190605005316.4835-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 10/10] libcamera: pipeline: vimc: add dummy IPA 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, 05 Jun 2019 00:53:35 -0000 Make the vimc pipeline handler get the dummy IPA, to show how an IPA can be acquired by a pipeline handler. Signed-off-by: Paul Elder Reviewed-by: Laurent Pinchart --- Changes in v3: - save IPA to VIMC pipeline data - no IPA is non-fatal warning Changes in v2: - save IPA to pipeline data - no IPA is fatal error src/libcamera/pipeline/vimc.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp index 0e4eede..ad4577a 100644 --- a/src/libcamera/pipeline/vimc.cpp +++ b/src/libcamera/pipeline/vimc.cpp @@ -9,10 +9,13 @@ #include #include +#include +#include #include #include #include "device_enumerator.h" +#include "ipa_manager.h" #include "log.h" #include "media_device.h" #include "pipeline_handler.h" @@ -77,6 +80,8 @@ private: return static_cast( PipelineHandler::cameraData(camera)); } + + std::unique_ptr ipa_; }; VimcCameraConfiguration::VimcCameraConfiguration() @@ -248,6 +253,12 @@ bool PipelineHandlerVimc::match(DeviceEnumerator *enumerator) if (!media) return false; + ipa_ = IPAManager::instance()->createIPA(this, 0, 0); + if (ipa_ == nullptr) + LOG(VIMC, Warning) << "no matching IPA found"; + else + ipa_->init(); + std::unique_ptr data = utils::make_unique(this); /* Locate and open the capture video node. */