Patch Detail
Show a patch.
GET /api/patches/23207/?format=api
{ "id": 23207, "url": "https://patchwork.libcamera.org/api/patches/23207/?format=api", "web_url": "https://patchwork.libcamera.org/patch/23207/", "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": "<20250422142010.13064-3-jaslo@ziska.de>", "date": "2025-04-22T14:10:59", "name": "[2/4] gstreamer: Log and check adjusted camera configuration", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "485df99a2f127b5dd025b5e3e79388345a7a386c", "submitter": { "id": 173, "url": "https://patchwork.libcamera.org/api/people/173/?format=api", "name": "Jaslo Ziska", "email": "jaslo@ziska.de" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/23207/mbox/", "series": [ { "id": 5140, "url": "https://patchwork.libcamera.org/api/series/5140/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5140", "date": "2025-04-22T14:10:59", "name": null, "version": 1, "mbox": "https://patchwork.libcamera.org/series/5140/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/23207/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/23207/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 A9AE0C331E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 22 Apr 2025 14:21:01 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CCC2A68ACD;\n\tTue, 22 Apr 2025 16:21:00 +0200 (CEST)", "from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de\n\t[81.169.146.218])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DBE7368ACE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 22 Apr 2025 16:20:58 +0200 (CEST)", "from archlinux.fritz.box by smtp.strato.de (RZmta 51.3.0 AUTH)\n\twith ESMTPSA id z34f8113MEKwRI2\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits))\n\t(Client did not present a certificate);\n\tTue, 22 Apr 2025 16:20:58 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=ziska.de header.i=@ziska.de header.b=\"FJRvclsX\";\n\tdkim=permerror (0-bit key) header.d=ziska.de header.i=@ziska.de\n\theader.b=\"7kr5YD5C\"; dkim-atps=neutral", "ARC-Seal": "i=1; a=rsa-sha256; t=1745331658; cv=none;\n\td=strato.com; s=strato-dkim-0002;\n\tb=Gu2U6yR3wEQdELocVBnlduwFxjsMPuQ0xxr+MGgTnSqOLIDHf4A4qUndA+4iOgSrkr\n\tlQN630xEYSQZbjkre/hm87rl/TS/NP/TTd/nyiy4aT9B4f79QZG2gI6Svxs5siqEgV+l\n\t+nYyAjDlhLYXm+GgBX3XRxjEEGKiXqHRjGsa8+7kxOaix87mfyoJCVW3BQh3KB8uTuaN\n\t9WslXl6vNIoSXlfRZ5BsJC1wNVHyTQ9DkOvkL7xE8TIJwHakBX2TfM1Nn+V2fpM+E03b\n\tx7SkB8AbDHClP1X9M4JIgqTc2RzBzLJFMxHzL7fkdHoWf0kBAZES03Z37VjWN3A4Cobh\n\tuZag==", "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; t=1745331658;\n\ts=strato-dkim-0002; d=strato.com;\n\th=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date:\n\tFrom:Subject:Sender;\n\tbh=FTJWKLMamVcNrvryPvG+sPyvytk+8sPDvTre7cAhE4w=;\n\tb=lVS6at3nm8QQqKK7E0xxigstEKz6qW4Mr3VGhdjf1tOjblNN51lwPaLOinC5kBX+VQ\n\t619jLmeKZScDIJOFy9+Gmb0Ij6exF6nBT7JVC0+3CdDdgYWUWYYBxDjg+crII0DO6RYw\n\t8UUQfaffX5jNhkSs3HqG7+sLb5+QJIW7ufxtKoXZSkTCkI3ycG8tRVqYiPCgLRmXiqbV\n\tagq6SOHXP83pyTU39ZDJW9cedvjcN/y0BGssa2GLJsUUNF2zqP3+zrXj2Bw8nvmAD2Sv\n\tzL1OnL2n0CMPT8pODd19c5Yd2g6tTvMRi4HJFQl/fvxZj1didMsYEOiFRXzd1ZQFNjSz\n\tMswg==", "ARC-Authentication-Results": "i=1; strato.com;\n arc=none;\n dkim=none", "X-RZG-CLASS-ID": "mo00", "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; t=1745331658;\n\ts=strato-dkim-0002; d=ziska.de;\n\th=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date:\n\tFrom:Subject:Sender;\n\tbh=FTJWKLMamVcNrvryPvG+sPyvytk+8sPDvTre7cAhE4w=;\n\tb=FJRvclsXFpe4aPdDNwhO+LwjYVDBt+GynN2jANbZhkB3/UYfEl5Gvc7Qq8rIITnH6f\n\twWumAPZGo6LhVodU5bCgNh5sCE6UBNA8STaZhdwxiMWvNSec9F313kOpKDHqRRicm5Qg\n\t6pe1Avn+HPQYsS3iD355DniIWk4gRA77izIROjNaKd3a+z88X9cmUCM9zg86gl11EZ0f\n\tngpXX7mUqj/4WFIXEArwdyJZHePZj1AMhh6IIIvQHM19Wrv8Z6dzQW2wBHaLi++f4GSw\n\tdZ8PfxsmK7OCLGuZPmOlUJxUrblhN03WKIV79Lsgd8WbTPs6fhKiejWfeA7cuadUtf18\n\tDIcQ==", "v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1745331658;\n\ts=strato-dkim-0003; d=ziska.de;\n\th=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date:\n\tFrom:Subject:Sender;\n\tbh=FTJWKLMamVcNrvryPvG+sPyvytk+8sPDvTre7cAhE4w=;\n\tb=7kr5YD5CWvv2GAmWF0t6EqTg5z3MMI7VY1u2Uj+MyZ7OWXLfALemPEeBYYpmjN9aF5\n\tY8HJAJ2BYzR0TuC7b6Dg==" ], "X-RZG-AUTH": "\":Jm0XeU+IYfb0x77LHmrjN5Wlb7TBwusDqIM6Hizy8VdfzvKi4yoFC9cCgYrrBvJaIR9ymoISrfhsHWODCRPggeTRCTeK\"", "From": "Jaslo Ziska <jaslo@ziska.de>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Jaslo Ziska <jaslo@ziska.de>", "Subject": "[PATCH 2/4] gstreamer: Log and check adjusted camera configuration", "Date": "Tue, 22 Apr 2025 16:10:59 +0200", "Message-ID": "<20250422142010.13064-3-jaslo@ziska.de>", "X-Mailer": "git-send-email 2.49.0", "In-Reply-To": "<20250422142010.13064-1-jaslo@ziska.de>", "References": "<20250422142010.13064-1-jaslo@ziska.de>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain; charset=\"us-ascii\"", "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": "As CameraConfiguration::validate() might alter the configuration\npreviously negotiated with downstream, log an info when this happens as\nGStreamer source elements are not supposed to do that.\n\nAlso check if downstream can accept this new stream configuration and if\nnot, return a not-negotiated error.\n\nSigned-off-by: Jaslo Ziska <jaslo@ziska.de>\n---\n src/gstreamer/gstlibcamerasrc.cpp | 11 ++++++++++-\n 1 file changed, 10 insertions(+), 1 deletion(-)", "diff": "diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp\nindex 12bf8de0..2d9db342 100644\n--- a/src/gstreamer/gstlibcamerasrc.cpp\n+++ b/src/gstreamer/gstlibcamerasrc.cpp\n@@ -455,8 +455,13 @@ gst_libcamera_src_negotiate(GstLibcameraSrc *self)\n \t}\n \n \t/* Validate the configuration. */\n-\tif (state->config_->validate() == CameraConfiguration::Invalid)\n+\tCameraConfiguration::Status status = state->config_->validate();\n+\tif (status == CameraConfiguration::Invalid)\n \t\treturn false;\n+\telse if (status == CameraConfiguration::Adjusted)\n+\t\tGST_ELEMENT_INFO(self, RESOURCE, SETTINGS,\n+\t\t\t\t (\"Configuration was adjusted\"),\n+\t\t\t\t (\"CameraConfiguration::validate() returned CameraConfiguration::Adjusted\"));\n \n \tint ret = state->cam_->configure(state->config_.get());\n \tif (ret) {\n@@ -481,6 +486,10 @@ gst_libcamera_src_negotiate(GstLibcameraSrc *self)\n \t\tg_autoptr(GstCaps) caps = gst_libcamera_stream_configuration_to_caps(stream_cfg, transfer[i]);\n \t\tgst_libcamera_framerate_to_caps(caps, element_caps);\n \n+\t\tif (status == CameraConfiguration::Adjusted &&\n+\t\t !gst_pad_peer_query_accept_caps(srcpad, caps))\n+\t\t\treturn false;\n+\n \t\tif (!gst_pad_push_event(srcpad, gst_event_new_caps(caps)))\n \t\t\treturn false;\n \t}\n", "prefixes": [ "2/4" ] }