From patchwork Mon Jul 27 15:18:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kaaira Gupta X-Patchwork-Id: 9017 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 6CEA4BD878 for ; Mon, 27 Jul 2020 15:18:37 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 022966138C; Mon, 27 Jul 2020 17:18:37 +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="Q732CZPK"; dkim-atps=neutral Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C3724605B2 for ; Mon, 27 Jul 2020 17:18:35 +0200 (CEST) Received: by mail-pg1-x529.google.com with SMTP id t6so9769944pgq.1 for ; Mon, 27 Jul 2020 08:18:35 -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=xeCeyDL5w9B5ia54BFWRKyIvdw7D3ktsq0L3UmvD+SM=; b=Q732CZPK19151Uya5TJKc5zQFb78gosb5Xl5abGBHSDuC8WoXggIoUBbl9Lc0TNa6B Ijc3Ha6qw/ivHcP+6HcWRT6nIiHMu2Tj7Ew3sfbqdlpQ5f2pmdW7LxTRLSoPSRQCmcjy Ur6advObpAbVPjwkdldsASCrtDswo9I7oEBuIZ7loP/LaIEiMNbXYoVUWH5LU8OtTCdf WW6Wm76L++Y5Lla342g3W+s9JU4lMEOzglUFpyWkge+slI/MfLUWpAQPb/qIj2imh36E 0FKFzZjUDPQyVo1bgE2lcwrdYmnB4RgH3c5myzOhuxxEWeyitulvMzoOICVk1yXXnQFl BPMw== 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=xeCeyDL5w9B5ia54BFWRKyIvdw7D3ktsq0L3UmvD+SM=; b=JEat+V+t2/pgfkVvuwtOxQZjWzblYLioa/uq+QJkXCKXydkX2VFhs50Ap8rrPK2QTv Vo9OwSgzIz/AdcMMpm73k7EIYWiduOJWopq/uHUgBy17fq7kD7T+MMnOvDMMlA7P/sb1 4g8dv5ML5qgvsARTq/fmIfZYSspextozk6huDYcg/UPw6oDZhWffCGImjUNlNYbsd3v9 gRQUnekUOGCYkfSh7mEnAgAPzh1gATU6QuEtogDswWe7tbH0VATS0ymeG8cMqW0dy0qH Cd80EqGaPDA/CqSI/bNo+Z1emtK15JslgGPCMB8MiO0cedKvxpM6kIPxwX/8riB0CyLQ khbQ== X-Gm-Message-State: AOAM533ZnpOPDcgsrcsJqVBUtrmRgOyA5+0slFnmwrrWU0jHV0nXS/bJ 0qhQ7bAiAP4oGRwoUwUaRlm7lg== X-Google-Smtp-Source: ABdhPJznlZgeYgFRTXIPMC8aE+S42TjNcdeDybHyn//eDYnoy/6qN6DiLiEVr6IRX8ji/hb2gGyD2Q== X-Received: by 2002:a63:184a:: with SMTP id 10mr19615827pgy.446.1595863114129; Mon, 27 Jul 2020 08:18:34 -0700 (PDT) Received: from kaaira-HP-Pavilion-Notebook ([103.113.213.178]) by smtp.gmail.com with ESMTPSA id f2sm15442302pfb.184.2020.07.27.08.18.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 08:18:33 -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 20:48:17 +0530 Message-Id: <20200727151820.24466-1-kgupta@es.iitr.ac.in> X-Mailer: git-send-email 2.17.1 Subject: [libcamera-devel] [PATCH v3 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. 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 | 20 ++++++++++++++++++++ src/libcamera/pixel_format.cpp | 9 +++++++++ 5 files changed, 34 insertions(+), 3 deletions(-)