From patchwork Mon Jul 27 16:21:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kaaira Gupta X-Patchwork-Id: 9021 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 0B6A8BD86F for ; Mon, 27 Jul 2020 16:21:53 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6F902613AA; Mon, 27 Jul 2020 18:21:52 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=es-iitr-ac-in.20150623.gappssmtp.com header.i=@es-iitr-ac-in.20150623.gappssmtp.com header.b="eHXwhdR+"; dkim-atps=neutral Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 30764605B2 for ; Mon, 27 Jul 2020 18:21:51 +0200 (CEST) Received: by mail-pf1-x441.google.com with SMTP id u185so9355358pfu.1 for ; Mon, 27 Jul 2020 09:21:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=es-iitr-ac-in.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=1nz2SLpHxj0utOF6pcKc5p5Ytur6QkxsGrq6iMwH79A=; b=eHXwhdR+Uy/hUTLQevRaAXnQm1syjdC6MYAEsFDU1UUE58W5H+PVAhtE7XjOhKWFID ObLiUOQHIPx8GQJfa/j5uk523ITNcotwbdReAFUxxh3QN+oAhrrNHiHXh3Ttn1lV181b oIHwo9Ixrngl+7SjT1hJgLBb9bolkcRZI/mosFdslPGpbGy3Bnc/Bv8zeWo7hAtVn6aZ 9VGn590d2CncziiuL8/teRMPp3XNA6nICA9oQ6f8hKZtGlsdd+Oc93KK1HWkEQpg/kOs u6aeOvTl5wiFeLyoJye5tcRC/+MmpzIHT/uMnHgB1KHGhu34oDZl8t3J37M5NxSTbDvf eVpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=1nz2SLpHxj0utOF6pcKc5p5Ytur6QkxsGrq6iMwH79A=; b=NNn5fGaWWQZQ741VLpV/bicRwHlirg1O0VQZx1Cq66CTlh3ZXLSJncbmH5LfuEK5Sq ICvcM8cobhV36R1l0vH2nC8SoKvCE3xQbMsmMGyfE3+SbWo9YstZF0ghN2IIwKNo+22G LED0gnTtVjWiP8QESQ6d6UKFuO89i71sxSJMXBg4aS2wXinGqTcNn8g1u5fLdEubFEJ+ 3NncGth1IW7w0DkoP2yxALWD8P1d0ditnEL5sFq4JwD4D9Vm5ynELCJrO1O+o6jIveXF vWuCwh4X6E+hIkogIXxX6DOcUBOQotVB+BzquQ/IQSFnEg6MyVIJzqk4mNmDWKtB1jf6 HzcA== X-Gm-Message-State: AOAM533f6fiUvBG7C6Js4ku0wobdtjGVKUlaztRiufEGeeHoGMzQIWfT fKW2AQma9U0VPIWzTFVybvoGw5F5iuA= X-Google-Smtp-Source: ABdhPJzLZpIehn3bxkAvVI+gSwsTDq7kTuq4D9aQXZrElFQR9SJatMTFlJPtcfISckl+ap7XAovlfA== X-Received: by 2002:a62:164a:: with SMTP id 71mr21482522pfw.266.1595866909723; Mon, 27 Jul 2020 09:21:49 -0700 (PDT) Received: from kaaira-HP-Pavilion-Notebook ([103.113.213.178]) by smtp.gmail.com with ESMTPSA id p10sm15626514pgn.6.2020.07.27.09.21.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 09:21:49 -0700 (PDT) From: Kaaira Gupta To: libcamera-devel@lists.libcamera.org, Kieran Bingham , =?utf-8?q?Niklas_S=C3=B6derlund?= Date: Mon, 27 Jul 2020 21:51:40 +0530 Message-Id: <20200727162143.31317-1-kgupta@es.iitr.ac.in> X-Mailer: git-send-email 2.17.1 Subject: [libcamera-devel] [PATCH v4 0/3] Enable formats lookup based on name X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kaaira Gupta MIME-Version: 1.0 Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" This patchset enables applications to find a pixel format, given its name. Fist patch adds a function to find PixelFormatInfo using its name. Second patch uses the info to retrieve pixel format, and the final patch uses this function, in qcam and cam, to set format with the help of its name instead of its hex value. Kaaira Gupta (3): libcamera: formats: PixelFormatInfo: Add name lookup function libcamera: pixel_format: Add a function to return format based on string libcamera: stream_option: use format name to set cam/qcam format include/libcamera/internal/formats.h | 1 + include/libcamera/pixel_format.h | 2 ++ src/cam/stream_options.cpp | 5 ++--- src/libcamera/formats.cpp | 16 ++++++++++++++++ src/libcamera/pixel_format.cpp | 9 +++++++++ 5 files changed, 30 insertions(+), 3 deletions(-)