Patch Detail
Show a patch.
GET /api/1.1/patches/22965/?format=api
{ "id": 22965, "url": "https://patchwork.libcamera.org/api/1.1/patches/22965/?format=api", "web_url": "https://patchwork.libcamera.org/patch/22965/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/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": "<20250314202943.112109-6-mzamazal@redhat.com>", "date": "2025-03-14T20:29:33", "name": "[RFC,5/7] apps: cam: Report error on multiple default sinks", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "1b0ae5ccec03cc42b77da3fd2675b628e7a3ef95", "submitter": { "id": 177, "url": "https://patchwork.libcamera.org/api/1.1/people/177/?format=api", "name": "Milan Zamazal", "email": "mzamazal@redhat.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/22965/mbox/", "series": [ { "id": 5062, "url": "https://patchwork.libcamera.org/api/1.1/series/5062/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5062", "date": "2025-03-14T20:29:28", "name": "Support different outputs for cam streams", "version": 1, "mbox": "https://patchwork.libcamera.org/series/5062/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/22965/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/22965/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 1D22DC32F9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 14 Mar 2025 20:30:19 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3A0AA68952;\n\tFri, 14 Mar 2025 21:30:18 +0100 (CET)", "from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C6CAB6894A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 14 Mar 2025 21:30:10 +0100 (CET)", "from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com\n\t(ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63])\n\tby relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n\tcipher=TLS_AES_256_GCM_SHA384) id us-mta-294-vcXUUOfkN5WuCghSZnxDaw-1;\n\tFri, 14 Mar 2025 16:30:08 -0400", "from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com\n\t(mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com\n\t[10.30.177.40])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange X25519 server-signature RSA-PSS (2048 bits)\n\tserver-digest SHA256) (No client certificate requested)\n\tby mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix)\n\twith ESMTPS id 877F1195608B; Fri, 14 Mar 2025 20:30:07 +0000 (UTC)", "from mzamazal-thinkpadp1gen7.tpbc.com (unknown [10.44.32.19])\n\tby mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix)\n\twith ESMTP id 006621954B32; Fri, 14 Mar 2025 20:30:05 +0000 (UTC)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"i+cF/RN6\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1741984209;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=vgaUImN0wCsNk1ynC8rrqJWeH66K7Oy23vSbw7kLXeo=;\n\tb=i+cF/RN606cwrrezQF1INt+u1eXOYgUiSpmrfoxdOS7PGLFWb2GWYYEvJOaKuwJnE0h1l9\n\tvNbNzenmhXQVcj7MPNwgqIJomKzb8/NPdOLnkFRohSEvC6LZIq0qbMF6nIt4l2idqJkF8i\n\t35TMzagWIVHcyaUduU0NxaP6EEuzt5A=", "X-MC-Unique": "vcXUUOfkN5WuCghSZnxDaw-1", "X-Mimecast-MFC-AGG-ID": "vcXUUOfkN5WuCghSZnxDaw_1741984207", "From": "Milan Zamazal <mzamazal@redhat.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Milan Zamazal <mzamazal@redhat.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>", "Subject": "[RFC PATCH 5/7] apps: cam: Report error on multiple default sinks", "Date": "Fri, 14 Mar 2025 21:29:33 +0100", "Message-ID": "<20250314202943.112109-6-mzamazal@redhat.com>", "In-Reply-To": "<20250314202943.112109-1-mzamazal@redhat.com>", "References": "<20250314202943.112109-1-mzamazal@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 3.0 on 10.30.177.40", "X-Mimecast-Spam-Score": "0", "X-Mimecast-MFC-PROC-ID": "lUAg-kvS8NiekhtfwHWYg5BTSU_GInB7X9ArUL-znhY_1741984207", "X-Mimecast-Originator": "redhat.com", "Content-Transfer-Encoding": "8bit", "content-type": "text/plain; charset=\"US-ASCII\"; x-default=true", "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": "Multiple default sinks are not really supported, if more than one sink\nis present then the last one wins and the other ones are just created\nbut not used actually. Let's check for this and report an error in such\na case.\n\nSigned-off-by: Milan Zamazal <mzamazal@redhat.com>\n---\n src/apps/cam/camera_session.cpp | 12 +++++++++++-\n 1 file changed, 11 insertions(+), 1 deletion(-)", "diff": "diff --git a/src/apps/cam/camera_session.cpp b/src/apps/cam/camera_session.cpp\nindex 54073cdf..b1f5209d 100644\n--- a/src/apps/cam/camera_session.cpp\n+++ b/src/apps/cam/camera_session.cpp\n@@ -265,11 +265,21 @@ int CameraSession::start()\n #endif\n \n #ifdef HAVE_SDL\n-\tif (options_.isSet(OptSDL))\n+\tif (options_.isSet(OptSDL)) {\n+\t\tif (defaultSink) {\n+\t\t\tstd::cerr << \"Multiple default sinks not allowed\" << std::endl;\n+\t\t\treturn -EINVAL;\n+\t\t}\n \t\tdefaultSink = std::make_unique<SDLSink>();\n+\t}\n #endif\n \n \tif (options_.isSet(OptFile)) {\n+\t\tif (defaultSink) {\n+\t\t\tstd::cerr << \"Multiple default sinks not allowed\" << std::endl;\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\n \t\tstd::unique_ptr<FileSink> sink =\n \t\t\tstd::make_unique<FileSink>(camera_.get(), streamNames_);\n \n", "prefixes": [ "RFC", "5/7" ] }