{"id":13100,"url":"https://patchwork.libcamera.org/api/1.1/patches/13100/?format=json","web_url":"https://patchwork.libcamera.org/patch/13100/","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":"<20210723040036.32346-15-laurent.pinchart@ideasonboard.com>","date":"2021-07-23T04:00:33","name":"[libcamera-devel,RFC,14/17] libcamera: pipeline: raspberrypi: Migrate to Camera::Private","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"c348355b6483dfd92eff9271e92a60232ca0ea43","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/1.1/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/13100/mbox/","series":[{"id":2270,"url":"https://patchwork.libcamera.org/api/1.1/series/2270/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2270","date":"2021-07-23T04:00:19","name":"libcamera: Replace CameraData with Camera::Private","version":1,"mbox":"https://patchwork.libcamera.org/series/2270/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/13100/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/13100/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 3B78AC322E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 23 Jul 2021 04:00:58 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E7071687B4;\n\tFri, 23 Jul 2021 06:00:57 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9AD0B687BC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 23 Jul 2021 06:00:47 +0200 (CEST)","from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 403AB255\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 23 Jul 2021 06:00:47 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"vXV5YPTz\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1627012847;\n\tbh=D1R6ksVXPbSumN2Q+kkiXcP5p3Vfyezaib68Mqnh3Dk=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=vXV5YPTzaIIhOPr6ouT/mGfmkZqy+5K4ZgVJZkkAXEX6bY/PUtck1pscoLO7HEJXa\n\tChtZTztLx9wGmPOgYu200qicccDub7icizEf2uBmR54khaOzkiQ+IMh0KsHgtlkekz\n\tThLNr2nT+4zoyn7lNoZlJwBbr+6RKdpW4ACkl9WI=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Fri, 23 Jul 2021 07:00:33 +0300","Message-Id":"<20210723040036.32346-15-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.31.1","In-Reply-To":"<20210723040036.32346-1-laurent.pinchart@ideasonboard.com>","References":"<20210723040036.32346-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [RFC PATCH 14/17] libcamera: pipeline:\n\traspberrypi: Migrate to Camera::Private","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"As part of the effort to remove the CameraData class, migrate the\npipeline handler-specific camera data from CameraData to the\nCamera::Private class.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n .../pipeline/raspberrypi/raspberrypi.cpp      | 24 +++++++++----------\n 1 file changed, 12 insertions(+), 12 deletions(-)","diff":"diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex 2411f73f48e0..be8dcdc67a15 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -135,11 +135,11 @@ enum class Isp : unsigned int { Input, Output0, Output1, Stats };\n \n } /* namespace */\n \n-class RPiCameraData : public CameraData\n+class RPiCameraData : public Camera::Private\n {\n public:\n \tRPiCameraData(PipelineHandler *pipe)\n-\t\t: CameraData(pipe), state_(State::Stopped),\n+\t\t: Camera::Private(pipe), state_(State::Stopped),\n \t\t  supportsFlips_(false), flipsAlterBayerOrder_(false),\n \t\t  dropFrameCount_(0), ispOutputCount_(0)\n \t{\n@@ -263,9 +263,9 @@ public:\n \tbool match(DeviceEnumerator *enumerator) override;\n \n private:\n-\tRPiCameraData *cameraData(const Camera *camera)\n+\tRPiCameraData *cameraData(Camera *camera)\n \t{\n-\t\treturn static_cast<RPiCameraData *>(PipelineHandler::cameraData(camera));\n+\t\treturn static_cast<RPiCameraData *>(camera->_d());\n \t}\n \n \tint queueAllBuffers(Camera *camera);\n@@ -1106,10 +1106,10 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator)\n \tstreams.insert(&data->isp_[Isp::Output1]);\n \n \t/* Create and register the camera. */\n+\tconst std::string &id = data->sensor_->id();\n \tstd::shared_ptr<Camera> camera =\n-\t\tCamera::create(new Camera::Private(this), data->sensor_->id(),\n-\t\t\t       streams);\n-\tregisterCamera(std::move(camera), std::move(data));\n+\t\tCamera::create(data.release(), id, streams);\n+\tregisterCamera(std::move(camera), nullptr);\n \n \treturn true;\n }\n@@ -1224,7 +1224,7 @@ void RPiCameraData::frameStarted(uint32_t sequence)\n \n int RPiCameraData::loadIPA(ipa::RPi::SensorConfig *sensorConfig)\n {\n-\tipa_ = IPAManager::createIPA<ipa::RPi::IPAProxyRPi>(pipe_, 1, 1);\n+\tipa_ = IPAManager::createIPA<ipa::RPi::IPAProxyRPi>(pipe(), 1, 1);\n \n \tif (!ipa_)\n \t\treturn -ENOENT;\n@@ -1523,10 +1523,10 @@ void RPiCameraData::clearIncompleteRequests()\n \t\tfor (auto &b : request->buffers()) {\n \t\t\tFrameBuffer *buffer = b.second;\n \t\t\tbuffer->cancel();\n-\t\t\tpipe_->completeBuffer(request, buffer);\n+\t\t\tpipe()->completeBuffer(request, buffer);\n \t\t}\n \n-\t\tpipe_->completeRequest(request);\n+\t\tpipe()->completeRequest(request);\n \t\trequestQueue_.pop_front();\n \t}\n }\n@@ -1550,7 +1550,7 @@ void RPiCameraData::handleStreamBuffer(FrameBuffer *buffer, RPi::Stream *stream)\n \t\t\t * Tag the buffer as completed, returning it to the\n \t\t\t * application.\n \t\t\t */\n-\t\t\tpipe_->completeBuffer(request, buffer);\n+\t\t\tpipe()->completeBuffer(request, buffer);\n \t\t} else {\n \t\t\t/*\n \t\t\t * This buffer was not part of the Request, or there is no\n@@ -1613,7 +1613,7 @@ void RPiCameraData::checkRequestCompleted()\n \t\tif (state_ != State::IpaComplete)\n \t\t\treturn;\n \n-\t\tpipe_->completeRequest(request);\n+\t\tpipe()->completeRequest(request);\n \t\trequestQueue_.pop_front();\n \t\trequestCompleted = true;\n \t}\n","prefixes":["libcamera-devel","RFC","14/17"]}