{"id":10952,"url":"https://patchwork.libcamera.org/api/patches/10952/?format=json","web_url":"https://patchwork.libcamera.org/patch/10952/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/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":"<20210122102211.12768-2-david.plowman@raspberrypi.com>","date":"2021-01-22T10:22:07","name":"[libcamera-devel,1/5] ipa: raspberrypi: controller: Replace Raspberry Pi debug with libcamera debug","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"c7bb1b6035c46d39ac685716c86f05083874052f","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/people/42/?format=json","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/10952/mbox/","series":[{"id":1597,"url":"https://patchwork.libcamera.org/api/series/1597/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1597","date":"2021-01-22T10:22:06","name":"Remove Raspberry Pi logging","version":1,"mbox":"https://patchwork.libcamera.org/series/1597/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/10952/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/10952/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 1DB86BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 22 Jan 2021 10:22:27 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D64696823F;\n\tFri, 22 Jan 2021 11:22:25 +0100 (CET)","from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com\n\t[IPv6:2a00:1450:4864:20::42d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B097668232\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 22 Jan 2021 11:22:24 +0100 (CET)","by mail-wr1-x42d.google.com with SMTP id a1so4546863wrq.6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 22 Jan 2021 02:22:24 -0800 (PST)","from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72])\n\tby smtp.gmail.com with ESMTPSA id\n\tp15sm11469221wrt.15.2021.01.22.02.22.23\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 22 Jan 2021 02:22:23 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"ijLXNe1O\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=eYCFwN9iPZG8Rn3ef6s71zt26AGyTT1IJuHDcl/GAew=;\n\tb=ijLXNe1O74bXvKrx+I3MpyWVlo2ywZrUTWw9AdxNhtTr+F434FH0K+l/00/ySuZ/JP\n\tf+fq+huC2+5V7F5zk777qgRxJOBxp5GHMfdldEywTPSCo0nBUl9C+jRzhfcAbxEsyozb\n\tYMliHxQSwbj5zvXlIg/BHsi1cWPNmasEFtk/V6TEk3MfBEHkb2Lr2cW7RYa6KgSHZjI7\n\tvPkr2OjdS4LHOhGphNaLnv5f/bCaiDTinp0yzR/f0xZUNZ1yQevSn+xMmRPzXPAXo5zB\n\tdxufCVhmAhd7PeYpdykv2fT2cBnm2GC5TUDOUQ/4nn0DZIKCpBo5xPTL5wmw1O/JI5Bd\n\tBubg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=eYCFwN9iPZG8Rn3ef6s71zt26AGyTT1IJuHDcl/GAew=;\n\tb=cud8l3L0fiHs++w0vao+4aT+vKPpxGVt1cx7QmJOJoBmOlZsvU9gBqzvOkwetoDasA\n\tPOdiRUWUR6x4cCL7kzkXFNvKcbyiV8pRWrX6upEQFROG4a84Ka9fwrhPNqY5omzG6F5U\n\t7z0oTS20mwK6IQ6YrNnqf6O56luE1AZKuqHNfCMugDhs7AAx981zAail+pPGObIGrjK2\n\tW9Q0UnlL+NX0yyYon/xLXyFbYm9xDPN7bjvAsUltuWr6egQ2K5Y1qP+PFi4K8rne6jVD\n\tWb1baF01w9nlYh8p6jtWVNbRD5+IAInl1ATFi9CfPwOUPzVP9AtPRiuo2K6y9AuFv7c1\n\t1R3Q==","X-Gm-Message-State":"AOAM533En6lMDgwv7LMnupAKdNr1VfOhDahGDiAVzbwTwad8lhLaZ1+r\n\tehOBZXL4ZtC5C1N8hhQEHccKwQDY1eVhlQx4","X-Google-Smtp-Source":"ABdhPJxJL7CbY3kdwFP3DypbyJoUtK3I2AahMvNaGe9JMsCY5ADnsRG73MRQBlET/WHAbs/qBH/1Dg==","X-Received":"by 2002:a5d:5283:: with SMTP id c3mr90872wrv.319.1611310944215; \n\tFri, 22 Jan 2021 02:22:24 -0800 (PST)","From":"David Plowman <david.plowman@raspberrypi.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Fri, 22 Jan 2021 10:22:07 +0000","Message-Id":"<20210122102211.12768-2-david.plowman@raspberrypi.com>","X-Mailer":"git-send-email 2.20.1","In-Reply-To":"<20210122102211.12768-1-david.plowman@raspberrypi.com>","References":"<20210122102211.12768-1-david.plowman@raspberrypi.com>","MIME-Version":"1.0","Subject":"[libcamera-devel] [PATCH 1/5] ipa: raspberrypi: controller: Replace\n\tRaspberry Pi debug with libcamera debug","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>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n---\n src/ipa/raspberrypi/controller/controller.cpp | 29 +++++++++++--------\n 1 file changed, 17 insertions(+), 12 deletions(-)","diff":"diff --git a/src/ipa/raspberrypi/controller/controller.cpp b/src/ipa/raspberrypi/controller/controller.cpp\nindex 22461cc4..f81707c2 100644\n--- a/src/ipa/raspberrypi/controller/controller.cpp\n+++ b/src/ipa/raspberrypi/controller/controller.cpp\n@@ -5,6 +5,8 @@\n  * controller.cpp - ISP controller\n  */\n \n+#include \"libcamera/internal/log.h\"\n+\n #include \"algorithm.hpp\"\n #include \"controller.hpp\"\n \n@@ -12,6 +14,9 @@\n #include <boost/property_tree/ptree.hpp>\n \n using namespace RPiController;\n+using namespace libcamera;\n+\n+LOG_DEFINE_CATEGORY(RPiController)\n \n Controller::Controller()\n \t: switch_mode_called_(false) {}\n@@ -27,7 +32,7 @@ Controller::~Controller() {}\n \n void Controller::Read(char const *filename)\n {\n-\tRPI_LOG(\"Controller starting\");\n+\tLOG(RPiController, Debug) << \"Controller starting\";\n \tboost::property_tree::ptree root;\n \tboost::property_tree::read_json(filename, root);\n \tfor (auto const &key_and_value : root) {\n@@ -36,10 +41,10 @@ void Controller::Read(char const *filename)\n \t\t\talgo->Read(key_and_value.second);\n \t\t\talgorithms_.push_back(AlgorithmPtr(algo));\n \t\t} else\n-\t\t\tRPI_LOG(\"WARNING: No algorithm found for \\\"\"\n-\t\t\t\t<< key_and_value.first << \"\\\"\");\n+\t\t\tLOG(RPiController, Debug) << \"WARNING: No algorithm found for \\\"\"\n+\t\t\t\t\t\t  << key_and_value.first << \"\\\"\";\n \t}\n-\tRPI_LOG(\"Controller finished\");\n+\tLOG(RPiController, Debug) << \"Controller finished\";\n }\n \n Algorithm *Controller::CreateAlgorithm(char const *name)\n@@ -50,39 +55,39 @@ Algorithm *Controller::CreateAlgorithm(char const *name)\n \n void Controller::Initialise()\n {\n-\tRPI_LOG(\"Controller starting\");\n+\tLOG(RPiController, Debug) << \"Controller starting\";\n \tfor (auto &algo : algorithms_)\n \t\talgo->Initialise();\n-\tRPI_LOG(\"Controller finished\");\n+\tLOG(RPiController, Debug) << \"Controller finished\";\n }\n \n void Controller::SwitchMode(CameraMode const &camera_mode, Metadata *metadata)\n {\n-\tRPI_LOG(\"Controller starting\");\n+\tLOG(RPiController, Debug) << \"Controller starting\";\n \tfor (auto &algo : algorithms_)\n \t\talgo->SwitchMode(camera_mode, metadata);\n \tswitch_mode_called_ = true;\n-\tRPI_LOG(\"Controller finished\");\n+\tLOG(RPiController, Debug) << \"Controller finished\";\n }\n \n void Controller::Prepare(Metadata *image_metadata)\n {\n-\tRPI_LOG(\"Controller::Prepare starting\");\n+\tLOG(RPiController, Debug) << \"Controller::Prepare starting\";\n \tassert(switch_mode_called_);\n \tfor (auto &algo : algorithms_)\n \t\tif (!algo->IsPaused())\n \t\t\talgo->Prepare(image_metadata);\n-\tRPI_LOG(\"Controller::Prepare finished\");\n+\tLOG(RPiController, Debug) << \"Controller::Prepare finished\";\n }\n \n void Controller::Process(StatisticsPtr stats, Metadata *image_metadata)\n {\n-\tRPI_LOG(\"Controller::Process starting\");\n+\tLOG(RPiController, Debug) << \"Controller::Process starting\";\n \tassert(switch_mode_called_);\n \tfor (auto &algo : algorithms_)\n \t\tif (!algo->IsPaused())\n \t\t\talgo->Process(stats, image_metadata);\n-\tRPI_LOG(\"Controller::Process finished\");\n+\tLOG(RPiController, Debug) << \"Controller::Process finished\";\n }\n \n Metadata &Controller::GetGlobalMetadata()\n","prefixes":["libcamera-devel","1/5"]}