[{"id":27910,"web_url":"https://patchwork.libcamera.org/comment/27910/","msgid":"<87a5t42gi8.fsf@baylibre.com>","date":"2023-09-30T08:48:47","subject":"Re: [libcamera-devel] [PATCH v3 1/5] libcamera: converter: a few\n\tfixes to ConverterFactoryBase documentation","submitter":{"id":153,"url":"https://patchwork.libcamera.org/api/people/153/","name":"Mattijs Korpershoek","email":"mkorpershoek@baylibre.com"},"content":"On jeu., sept. 28, 2023 at 21:55, Andrey Konovalov <andrey.konovalov@linaro.org> wrote:\n\n> The description of ConverterFactoryBase::registerType() referred to\n> a converter factory as \"converter class\" and \"converter\". Fix that.\n>\n> Also make the descriptions of ConverterFactoryBase::compatibles() and\n> ConverterFactoryBase::create() a bit more specific.\n>\n> Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org>\n\nReviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>\n\n> ---\n>  src/libcamera/converter.cpp | 18 +++++++++++-------\n>  1 file changed, 11 insertions(+), 7 deletions(-)\n>\n> diff --git a/src/libcamera/converter.cpp b/src/libcamera/converter.cpp\n> index fa0f1ec8..15701363 100644\n> --- a/src/libcamera/converter.cpp\n> +++ b/src/libcamera/converter.cpp\n> @@ -199,16 +199,19 @@ ConverterFactoryBase::ConverterFactoryBase(const std::string name, std::initiali\n>  \n>  /**\n>   * \\fn ConverterFactoryBase::compatibles()\n> - * \\return The names compatibles\n> + * \\return The list of compatible name aliases of the converter\n>   */\n>  \n>  /**\n> - * \\brief Create an instance of the converter corresponding to a named factory\n> - * \\param[in] media Name of the factory\n> + * \\brief Create an instance of the converter corresponding to the media device\n> + * \\param[in] media The media device to create the converter for\n>   *\n>   * \\return A unique pointer to a new instance of the converter subclass\n> - * corresponding to the named factory or one of its alias. Otherwise a null\n> - * pointer if no such factory exists\n> + * corresponding to the media device. The converter is created by matching\n> + * the factory name or any of its compatible aliases with the media device\n> + * driver name.\n> + * If the media device driver name doesn't match anything a null pointer is\n> + * returned.\n>   */\n>  std::unique_ptr<Converter> ConverterFactoryBase::create(MediaDevice *media)\n>  {\n> @@ -236,10 +239,11 @@ std::unique_ptr<Converter> ConverterFactoryBase::create(MediaDevice *media)\n>  }\n>  \n>  /**\n> - * \\brief Add a converter class to the registry\n> + * \\brief Add a converter factory to the registry\n>   * \\param[in] factory Factory to use to construct the converter class\n>   *\n> - * The caller is responsible to guarantee the uniqueness of the converter name.\n> + * The caller is responsible to guarantee the uniqueness of the converter\n> + * factory name.\n>   */\n>  void ConverterFactoryBase::registerType(ConverterFactoryBase *factory)\n>  {\n> -- \n> 2.34.1","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 6FEB2BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 30 Sep 2023 08:48:52 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C9F5962963;\n\tSat, 30 Sep 2023 10:48:51 +0200 (CEST)","from mail-lf1-x133.google.com (mail-lf1-x133.google.com\n\t[IPv6:2a00:1450:4864:20::133])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E34E36295E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 30 Sep 2023 10:48:50 +0200 (CEST)","by mail-lf1-x133.google.com with SMTP id\n\t2adb3069b0e04-5041bb9ce51so23114419e87.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 30 Sep 2023 01:48:50 -0700 (PDT)","from localhost\n\t(2a01cb06b0237dd3c01dd287ba46c248.ipv6.abo.wanadoo.fr.\n\t[2a01:cb06:b023:7dd3:c01d:d287:ba46:c248])\n\tby smtp.gmail.com with ESMTPSA id\n\tc16-20020a7bc850000000b0040303a9965asm2929945wml.40.2023.09.30.01.48.49\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tSat, 30 Sep 2023 01:48:49 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1696063731;\n\tbh=0pwV1FsT5qA39WUBCLlHsr4Jwz+MeIPR2Stiw0CdCpI=;\n\th=To:In-Reply-To:References:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=uE5Z8iQyIMsNj3X85gTd/UjP+rQS0627Izmh0+s1drI6N7xdHoOcdIbszJV73Xg0m\n\tW8r0n3kBEgpgdkdP+p+f5ymzFSK34Sn97nt2rkTGcUYnFiaAlEHkZmRk6QvWszR0ji\n\tdT8TH6rZuJ1hoa9Hg5crMXVYnU2ayq+01nktpm3+1hPQg9gcdGNcGI0Yu+z+xjtfbb\n\tLflYFcVy1vBRbqSpA56FNgR5M8Y1l6K7WYdtuUqyviS1aXrRk0rV1LhIYKtR3nMRbo\n\tDEcTsXke44allipoGqq+aKz5B88R1tV3wEKjgB/fcHlDtXrWZsUhLFanbVUY7lpH1w\n\tP3XRrnm/cVphw==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1696063730;\n\tx=1696668530; darn=lists.libcamera.org; \n\th=mime-version:message-id:date:references:in-reply-to:subject:cc:to\n\t:from:from:to:cc:subject:date:message-id:reply-to;\n\tbh=HaPveIK7uIViyr9SSvghyZhedlWO9CG/iA1vcfBHiZ4=;\n\tb=UlVMKKHCpKJrjphGhKilbk1/Ak48wwoPHlyhGhUtyfMYLcnk8QoKN5kHVMh54idwFS\n\tshRNVpF1KX8tZfQlWKns4tT2qrk3o2JPRNnhHtoj4XARtlUV5oLBqfd1B75+a7e0Udux\n\tamPq1uriEuek7QYKinIjymJ+DKmr900kn9M3hctOnRAPfzav1AgC+DUAldYA6NrIU2jJ\n\tRiGwjgpgZzdb+1aDTgYqVLrFgsoW9oCJfEsaKX8BwoT2Mqzxy1xqaVpQb1AJgUheQ6i6\n\t4VfHm67HM+tNDf1ZROdv++m2uANaMY/PahM6+gcKwc4Vb1ARvx1MeWoOsCegLrcsRB2G\n\te8ww=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected)\n\theader.d=baylibre-com.20230601.gappssmtp.com\n\theader.i=@baylibre-com.20230601.gappssmtp.com header.b=\"UlVMKKHC\"; \n\tdkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1696063730; x=1696668530;\n\th=mime-version:message-id:date:references:in-reply-to:subject:cc:to\n\t:from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; \n\tbh=HaPveIK7uIViyr9SSvghyZhedlWO9CG/iA1vcfBHiZ4=;\n\tb=hJ9DZ/IVxyEq5Feg0bR7+IesuBng1XKt2jaGbuImFUyZRnKRSkHS6nZFTpdTrqH0Xc\n\t8Iz8BAQZuBkozFy4mP15jetPOJzKSHhz33DTLejMYVU8jDOLmchTOqIEX3R+W4OVDs7d\n\tUGtdHmZSn2vAiXsTU6TeFNOgjvV2Mgfs6hT6RKPVtWQsMy3yXSeUTZ1sO0V733JC8Xf4\n\tAsjYC7qVXnW/Vy1zRmx5/F8ZJlghI169gSKvRNCJE4bWKWfU3SN4JyHiqKuVZ3jmhZx8\n\thQ2/d3Jg7r7bfmVnWKluS8yZTPvHgEZaRZlM6zveb6Vuq/Hokh2j70Qgcr5FSHLK793/\n\tyAEg==","X-Gm-Message-State":"AOJu0YzQEF6YrE/JodUzMmsqKOld4EHyaqhlC4d+BLOEDwTGWyUe/gh4\n\tR4Ps/c9asZ5yNgrllAHST8okQg==","X-Google-Smtp-Source":"AGHT+IHuPKV2Gh34yFq6UgOV2QE3H8zmLXJgV/jJt9ctKWWuDyM6KfFHChQhD7asdaBs8jkgrhHEPg==","X-Received":"by 2002:a05:6512:1246:b0:502:cc8d:f1fc with SMTP id\n\tfb6-20020a056512124600b00502cc8df1fcmr7141371lfb.37.1696063730005; \n\tSat, 30 Sep 2023 01:48:50 -0700 (PDT)","To":"Andrey Konovalov <andrey.konovalov@linaro.org>,\n\tlibcamera-devel@lists.libcamera.org","In-Reply-To":"<20230928185537.20178-2-andrey.konovalov@linaro.org>","References":"<20230928185537.20178-1-andrey.konovalov@linaro.org>\n\t<20230928185537.20178-2-andrey.konovalov@linaro.org>","Date":"Sat, 30 Sep 2023 10:48:47 +0200","Message-ID":"<87a5t42gi8.fsf@baylibre.com>","MIME-Version":"1.0","Content-Type":"text/plain","Subject":"Re: [libcamera-devel] [PATCH v3 1/5] libcamera: converter: a few\n\tfixes to ConverterFactoryBase documentation","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>","From":"Mattijs Korpershoek via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Mattijs Korpershoek <mkorpershoek@baylibre.com>","Cc":"jacopo.mondi@ideasonboard.com, bryan.odonoghue@linaro.org,\n\tsrinivas.kandagatla@linaro.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":27913,"web_url":"https://patchwork.libcamera.org/comment/27913/","msgid":"<20230930091034.GA22488@pendragon.ideasonboard.com>","date":"2023-09-30T09:10:34","subject":"Re: [libcamera-devel] [PATCH v3 1/5] libcamera: converter: a few\n\tfixes to ConverterFactoryBase documentation","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Andrey,\n\nThank you for the patch.\n\nOn Thu, Sep 28, 2023 at 09:55:33PM +0300, Andrey Konovalov via libcamera-devel wrote:\n> The description of ConverterFactoryBase::registerType() referred to\n> a converter factory as \"converter class\" and \"converter\". Fix that.\n> \n> Also make the descriptions of ConverterFactoryBase::compatibles() and\n> ConverterFactoryBase::create() a bit more specific.\n> \n> Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org>\n> ---\n>  src/libcamera/converter.cpp | 18 +++++++++++-------\n>  1 file changed, 11 insertions(+), 7 deletions(-)\n> \n> diff --git a/src/libcamera/converter.cpp b/src/libcamera/converter.cpp\n> index fa0f1ec8..15701363 100644\n> --- a/src/libcamera/converter.cpp\n> +++ b/src/libcamera/converter.cpp\n> @@ -199,16 +199,19 @@ ConverterFactoryBase::ConverterFactoryBase(const std::string name, std::initiali\n>  \n>  /**\n>   * \\fn ConverterFactoryBase::compatibles()\n> - * \\return The names compatibles\n> + * \\return The list of compatible name aliases of the converter\n>   */\n>  \n>  /**\n> - * \\brief Create an instance of the converter corresponding to a named factory\n> - * \\param[in] media Name of the factory\n> + * \\brief Create an instance of the converter corresponding to the media device\n> + * \\param[in] media The media device to create the converter for\n>   *\n>   * \\return A unique pointer to a new instance of the converter subclass\n\nWhile at it, I'd drop the \"A unique pointer to\", that's implicit by\nusage of unique_ptr.\n\n> - * corresponding to the named factory or one of its alias. Otherwise a null\n> - * pointer if no such factory exists\n> + * corresponding to the media device. The converter is created by matching\n> + * the factory name or any of its compatible aliases with the media device\n> + * driver name.\n\nI'd move this sentence to the description of the function.\n\n> + * If the media device driver name doesn't match anything a null pointer is\n> + * returned.\n\n * \\brief Create an instance of the converter corresponding to the media device\n * \\param[in] media The media device to create the converter for\n *\n * The converter is created by matching the factory name or any of its\n * compatible aliases with the media device driver name.\n *\n * \\return A new instance of the converter subclass corresponding to the media\n * device, or null if the media device driver name doesn't match anything\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n>   */\n>  std::unique_ptr<Converter> ConverterFactoryBase::create(MediaDevice *media)\n>  {\n> @@ -236,10 +239,11 @@ std::unique_ptr<Converter> ConverterFactoryBase::create(MediaDevice *media)\n>  }\n>  \n>  /**\n> - * \\brief Add a converter class to the registry\n> + * \\brief Add a converter factory to the registry\n>   * \\param[in] factory Factory to use to construct the converter class\n>   *\n> - * The caller is responsible to guarantee the uniqueness of the converter name.\n> + * The caller is responsible to guarantee the uniqueness of the converter\n> + * factory name.\n>   */\n>  void ConverterFactoryBase::registerType(ConverterFactoryBase *factory)\n>  {","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 67AA7BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 30 Sep 2023 09:10:25 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BF0BB62963;\n\tSat, 30 Sep 2023 11:10:24 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5BE276295E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 30 Sep 2023 11:10:23 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(lfbn-idf1-1-343-200.w86-195.abo.wanadoo.fr [86.195.61.200])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BA5D9DD9;\n\tSat, 30 Sep 2023 11:08:39 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1696065024;\n\tbh=WzEVp2rA75aT5I8vncA495PhCyX/iN9qSTba2UBRz1o=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=T/G/hqKUKIOyC0AIvs18PSSwAH3+o4Jdvo52jeZwc98insreKDW+V+qT+i69fJlyE\n\tq7D0I/ltQqgfUQIwRRG1AwRtca/9VIdVqRCnhrC+CL3olgB1NmC5GPJGcWxN9e/WUU\n\t1Zfk3WoF0DWywZqKFG4NAXb4nhH0F5Wyrkom8V6Ii8cDmNDsVMs1jTcwn/9mhlgSS+\n\trupK9c0bjJMGIsBB/G3I4qMi/uzm2IIQEuMSHhSdXQ4SzXK9hiK4l0GBv6n9D69Jop\n\touMEw7+CTVOb8Iy1rgZeU2GZdBvMixi0ynt1DYNiid4fVwG1fA7Keeyn857Gg0GcV2\n\t5lcnEVkp0frcw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1696064919;\n\tbh=WzEVp2rA75aT5I8vncA495PhCyX/iN9qSTba2UBRz1o=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=C0n1rTiQp5hPrITcIlNWAsxweoq+V2Urg38fSgnGThjL+ylnIwACvyllBNRnJ2dGU\n\tuVZJP3S1zPG+OciSxV0dKKwY47dIYMI1XTRAH2/pEIETfwtIjeaza0GZcXabjHqzlB\n\tDUQ551MVsmXhh0dK3Uus+c/Yk1802cKUU0PoGVao="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"C0n1rTiQ\"; dkim-atps=neutral","Date":"Sat, 30 Sep 2023 12:10:34 +0300","To":"Andrey Konovalov <andrey.konovalov@linaro.org>","Message-ID":"<20230930091034.GA22488@pendragon.ideasonboard.com>","References":"<20230928185537.20178-1-andrey.konovalov@linaro.org>\n\t<20230928185537.20178-2-andrey.konovalov@linaro.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20230928185537.20178-2-andrey.konovalov@linaro.org>","Subject":"Re: [libcamera-devel] [PATCH v3 1/5] libcamera: converter: a few\n\tfixes to ConverterFactoryBase documentation","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>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"jacopo.mondi@ideasonboard.com, bryan.odonoghue@linaro.org,\n\tlibcamera-devel@lists.libcamera.org, srinivas.kandagatla@linaro.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]