[{"id":29366,"web_url":"https://patchwork.libcamera.org/comment/29366/","msgid":"<pF8OTYVx-w7KhoouPmjp_LlbEG6pDbxlFvGcO-2_pHNtQvJgQ_d79F6SiEOwoBAORMBk8M_AaorHH1tQnc6S_kCFEMs1JUPAtcCf_X0aR84=@protonmail.com>","date":"2024-04-30T19:27:41","subject":"Re: [PATCH v3] treewide: Query list of cameras just once","submitter":{"id":133,"url":"https://patchwork.libcamera.org/api/people/133/","name":"Pőcze Barnabás","email":"pobrn@protonmail.com"},"content":"2024. április 30., kedd 21:25 keltezéssel, Barnabás Pőcze <pobrn@protonmail.com> írta:\n\n> This is more efficient since only a single vector will be constructed,\n> and furthermore, it prevents the TOCTOU issue that might arise when\n> the list of cameras changes between the two queries.\n> \n> Signed-off-by: Barnabás Pőcze pobrn@protonmail.com\n> \n> ---\n> \n> changes in v3\n> * drop std::move() from this change\n> * extend note in documentation\n> * limit scope of `cameras` in `CameraSession::CameraSession()`\n> \n> changes in v2\n> * fix code block in documentation\n> * add comment noting that the camera may disappear\n> \n> ---\n> Documentation/guides/application-developer.rst | 12 +++++++-----\n> src/apps/cam/camera_session.cpp | 11 ++++++++---\n> src/gstreamer/gstlibcamerasrc.cpp | 5 +++--\n> 3 files changed, 18 insertions(+), 10 deletions(-)\n> \n> [...]\n\n\nSorry, please ignore, I resent it by accident.\n\n\nRegards,\nBarnabás Pőcze","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id BBD4CBE08B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 30 Apr 2024 19:27:47 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 603DF6341D;\n\tTue, 30 Apr 2024 21:27:47 +0200 (CEST)","from mail-40134.protonmail.ch (mail-40134.protonmail.ch\n\t[185.70.40.134])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3D9B063418\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 30 Apr 2024 21:27:45 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=protonmail.com header.i=@protonmail.com\n\theader.b=\"HKHcGdn7\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;\n\ts=protonmail3; t=1714505264; x=1714764464;\n\tbh=LnrlbxLtYYjW4C0DlJJN2JrN8u6FQfpE/8grkz7ATYQ=;\n\th=Date:To:From:Subject:Message-ID:In-Reply-To:References:\n\tFeedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:\n\tMessage-ID:BIMI-Selector;\n\tb=HKHcGdn78IqTJeDkAHLnmMgniLaOcuqh8fwEWVYqIjkblslQ40wN6I5iYudEYBmMJ\n\tp3gKn1phaLholqZQXYdPX5/RRG1uXPuOOdTGROQRnTd6sfYI+3rmN+lJCIraxmEUGI\n\tKbiV50Esuo7t88Jp7bDwnUFvNoAOH8NaY8Vih6Qn1jNAs31VrVs3mTASe6g0pqXQrj\n\tBlc3HwxpDqYSiMN1yT6LOb42G25VItXdF31S2KytcqvwdwlyprQO2gGaAVCzVSW9xT\n\t3iIqIf/FWQCMKoeAsbE0Y9S2bDZsVxvomNT09ILlbEVGVjIfkFMJn1/CInNaiC0pcq\n\thKZVvN+vW/6aQ==","Date":"Tue, 30 Apr 2024 19:27:41 +0000","To":"libcamera-devel@lists.libcamera.org","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <pobrn@protonmail.com>","Subject":"Re: [PATCH v3] treewide: Query list of cameras just once","Message-ID":"<pF8OTYVx-w7KhoouPmjp_LlbEG6pDbxlFvGcO-2_pHNtQvJgQ_d79F6SiEOwoBAORMBk8M_AaorHH1tQnc6S_kCFEMs1JUPAtcCf_X0aR84=@protonmail.com>","In-Reply-To":"<20240430192543.779374-1-pobrn@protonmail.com>","References":"<20240430192543.779374-1-pobrn@protonmail.com>","Feedback-ID":"20568564:user:proton","X-Pm-Message-ID":"7dbbd8b6f4315aeaec0e6efb2c7dfcffb3439f6b","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"quoted-printable","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]