{"id":9019,"url":"https://patchwork.libcamera.org/api/1.1/patches/9019/?format=json","web_url":"https://patchwork.libcamera.org/patch/9019/","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":"<20200727151820.24466-3-kgupta@es.iitr.ac.in>","date":"2020-07-27T15:18:19","name":"[libcamera-devel,v3,2/3] libcamera: pixel_format: Add a function to return format based on string","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"b29df8d1142616dfadda7fff7ecc5846dcd3cb68","submitter":{"id":39,"url":"https://patchwork.libcamera.org/api/1.1/people/39/?format=json","name":"Kaaira Gupta","email":"kgupta@es.iitr.ac.in"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/9019/mbox/","series":[{"id":1152,"url":"https://patchwork.libcamera.org/api/1.1/series/1152/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1152","date":"2020-07-27T15:18:17","name":"Enable formats lookup based on name","version":3,"mbox":"https://patchwork.libcamera.org/series/1152/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/9019/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/9019/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 0EC6ABD878\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 27 Jul 2020 15:18:47 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D1F74613B6;\n\tMon, 27 Jul 2020 17:18:46 +0200 (CEST)","from mail-pl1-x641.google.com (mail-pl1-x641.google.com\n\t[IPv6:2607:f8b0:4864:20::641])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id AE3C06118A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 27 Jul 2020 17:18:45 +0200 (CEST)","by mail-pl1-x641.google.com with SMTP id p1so8162670pls.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 27 Jul 2020 08:18:45 -0700 (PDT)","from kaaira-HP-Pavilion-Notebook ([103.113.213.178])\n\tby smtp.gmail.com with ESMTPSA id\n\ts89sm14848706pjj.28.2020.07.27.08.18.42\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 27 Jul 2020 08:18:43 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=es-iitr-ac-in.20150623.gappssmtp.com\n\theader.i=@es-iitr-ac-in.20150623.gappssmtp.com\n\theader.b=\"fae+vz++\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=es-iitr-ac-in.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=xa/CisV5SteNHL1Yw3nkya4xIj19X3nySwYFLzKpMu0=;\n\tb=fae+vz++RigG8wOGcZRC/a5hGgYNEU6AsezdIu5S0eBOfzh1ue0UJ7aiqvePOjiJ/B\n\tYTu8AZXU2NF32APx5FCdd2eLruh+wHsLD+bxPfW5sqk88sPWXttm4CdcxF/4dHRobnVh\n\tg/HOxRPFVhkE6auxYK5Oarzq/Alqnv5bqTYiiNs1QEEGqOdEchA6xk1iKqipV20xcDmN\n\tK2x6ZOOhy1IDCY8xMHk2smk+q2leBY8aqd/FNVA587Y0QvNkW6hm5I1ST40y9Ilt4mYS\n\tgV19ehcv3vVYngk7imMY0vhRgpL3IM8mqcjGtni+rjeVmAs0nvtdB58Ip/3pEaSNmyFB\n\txfJA==","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;\n\tbh=xa/CisV5SteNHL1Yw3nkya4xIj19X3nySwYFLzKpMu0=;\n\tb=PUZJNLhybgKfk0g85v6inj3M3/h2yV54aczNGpOUG4zvQWtSHDLX3B3mdCSh+qepgY\n\tj1aKdDOPQJEGS4qsthU/fdckE8Jx5ke2Et4x0ftKcmkrewSBeO8QYYjA/lOD/oTl2hTx\n\tqK8usXjtVNxIfZqpjvz0ojSkppzVWNxfZl0XNsNdRcxCrByF5YUotYOc+rYqidoCiJM0\n\tILWJHyzNoGMAPDxJIQstWE96SFzZ3MJJrgdzEOXcSmn+g/S/OPawNv0yR2IVQsYuy7oh\n\txZ0SurQuVOS8OzHHWunwe7qQ43VOJerxB6dXzNl551/kvnBPrR6bu0dRlKAf9YwHdxlq\n\txCDw==","X-Gm-Message-State":"AOAM532VnmV2CiIF+jh8CnjvmMvdfRdA2TjEe9rK5UgLdwsFUJPJyrkL\n\tercWSDzqwlWzRfb0qrbsOMPoxw==","X-Google-Smtp-Source":"ABdhPJxKf8hj60uxiMyIH+3LsQPDkzjKoi8F3av070rrAgvymYT+lla0gaVLNv+lSU1Gsbo5I+kwEg==","X-Received":"by 2002:a17:90a:ef17:: with SMTP id\n\tk23mr17452606pjz.45.1595863123701; \n\tMon, 27 Jul 2020 08:18:43 -0700 (PDT)","From":"Kaaira Gupta <kgupta@es.iitr.ac.in>","To":"libcamera-devel@lists.libcamera.org, Kieran Bingham\n\t<kieran.bingham@ideasonboard.com>, =?utf-8?q?Niklas_S=C3=B6derlund?=\n\t<niklas.soderlund@ragnatech.se>","Date":"Mon, 27 Jul 2020 20:48:19 +0530","Message-Id":"<20200727151820.24466-3-kgupta@es.iitr.ac.in>","X-Mailer":"git-send-email 2.17.1","In-Reply-To":"<20200727151820.24466-1-kgupta@es.iitr.ac.in>","References":"<20200727151820.24466-1-kgupta@es.iitr.ac.in>","Subject":"[libcamera-devel] [PATCH v3 2/3] libcamera: pixel_format: Add a\n\tfunction to return format based on string","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>","Cc":"Kaaira Gupta <kgupta@es.iitr.ac.in>","MIME-Version":"1.0","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":"Add a function which retrieves pixel format corrsponding to its name\nfrom PixelFormatInfo.\n\nSigned-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in>\n---\n include/libcamera/pixel_format.h | 2 ++\n src/libcamera/pixel_format.cpp   | 9 +++++++++\n 2 files changed, 11 insertions(+)","diff":"diff --git a/include/libcamera/pixel_format.h b/include/libcamera/pixel_format.h\nindex 6727315..c4ae088 100644\n--- a/include/libcamera/pixel_format.h\n+++ b/include/libcamera/pixel_format.h\n@@ -38,6 +38,8 @@ public:\n \n \tstd::string toString() const;\n \n+\tstatic PixelFormat fromString(const std::string &name);\n+\n private:\n \tuint32_t fourcc_;\n \tuint64_t modifier_;\ndiff --git a/src/libcamera/pixel_format.cpp b/src/libcamera/pixel_format.cpp\nindex 14addb5..fbb2158 100644\n--- a/src/libcamera/pixel_format.cpp\n+++ b/src/libcamera/pixel_format.cpp\n@@ -130,4 +130,13 @@ std::string PixelFormat::toString() const\n \treturn info.name;\n }\n \n+/**\n+ * \\brief Retrive pixel format correspoding to the string\n+ * \\return Pixel format\n+ */\n+PixelFormat PixelFormat::fromString(const std::string &name)\n+{\n+\treturn PixelFormatInfo::info(name);\n+}\n+\n } /* namespace libcamera */\n","prefixes":["libcamera-devel","v3","2/3"]}