From patchwork Fri Sep 15 07:57:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mattijs Korpershoek X-Patchwork-Id: 19010 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 3A111C32B0 for ; Fri, 15 Sep 2023 07:57:36 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6C57D6291D; Fri, 15 Sep 2023 09:57:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1694764653; bh=4ps3su9sccE3KcyunR2qOZ3yin2JQeACKjKB208QI34=; h=Date:References:In-Reply-To:To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=JlDE/qfRL5o7hNr9tKXJZIGgHWljhAqwp4hyYXBmweREhdF8GNnCech20T11Hpi5o Y62sIUPk5Szso39sFXx4ZsghNuGip2UpXCaCalxDEJcBSJFC1LRR9ELxy5f1Ogu7gG HTvBKgqA3WE0VLMCa5WbsefDQ32G1ChO14BlCHA4loUzKsW1+sj4ybK4glzsc58QbX 7Ou6GGRRRUps8OyUD3ZDvVFfMIGmwmaq9a3kn9szdudw0aMfDR/q6BqZIxj3o7GZkO JEMV40yZWJ8PAzynL8VLw6AECvPie/SIXDXad5Qhj3f/dZM5MwPNp21l0RkLmOd2RJ UJZAZNej5rrTQ== Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7200262911 for ; Fri, 15 Sep 2023 09:57:30 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="CFwB92r3"; dkim-atps=neutral Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-307d58b3efbso1673981f8f.0 for ; Fri, 15 Sep 2023 00:57:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1694764650; x=1695369450; darn=lists.libcamera.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=q8b8Y5ZxAxJoxZYo1iZ+1EV95/CTGwBGZwZrmCm9cTk=; b=CFwB92r3B0RJ5ySxaKY5kCtE8Z+gv3AuaY0jq4T2ySHhBNvi1hVezkULPCTU3bX2AD 75nADo/Wv5gfOLxBJpEHtk+D+njeuA/KZmkR2/M15vXoXTdHvRs3JzAWnD9h24wIxju0 i7uk3NaxjATA++CcQ4C1KnEbb5NGx4CkY34IBnowjSWvAgnKEJky9AaA+mbjqWfFCRM/ QD52+wkM4m/UVUNEAPex0nLZf/yZxAnEwa1gysU8nxFdNOjGjcWHcnzOAjHYoApaFI03 pB7cQ9CXMsOl5wewFiJijynogighXmDEgONtroqOf50zvyPu3BrbQEnQKk556IquFJ4X Ag9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694764650; x=1695369450; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=q8b8Y5ZxAxJoxZYo1iZ+1EV95/CTGwBGZwZrmCm9cTk=; b=bB1ZaddDfmQGENdWWsE6GVhOfl3f4gp/NrjxqzL26WsRLxPyaShMoeUszUvlXzRRLW yyA4xCIUYeWtcMOrMgEU09RwDqY7aQTIs9aniH3FhqmZBkgjzl4r6o9R1VsLHifbuIBv Nyf0P04psaHlWeMjUcIVRNPhzPrd1zZtwBaKRM/VSF5BMnTQfQ4KObJq/ElDeKhFLc/g rSDtmAgPu871q6MXgS64xF8PNV+XqnbVq/pkWD47UV7m9sy00WX3tW3b0MFSH+kTm78T 59KpnG3DmJD99kZ+VEK36lvx4tj9GzB24WImbXy4Pc2fNHlTGUKRO3xN+x85+dJLUWpN +a9g== X-Gm-Message-State: AOJu0Yy7jFnixZAY/sU4VlLm+iJdsgPpfjaY2V00wCusK4Fc78xYt7B1 VyvZ2c848qnoT1J7EKROATrBJGffzVatv98vASk= X-Google-Smtp-Source: AGHT+IEnFidxUslLAIz8lykDzfVgh4ciiXc6ftDajrKB5KwNJ3dXqWnAWJ8gydLMoEZ1ztxJ6IGWcw== X-Received: by 2002:a5d:534c:0:b0:314:1f1e:3a85 with SMTP id t12-20020a5d534c000000b003141f1e3a85mr638608wrv.61.1694764650073; Fri, 15 Sep 2023 00:57:30 -0700 (PDT) Received: from [192.168.1.20] ([2a01:cb19:8704:be00:4f55:bd9d:611a:6c8e]) by smtp.gmail.com with ESMTPSA id m2-20020a056000174200b0031fe9a47a87sm2506942wrf.112.2023.09.15.00.57.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 00:57:29 -0700 (PDT) Date: Fri, 15 Sep 2023 09:57:28 +0200 MIME-Version: 1.0 Message-Id: <20230915-libyuv-convert-v1-4-1e5bcf68adac@baylibre.com> References: <20230915-libyuv-convert-v1-0-1e5bcf68adac@baylibre.com> In-Reply-To: <20230915-libyuv-convert-v1-0-1e5bcf68adac@baylibre.com> To: libcamera-devel@lists.libcamera.org X-Mailer: b4 0.12.4-dev-6aa5d Subject: [libcamera-devel] [PATCH RFC 4/7] android: camera_device: support when no Direct stream is found 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: Mattijs Korpershoek via libcamera-devel From: Mattijs Korpershoek Reply-To: Mattijs Korpershoek Cc: Guillaume La Roque Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" As the comment states, it's possible that the first element in streamConfig.streams is a Internal stream. In that case sourceStream stays a nullptr and all the Mapped streams are mapped towards a nullptr. Make sure that the Mapped streams are mapped to an Internal stream in case that's the first element. Signed-off-by: Mattijs Korpershoek Reviewed-by: Laurent Pinchart --- src/android/camera_device.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp index 1f7ce4402b63..d34bae715a47 100644 --- a/src/android/camera_device.cpp +++ b/src/android/camera_device.cpp @@ -724,7 +724,8 @@ int CameraDevice::configureStreams(camera3_stream_configuration_t *stream_list) * be used when constructing the subsequent mapped * streams. */ - if (stream.type == CameraStream::Type::Direct) + if (stream.type == CameraStream::Type::Direct || + stream.type == CameraStream::Type::Internal) sourceStream = &streams_.back(); } }