{"id":22260,"url":"https://patchwork.libcamera.org/api/patches/22260/?format=json","web_url":"https://patchwork.libcamera.org/patch/22260/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20241209163418.330904-1-chenghaoyang@chromium.org>","date":"2024-12-09T16:34:07","name":"[v2] V4L2VideoDevice: Call FrameBuffer::Private::cancel() in streamOff()","commit_ref":"525325440b5047ac94ce96a33e03f233b8b3c59f","pull_url":null,"state":"accepted","archived":false,"hash":"52acc2da248dab4f9f5b5efeebab4750eeac0138","submitter":{"id":117,"url":"https://patchwork.libcamera.org/api/people/117/?format=json","name":"Cheng-Hao Yang","email":"chenghaoyang@chromium.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/22260/mbox/","series":[{"id":4867,"url":"https://patchwork.libcamera.org/api/series/4867/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4867","date":"2024-12-09T16:34:07","name":"[v2] V4L2VideoDevice: Call FrameBuffer::Private::cancel() in streamOff()","version":2,"mbox":"https://patchwork.libcamera.org/series/4867/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/22260/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/22260/checks/","tags":{},"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 EE1DFBD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  9 Dec 2024 16:34:26 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4DF7F67E6F;\n\tMon,  9 Dec 2024 17:34:26 +0100 (CET)","from mail-pf1-x429.google.com (mail-pf1-x429.google.com\n\t[IPv6:2607:f8b0:4864:20::429])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4213467E5F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  9 Dec 2024 17:34:24 +0100 (CET)","by mail-pf1-x429.google.com with SMTP id\n\td2e1a72fcca58-725ed193c9eso1025031b3a.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 09 Dec 2024 08:34:24 -0800 (PST)","from chenghaoyang-low.c.googlers.com.com\n\t(112.212.229.35.bc.googleusercontent.com. [35.229.212.112])\n\tby smtp.gmail.com with ESMTPSA id\n\td2e1a72fcca58-725dc0bb650sm3838227b3a.101.2024.12.09.08.34.21\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 09 Dec 2024 08:34:21 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"KT99WHbj\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=chromium.org; s=google; t=1733762062; x=1734366862;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:from:to:cc:subject:date:message-id:reply-to;\n\tbh=zcca79ogNy9mD8N5n1QtQBlRWuYc8jtxofBvdyoATPk=;\n\tb=KT99WHbjH3fjlee+jy1XBJn2Ne41G6t9je7I6samu/Hh5fMmPA+0RUTsUQLYKdq29W\n\tWPSdquzqdJIRuyexLrxDeKkQyXCHFL7Ocbe7unIIPH6LUDpGaymmcj7dxJ6fR2eLazIi\n\tV39DN+mFIb+CwEBpmuf+6TInYNvfqjeEIWJSM=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1733762062; x=1734366862;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=zcca79ogNy9mD8N5n1QtQBlRWuYc8jtxofBvdyoATPk=;\n\tb=sRGCTPAv/rHgLZeIgLgOJKlM2xIFl6+pVYqtQ6djbC5CwSqJ5U/4mg0MzxhbMxyDt0\n\ti+HDXXQdtpKHqnjXU5SQvThwzZPvowOekFJNO+D6wJWlak1KsUWdRtcww1rWDGkUcagI\n\trQvFDumKKe3NPdzHfhl85As8f/qUS7Tanlrf27/mb6N6tzgwZpmmuV/sXCE04cv7afmg\n\tNeF0gGk0mjhLIevNUcoqe7zwVUxjFTl4CtZdZRgszJXVfKpDraTHyIvZMABfCGgtEWvq\n\tNF2/QRV3/HoAbOOfNvikpeYDq1Hfe8COk7jkxoabc03JDkFki5EVqhyqJ2PEAwuWo+Bk\n\tGrhQ==","X-Gm-Message-State":"AOJu0Yxxmde9319zNDOzme7EzGCJM2rCQ1vRc50KTLEDVC8lezjE7GrB\n\tJmutIlhYnXTcJnwCaxrIh6P4GEpMDbcrnldVHciKl1XDen946UahHI8lUwZ5FcRajXIu8n30Okk\n\t=","X-Gm-Gg":"ASbGncuEmq0v1ai9kH8turk5ksN3CuTrjZviWlfKRJPJm6EVuHd4IsQJ0uyeRbk0uRO\n\t4FUpYe9fNPXMz8VHi7jh2J1G2B3LkJlovxrbE5eWnhA2gJn5VzvN0V62Sywbp5wtu7FWsoMpOHR\n\t7sGMmLeOZszQR2FCWDSNNTtx/eh9QEMeUVUQ5VoT143iT0jd+UsndnU2oybUGu5Ci3SSXZs0aCe\n\tDb8ILfgXE14B1XT3f6DjItFBZ03cmC2h9wCpQkHzPJX6yg+n3JeXZtvGrCYuIPBIv0hFx2uCpQy\n\tBGevX4C1TsoAKuQPIHHR5eAI/a1OKO1GHSuEgC2t7lum431BRUOV4Y9w","X-Google-Smtp-Source":"AGHT+IH9GxSKINO3ZF7gTeKK3MrwegWACHxevg1qtk2V1mMF7JauhntZJoXiFiYoN8UQKJvXvZIGsQ==","X-Received":"by 2002:a05:6a20:244f:b0:1db:e096:8497 with SMTP id\n\tadf61e73a8af0-1e1b19c0924mr1850592637.0.1733762062394; \n\tMon, 09 Dec 2024 08:34:22 -0800 (PST)","From":"Harvey Yang <chenghaoyang@chromium.org>","To":"libcamera-devel@lists.libcamera.org","Cc":"Harvey Yang <chenghaoyang@chromium.org>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>","Subject":"[PATCH v2] V4L2VideoDevice: Call FrameBuffer::Private::cancel() in\n\tstreamOff()","Date":"Mon,  9 Dec 2024 16:34:07 +0000","Message-ID":"<20241209163418.330904-1-chenghaoyang@chromium.org>","X-Mailer":"git-send-email 2.47.0.338.g60cca15819-goog","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","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>"},"content":"At the moment `V4L2VideoDevice::streamOff()` sets\n`FrameBuffer::Private`'s metadata directly, while that's equivalent to\ncalling `FrameBuffer::Private::cancel()`. To ease code tracing, this\npatch replace the manual modification with the function call.\n\nSigned-off-by: Harvey Yang <chenghaoyang@chromium.org>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/libcamera/v4l2_videodevice.cpp | 3 +--\n 1 file changed, 1 insertion(+), 2 deletions(-)","diff":"diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\nindex a5cf67845..5fcebdc63 100644\n--- a/src/libcamera/v4l2_videodevice.cpp\n+++ b/src/libcamera/v4l2_videodevice.cpp\n@@ -2007,10 +2007,9 @@ int V4L2VideoDevice::streamOff()\n \t/* Send back all queued buffers. */\n \tfor (auto it : queuedBuffers_) {\n \t\tFrameBuffer *buffer = it.second;\n-\t\tFrameMetadata &metadata = buffer->_d()->metadata();\n \n \t\tcache_->put(it.first);\n-\t\tmetadata.status = FrameMetadata::FrameCancelled;\n+\t\tbuffer->_d()->cancel();\n \t\tbufferReady.emit(buffer);\n \t}\n \n","prefixes":["v2"]}