From patchwork Thu May 26 08:27:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harvey Yang X-Patchwork-Id: 16050 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 3837ABD161 for ; Thu, 26 May 2022 08:27:52 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C76696566B; Thu, 26 May 2022 10:27:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1653553671; bh=1K4XxfbF/A4NXjuuloZdN9XN+KSBjmVfu7DKtWqF/G0=; 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=bG1f9t3/Qbkr7MahYuiZn4zALPOZnkcD/VPhFKeU3Dt4YoaYDmN7Ryj95gCXMdw0r a49axmKl7ICvHIg/QfuGPm3yIeiJ8fmNkZ0IoNRmBwODA4VvQD9hA99EQKWcx3WJps 7xovV8r+kYRSkaLH89pX8itPBpvaFMfixhzW5wm0t1Vs2STwIQML9drU5mPLdE64kj ieYTVDO2EhisYJ+3wHNykRT21UnGSHlvsVwd3GyumLgRswsbf4lh2Ec7lfGIUgNqa7 nmamRQomszP6XStP7cmto/puGCL+jDKvQotkdo3Rbz610jyK1Ce+cB5sVJmGC1fDiD uekALcIitxzjA== Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5963B65661 for ; Thu, 26 May 2022 10:27:48 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Y6B435tF"; dkim-atps=neutral Received: by mail-pj1-x102a.google.com with SMTP id o10-20020a17090a4e8a00b001df2fcdc165so3829890pjh.0 for ; Thu, 26 May 2022 01:27:48 -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=M+Ps0wwMRSHDTK6TtrIDjEssnLfjyE4zU0Op6qAgYBo=; b=Y6B435tFN9OVyZAKyLA9ro4z6wbgVfv7UfP/z9tC5OLT5ybtJ03nx1Zt8YPizORd/9 9HduTWD6my/rTJL6kkdLnYVv4uEmSuwPpMoBqGDOLTMO8CrHCg8ypoTmkmRd/wtnH+8I j2vETHXTRpiwsjGMLiapyulJIpqmsvENR7QmE= 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=M+Ps0wwMRSHDTK6TtrIDjEssnLfjyE4zU0Op6qAgYBo=; b=4zw5o12R/Yrb3AchXycXsQxeeKrgKTB0kQAmrGwbsWPdJMEttoOgB03shAImC5Lyc4 pikBCfvKIZFjLMe1P52q5gXAQsVUGpzvJ+xHhmCK+ogN80auU3/NDLFk7AJ7kQwD5Dlp fdeu531nVUCwbm703XzS18cYTOfLicS5pHaSFE59m2MOnuz5MCAb/faN/vHcr0sFdEAm Mk/J3DdB4K2y88a5ssUX7lRZZgH7j6OY2yJlov2gre1jFBfVzXFCOdjl9/X0PT1z3ClU Ff63r9pii6tsNqSn/AMAG9G1alGK2+VtiAqr4xErHwAUhzq0im+wf9IDUHIm+qe7xzyb PURg== X-Gm-Message-State: AOAM5331Ybv50Q7GUNcYL9E2m67mmk6xMAO7fFAT4AG/k51dFSjg02hl RbIiEEO/2ILGXYwcMsXAPgpiE5J3eD9ui8cf X-Google-Smtp-Source: ABdhPJxoTv9g57ECCBk8LzfOXYHIdfK1ppu6fyKzhWcLzofACNujzJrgukSHwBU8prptcMk9HVcQrg== X-Received: by 2002:a17:903:22d1:b0:162:166:6a96 with SMTP id y17-20020a17090322d100b0016201666a96mr27330203plg.127.1653553666329; Thu, 26 May 2022 01:27:46 -0700 (PDT) Received: from chenghaoyang-low.c.googlers.com.com (21.160.199.104.bc.googleusercontent.com. [104.199.160.21]) by smtp.gmail.com with ESMTPSA id m2-20020a170902bb8200b0016191b843e2sm834429pls.235.2022.05.26.01.27.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 May 2022 01:27:45 -0700 (PDT) X-Google-Original-From: Harvey Yang To: libcamera-devel@lists.libcamera.org Date: Thu, 26 May 2022 08:27:29 +0000 Message-Id: <20220526082737.1081262-2-chenghaoyang@google.com> X-Mailer: git-send-email 2.36.1.124.g0e6072fb45-goog In-Reply-To: <20220526082737.1081262-1-chenghaoyang@google.com> References: <20220526082737.1081262-1-chenghaoyang@google.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 1/9] 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: Harvey 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: