From patchwork Thu May 12 10:32:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cheng-Hao Yang X-Patchwork-Id: 15897 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 C53DCC3256 for ; Thu, 12 May 2022 10:33:09 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5195E6049E; Thu, 12 May 2022 12:33:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1652351589; bh=MW0offhMoJI/VCah591TiXh7bqFR0DpG7E9GcFsGS4Q=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=wPydZUyDwIGQiyJrPmiDlaq4HMokGoXv8ckBuDSG9AllFe9JUHy36IuoQ+sUSeii0 FUzpzM1PP2Ekkb6YpjOzRkyYaaRz5iD0CrV2QBGZPOXhmUbFCf/7D/oA/j4cDXNjYF uJSSD02OCL0ba9Vl36FlSVQ6HyiBc2XXiUhxsrOyc/GS8xwH8xGoweR/NqpOR/4g4n JIAF1VSeKEG0gDYX7Yc323pNagWKD3LO9jZC65rlrcgbkIrKv8dFk/TJOeZkDJ8gUr cZL768wbROVI/yDYPpzn7O7BfoydMW0qUlaOrQ14bXR4PR7DZ4oHXMhRPpR6G/C4t6 /MvpAC0XErcUw== Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7615C6049E for ; Thu, 12 May 2022 12:33:06 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="KLggY4gA"; dkim-atps=neutral Received: by mail-pl1-x635.google.com with SMTP id q18so4443104pln.12 for ; Thu, 12 May 2022 03:33:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/RLoL25Tv7rJr7zr2WqE+km06ZA1O+F8o2ekb2BaZe8=; b=KLggY4gAofckSdnpElKIaVomU+ofBq8ojFDltZ2cOCwq2DjDCedQdjq3Z3/slApWOD WsoAirNij/DHmdXIRTNxMSAkjLg5BZh3EEft07WT4lheTSkYKdx8qL2MBpA/uSJwGOO1 ESbMTlXPUql0pq9BkbLDl047oiCamIQbMCRKk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/RLoL25Tv7rJr7zr2WqE+km06ZA1O+F8o2ekb2BaZe8=; b=1SQm2E4uZf7HiJZx9rkW2ptcQR+f+aREDpEOpOM0x38V38VE/OoFayDSt+Wg+pzkNn WtdwKWNbJ2TI7qT1D7nKWsphAvLS54IZvAZlB2BGI510ELzxGaqWER0LE7r+20Iq5O2B Ivy4/QGgfi5sppYzvZUZiTK/yn3zAHTJNIQUdHodKAU5C+psSJUoVWZcGJfuR6eL4B5e pOdnreBU/gTBeDAMzKEe3jBoEk8s74vfcC6bmdj+UnJ8Gi6Zgqtuupw8TKYIPEZMCM8C h7nqlZtWRCu0oSmAAFxNCovglxfNZPD+pFHxcchQ7WsObGGg3du4BTPJhitsV9NE+X2D DtMg== X-Gm-Message-State: AOAM5329XwT5DtcuSKHCfEF/rpBZtFYSWVFUU1dK2JT53OhHuViTl7zL yBF81lmgmZ6lQ9cu7jVQJsIa4+om6KSraNz5 X-Google-Smtp-Source: ABdhPJxt7je/CJpTrF6EzosuK7pwJDrLTu30mWLi3pf4prYd0xvlplKLEAvDRV4p5UU4qYyLvuE48g== X-Received: by 2002:a17:902:ea11:b0:15e:ae19:f36a with SMTP id s17-20020a170902ea1100b0015eae19f36amr29750066plg.52.1652351584694; Thu, 12 May 2022 03:33:04 -0700 (PDT) Received: from chenghaoyang-low.c.googlers.com.com (174.71.80.34.bc.googleusercontent.com. [34.80.71.174]) by smtp.gmail.com with ESMTPSA id t19-20020a62d153000000b005087c23ad8dsm3402219pfl.0.2022.05.12.03.33.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 May 2022 03:33:04 -0700 (PDT) X-Google-Original-From: Harvey Yang To: libcamera-devel@lists.libcamera.org Date: Thu, 12 May 2022 10:32:51 +0000 Message-Id: <20220512103258.324339-2-chenghaoyang@google.com> X-Mailer: git-send-email 2.36.0.512.ge40c2bad7a-goog In-Reply-To: <20220512103258.324339-1-chenghaoyang@google.com> References: <20220512103258.324339-1-chenghaoyang@google.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/8] Add StreamRole in StreamConfiguration 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: , X-Patchwork-Original-From: Harvey Yang via libcamera-devel From: Cheng-Hao Yang Reply-To: Harvey Yang Cc: Harvey Yang Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" From: Harvey Yang To let ipu3 pipeline handler understand the usage of streams, this patch adds StreamRole member variable in StreamConfiguration, which should be set by the (Android) adapter. Signed-off-by: Harvey Yang --- include/libcamera/stream.h | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h index f0ae7e62..c9e79226 100644 --- a/include/libcamera/stream.h +++ b/include/libcamera/stream.h @@ -22,6 +22,15 @@ namespace libcamera { class Camera; class Stream; +enum StreamRole { + Raw, + StillCapture, + VideoRecording, + Viewfinder, +}; + +using StreamRoles = std::vector; + class StreamFormats { public: @@ -50,6 +59,8 @@ struct StreamConfiguration { std::optional colorSpace; + StreamRole streamRole; + Stream *stream() const { return stream_; } void setStream(Stream *stream) { stream_ = stream; } const StreamFormats &formats() const { return formats_; } @@ -61,15 +72,6 @@ private: StreamFormats formats_; }; -enum StreamRole { - Raw, - StillCapture, - VideoRecording, - Viewfinder, -}; - -using StreamRoles = std::vector; - class Stream { public: