From patchwork Mon Jun 3 23:16:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 1347 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 2459D618F7 for ; Tue, 4 Jun 2019 01:16:54 +0200 (CEST) Received: from localhost.localdomain (unknown [96.44.9.117]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 7E0B151C; Tue, 4 Jun 2019 01:16:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1559603813; bh=K2tLOK1usFqbAdnG9qt0ZB+0ooznf3NDvsqvkNsOp54=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lvSLTNiYrzRcajUeHUAeBeiDUGQc4tckHPgtM1vy2h+Rgh/ggC2tNtOt/M/CB2akW FH/tdSKAR0ryXtP81nq5a7FiHlJC627iEM9wLmKIGu1rj94wDIBAx3Cy85U/ZZaAq9 7Z4zBpgKtWGOGhdKxTFxls0SZlzIcw1AlhSu0Gkg= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Mon, 3 Jun 2019 19:16:37 -0400 Message-Id: <20190603231637.28554-11-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190603231637.28554-1-paul.elder@ideasonboard.com> References: <20190603231637.28554-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 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: Mon, 03 Jun 2019 23:16:54 -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 --- 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 78feeb8..f000c21 100644 --- a/src/libcamera/pipeline/vimc.cpp +++ b/src/libcamera/pipeline/vimc.cpp @@ -10,10 +10,12 @@ #include #include +#include #include #include #include "device_enumerator.h" +#include "ipa_manager.h" #include "log.h" #include "media_device.h" #include "pipeline_handler.h" @@ -252,6 +254,15 @@ bool PipelineHandlerVimc::match(DeviceEnumerator *enumerator) if (!media) return false; + IPAManager *ipaManager = IPAManager::instance(); + ipa_ = ipaManager->createIPA(this); + if (ipa_ == nullptr) { + LOG(VIMC, Error) << "no matching IPA found"; + return false; + } else { + ipa_->init(); + } + std::unique_ptr data = utils::make_unique(this); /* Locate and open the capture video node. */