From patchwork Wed Jun 29 10:30:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harvey Yang X-Patchwork-Id: 16427 X-Patchwork-Delegate: umang.jain@ideasonboard.com 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 77D16BE173 for ; Wed, 29 Jun 2022 10:30:28 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 2823A6563B; Wed, 29 Jun 2022 12:30:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1656498628; bh=IIm2cZngUsiUEYkBau8iCGgMAohwfeH0xvQ4TnD+wKg=; 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=uaB1mU5kbZAkVKvQg8+bqTvfdblaRXJ8hPwwpQ5QecCqru4sc+Rr9COe0CyWyOhuB s/0SUGTfX+ib+n1UYoPqXZ3XadmfKKIV5aZ3BcV0hjIq7ICJNVG8NVvbpjmTPhJmcy T9CivgJ/xR9YwfA6bkCkktlEvo/oBhtmtM8nmZPBygDBw/Qg6d7JCTrNGOZFHSs+Cc nh30pe67iPGHmfi5LGhcZuV+Ml7K/uQ5fKu620Uelwcn+k/e5iDfB78Ty7MYO9x3SH k/22G1LtM/4dLRpPlCPzXwQFBXl+cnvzyTxWYXrl/xthP9/Gw6d0a3OVBXX2K5N3wq 2HmopdWccSgYw== Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 2038060412 for ; Wed, 29 Jun 2022 12:30:25 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="LA744NiW"; dkim-atps=neutral Received: by mail-pg1-x52b.google.com with SMTP id h192so14932003pgc.4 for ; Wed, 29 Jun 2022 03:30:25 -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=9ri2f8MX8DhxAdhDF8VN80ETHfxE4jKgxPQyULCGKnc=; b=LA744NiW7UlzW9vIfZDj7/v552FxavCA9vttsDhT8tKUQVXxz+CaGNFow3ZFCXxIXl 6hquxxvbIs3DqM7UcviRd8WMgfQpfLTo28Aq5zSD9VnhtBz9ywn09mowu/IH9J/1YPlu BNXWnotvwLCOuoUvjh98Rnv9bEh3BpALu8w+U= 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=9ri2f8MX8DhxAdhDF8VN80ETHfxE4jKgxPQyULCGKnc=; b=ATqKhfEm9h5ZgA0MtyJ2KAqkA651W/fBVirtKR6Ixd+nxt0XibjBpiJY+bge84b3LL BkINv4BtkDH28ST3gYNraInhz+3rms7BkYH0BeuzkjZy92RP+ku/znTeWrCquTeJokmN 1sKpceBbRtAVaSvYfnJJdvfAMNqJtATA+LBcJ2lh1q2Qru2xGMllV5YestwnCp33aHk6 uFCCP1xm7C1LCT71XYCyyMApWFnSRa3/97Jw6jM6akwm6/t3NTosz1UxTnCa6d9u+AMF Gn31n6Rf8tvOzhZhmKdGbCGo+sC5i19ZbfY2OCM9LzSGczUapFfmhaUagKvCv18PDhGh VLNA== X-Gm-Message-State: AJIora+sDBwgO0QvK0ocx18M/y5BmKlFZ1wXjTOtc+7rohMJ1G2qDnrq 4VCamAYhvvef5VdjuonkU6N/1NnbhzUaXLzK X-Google-Smtp-Source: AGRyM1uy9DIBwM1WeWKSeA3rZw+yn/gmN24EH+cz1N9pmtlL4HVorwyHOx1iH5B5Jpy4T1JFjaH0ow== X-Received: by 2002:a63:ff19:0:b0:403:7c60:ae96 with SMTP id k25-20020a63ff19000000b004037c60ae96mr2378351pgi.466.1656498623544; Wed, 29 Jun 2022 03:30:23 -0700 (PDT) Received: from chenghaoyang-low.c.googlers.com.com (208.158.221.35.bc.googleusercontent.com. [35.221.158.208]) by smtp.gmail.com with ESMTPSA id jb4-20020a170903258400b00169071538a0sm10946059plb.267.2022.06.29.03.30.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Jun 2022 03:30:23 -0700 (PDT) X-Google-Original-From: Harvey Yang To: libcamera-devel@lists.libcamera.org Date: Wed, 29 Jun 2022 10:30:10 +0000 Message-Id: <20220629103018.4025635-2-chenghaoyang@google.com> X-Mailer: git-send-email 2.37.0.rc0.161.g10f37bed90-goog In-Reply-To: <20220629103018.4025635-1-chenghaoyang@google.com> References: <20220629103018.4025635-1-chenghaoyang@google.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 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: