From patchwork Wed Sep 13 15:20:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harvey Yang X-Patchwork-Id: 19003 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 47AC4C3260 for ; Wed, 13 Sep 2023 15:21:59 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D0923628F5; Wed, 13 Sep 2023 17:21:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1694618518; bh=7wyAeWN9DiM76aMmjbmuweH7TQ5Qd+vPLgiFqkRgYNk=; 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=qHHR0RM8EGkj24w3X8vHzeSNlS3eT15QHf1xVzN5rpQsXS9XZ7W3Zz4uVvZQu4aCl Lf1WSiHljh6xYabpOIOea5+rCPeRJaNHUy6VbPyeesfbs+l41FmxTQHeKmhDibykBy VyBzkuQ3AtDOg11693ifEWQBbi9FwtY1+yIf8rns1tPPtqHr8q0phhcG2ujBiRu46B /15WpPtcvTGjXsuqVfL0yL6a+khi1mB467vjuH5x4AVSjVNg1a0o82wKNuAnFu6tlc YW+qRWOVt6scCyrl58UltgjIOYUGg412cmM+2kVJvhvF0mrisqs5i3A30+xY/mI0yk Ykro6S7AtSeMw== Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1BE00628E9 for ; Wed, 13 Sep 2023 17:21:55 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="QKiPaU0+"; dkim-atps=neutral Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-68fb7fb537dso3439186b3a.2 for ; Wed, 13 Sep 2023 08:21:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1694618513; x=1695223313; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jk7pfldNzCJwQleRpZrxfVkyNI5YMWShVSWjUWvQM1I=; b=QKiPaU0+KPzgKPjkFeMEg+6n+c2iKl8Dh+CoDZEBXBSZSVjKExJNVXp5chPHj/uAdR Jx8Bf/0p6Ij2N2c89nMq5WoEuvLbPxk0OIKg3/x4DxMdzMeP2tzrWmTF5PxLGnD5aInR g0NhRsem8SQZ2xrOSrmpRYj32KgGPNVwAF4wo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694618513; x=1695223313; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jk7pfldNzCJwQleRpZrxfVkyNI5YMWShVSWjUWvQM1I=; b=DqFqUqjjb8dKzJOMqgr+Dktlo/ia4UKwM9Ft5oCHDFghpR5ohLLLzMvSW/G1pXL4Mu xyrIupaHv79QY8TM63ZaNZnqvhE62IYfYZsxV6CLwH+9Tp3HrfatgPEH5nMBSd583cXB /hQIsVW9pwBN/dElg8w2i9TgMZSabXBe95FIpVx8fmr6Ui/7UoXSbLlda0i0vi3a3cO7 obRLSOoNJSH/XhkVIpR3rGnlb3OYHeLkzbH4UECNsw7xDLAs9+59skrUG7vQqHi9pL16 W/Xjz/R0Bz50tWePjPXxBnGuTCsv47fOqHF3FAITM5yCNVAsZ1KwYcxSTVF2W/Nm/VaE TW0Q== X-Gm-Message-State: AOJu0YzNBLo38UJvsBhDVaAAO1uHmdZ7sX3dUaBZHArEs4CEEFM4RHxK wlpJvVt2/YYTWZM/VDt3SyRu5BIp+FjW6OjtCOw= X-Google-Smtp-Source: AGHT+IFrs9j38fPlKkxVwCZOAeTsCMBRyc2VaZxFescPIVfCVgPlDhcICkbDOFKHsOHtXR7mpfIDdA== X-Received: by 2002:a05:6a00:2d8f:b0:68f:dd50:aef8 with SMTP id fb15-20020a056a002d8f00b0068fdd50aef8mr3378920pfb.4.1694618513042; Wed, 13 Sep 2023 08:21:53 -0700 (PDT) Received: from chenghaoyang-low.c.googlers.com.com (198.180.199.104.bc.googleusercontent.com. [104.199.180.198]) by smtp.gmail.com with ESMTPSA id b26-20020aa7871a000000b006887be16675sm4922463pfo.205.2023.09.13.08.21.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 08:21:52 -0700 (PDT) X-Google-Original-From: Harvey Yang To: libcamera-devel@lists.libcamera.org Date: Wed, 13 Sep 2023 15:20:50 +0000 Message-ID: <20230913152146.636483-2-chenghaoyang@google.com> X-Mailer: git-send-email 2.42.0.283.g2d96d420d3-goog In-Reply-To: <20230913152146.636483-1-chenghaoyang@google.com> References: <20230913152146.636483-1-chenghaoyang@google.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v1 1/1] Android adapter: CameraDevice fixes shared internal buffer 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 In CameraDevice::processCaptureRequest, we might need to add an internal buffer for Mapped streams. This patch fixes a case that more than one Mapped streams depend on a stream that is not requested in one capture request. Change-Id: I37a1bcc9c4c2db666a90d74c39883ff18ed11bd5 Signed-off-by: Harvey Yang Reviewed-by: Jacopo Mondi Reviewed-by: Laurent Pinchart --- src/android/camera_device.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp index 1f7ce440..25cedd44 100644 --- a/src/android/camera_device.cpp +++ b/src/android/camera_device.cpp @@ -1077,7 +1077,7 @@ int CameraDevice::processCaptureRequest(camera3_capture_request_t *camera3Reques descriptor->request_->addBuffer(sourceStream->stream(), frameBuffer, nullptr); - requestedStreams.erase(sourceStream); + requestedStreams.insert(sourceStream); } /*