Patch Detail
Show a patch.
GET /api/patches/22155/?format=api
{ "id": 22155, "url": "https://patchwork.libcamera.org/api/patches/22155/?format=api", "web_url": "https://patchwork.libcamera.org/patch/22155/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20241203095217.2155153-1-chenghaoyang@chromium.org>", "date": "2024-12-03T09:52:13", "name": "V4L2VideoDevice: Call FrameBuffer::Private::cancel() in streamOff()", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "ac16d0ee0ab43622d51a60db33fc73c2c66a4865", "submitter": { "id": 117, "url": "https://patchwork.libcamera.org/api/people/117/?format=api", "name": "Cheng-Hao Yang", "email": "chenghaoyang@chromium.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/22155/mbox/", "series": [ { "id": 4840, "url": "https://patchwork.libcamera.org/api/series/4840/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4840", "date": "2024-12-03T09:52:13", "name": "V4L2VideoDevice: Call FrameBuffer::Private::cancel() in streamOff()", "version": 1, "mbox": "https://patchwork.libcamera.org/series/4840/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/22155/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/22155/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 AC02BBDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 3 Dec 2024 09:52:26 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E1E7166085;\n\tTue, 3 Dec 2024 10:52:25 +0100 (CET)", "from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com\n\t[IPv6:2607:f8b0:4864:20::52f])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3013366072\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 3 Dec 2024 10:52:24 +0100 (CET)", "by mail-pg1-x52f.google.com with SMTP id\n\t41be03b00d2f7-7f71f2b1370so3357874a12.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 03 Dec 2024 01:52: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\t41be03b00d2f7-7fc9c38585csm9314633a12.61.2024.12.03.01.52.21\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 03 Dec 2024 01:52: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=\"fXlDx7KO\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=chromium.org; s=google; t=1733219542; x=1733824342;\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=1dasvx8DVzz+q3yF8nmiRlSGQmpBd0VNHnDGTdM5ozw=;\n\tb=fXlDx7KOa0ckOAclUdTbnIls5qh/BOlITgRdX7arsDjt78rzF0iOs2XKf4qNyvXS40\n\t4nVQMirUSoR+xEnZpb1bBw37q6uv1W4ACWX83ad6WcJsqZg0H5gfOWxMINeoIgwLM4/w\n\tJZV6gr4+R5Ll9Vh8pULbf6y0iZeqHECTVCMdU=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1733219542; x=1733824342;\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=1dasvx8DVzz+q3yF8nmiRlSGQmpBd0VNHnDGTdM5ozw=;\n\tb=I+kn10w17gYcUNq3vFs/wznSqW6o5+6quER2DtWE8iOMk4F6Gis5W8hhh4oYjtzDh7\n\tnQ4XTHJogWaBv5JuUCNpqappONKLVMciJuY9EYmYq500Amj94CuYefCk7xVkNKuAhSEH\n\tYqxKHOitX7Gesydk9723C1C+p3oB+CmvG5BI5ifWWp5LQgc9dPrLYAiAMyCxf5hyAd+L\n\tfv85C0pgxpxJE7peH8cAqBx0JA+ycPdSCmFzql+7XCwgT3Hku/kFVpksWtNQ8j9UIiQu\n\tpvFevRNymeGSEUU1W1sf33ZhcKD+cqgxW6kl0FdElEnS4baxtCWu1sqk5daQEPaBlmyi\n\trIXw==", "X-Gm-Message-State": "AOJu0YwsV+Jl7ZNVzYkdDCcpag6m7paKb6Zn8wtZho4sKC1dL53MvGxn\n\tYD8sTKUEBD+U9zCseWFT10VPVLv6bIhHABtDB/u7RLyJFSEv4dZvcSqVis+z2r9RImupAC89IB4\n\tWSQ==", "X-Gm-Gg": "ASbGncuo9YS1loF+E6+2mdK35x08RbPOHSFZThc/oxpiNq7d9MDgJOKYYrht5LcdoBe\n\tLFoKpCAjokTvBxOrvnPWWxa9U8JYKboKuvWFushBk6Gz1nTQ7RtoAaydXPsfgWeRAT8Y4cF+l5p\n\t4S5FNiNYrcSGuc4cyfVfVptDGA54H5Fgs8t28RDdN26OxeslMll/27WsBETSUwS4uGVSlBlCckG\n\tSVmoMI1uuPoxUGT4gNAL7Iuhp4Uvxk/cnKg2HsW84OuAUDzSQaW6KK0m/6Y/Mph5ceXvQ1ZQJoI\n\thKbhfhlSSMVVqZQXnYcBOJGg182s4DVyPGBsqcR/sZOTCXbvtJ11fvZc", "X-Google-Smtp-Source": "AGHT+IHteT4EHYd8M2F4k3DeKFMbDcEyoJm32M5umlTikqQY+b492i08BmrtR7iJahcDGzEufWRUaw==", "X-Received": "by 2002:a05:6a21:33a7:b0:1da:5bb:f8ca with SMTP id\n\tadf61e73a8af0-1e165334c99mr3735959637.0.1733219542298; \n\tTue, 03 Dec 2024 01:52:22 -0800 (PST)", "From": "Harvey Yang <chenghaoyang@chromium.org>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Harvey Yang <chenghaoyang@chromium.org>", "Subject": "[PATCH] V4L2VideoDevice: Call FrameBuffer::Private::cancel() in\n\tstreamOff()", "Date": "Tue, 3 Dec 2024 09:52:13 +0000", "Message-ID": "<20241203095217.2155153-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>\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..0558434cb 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+\t\tbuffer->_d()->cancel();\n \n \t\tcache_->put(it.first);\n-\t\tmetadata.status = FrameMetadata::FrameCancelled;\n \t\tbufferReady.emit(buffer);\n \t}\n \n", "prefixes": [] }