Patch Detail
Show a patch.
GET /api/patches/21370/?format=api
{ "id": 21370, "url": "https://patchwork.libcamera.org/api/patches/21370/?format=api", "web_url": "https://patchwork.libcamera.org/patch/21370/", "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": "<20240925152134.20284-2-laurent.pinchart@ideasonboard.com>", "date": "2024-09-25T15:21:33", "name": "[1/2] apps: Replace HAVE_DNG with HAVE_TIFF", "commit_ref": "2e47324860bcbcc7b317efa66673201877583b3e", "pull_url": null, "state": "accepted", "archived": false, "hash": "00622c1ee15d25ece8ab45dbbe51b4b4ee98043d", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/21370/mbox/", "series": [ { "id": 4624, "url": "https://patchwork.libcamera.org/api/series/4624/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4624", "date": "2024-09-25T15:21:32", "name": "apps: cam: Improve user experience with DNG capture", "version": 1, "mbox": "https://patchwork.libcamera.org/series/4624/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/21370/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/21370/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 D1E50C3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 25 Sep 2024 15:21:44 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D04126350E;\n\tWed, 25 Sep 2024 17:21:43 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0650C6350E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 25 Sep 2024 17:21:39 +0200 (CEST)", "from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 67985A30;\n\tWed, 25 Sep 2024 17:20:12 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"M9+EBCBU\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1727277612;\n\tbh=Xb4kFu3MC60bJ9HiWNsd5B0IjQzz8KbAsaoIoSWqSgY=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=M9+EBCBU64juZg7u6HBk1DvtZ2RRpMr+VeHrEhFfnuuwbUhTLTVAYbxqqykuIgTuo\n\tp8dCLVl12vEo6lqhg21pbv5Q9e2dT5/BxZfDsVnb104/X6Hf5PvNqOsiJ18Q9uKFyX\n\t+uyoBAS4hepuHF32JHB8Hun0vn7CE8TFHaY/8lkE=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Arne Caspari <arne.caspari@theimagingsource.com>", "Subject": "[PATCH 1/2] apps: Replace HAVE_DNG with HAVE_TIFF", "Date": "Wed, 25 Sep 2024 18:21:33 +0300", "Message-ID": "<20240925152134.20284-2-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.45.2", "In-Reply-To": "<20240925152134.20284-1-laurent.pinchart@ideasonboard.com>", "References": "<20240925152134.20284-1-laurent.pinchart@ideasonboard.com>", "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": "Support for DNG capture is conditioned by the availability of libtiff,\nwhich is indicated by the HAVE_TIFF macro set by meson. The dng_writer.h\nheader then defines HAVE_DNG, which is used is a couple of places to\nconditionally compile DNG-related code. Most of the other locations\nwhere conditional compilation is required use HAVE_TIFF.\n\nUsing both HAVE_TIFF and HAVE_DNG is confusing. HAVE_DNG would be a\nbetter name, but as the macro is defined in dng_writer.h, it would\nrequire all files that need to test for DNG support to include that\nheader. Failure to include it (directly or indirectly) would result in\nthe code covered by the macro to be silently disabled.\n\nTo avoid the confusion, standardize on using HAVE_TIFF everywhere and\ndrop HAVE_DNG.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/apps/common/dng_writer.h | 1 -\n src/apps/qcam/main_window.cpp | 4 ++--\n 2 files changed, 2 insertions(+), 3 deletions(-)", "diff": "diff --git a/src/apps/common/dng_writer.h b/src/apps/common/dng_writer.h\nindex 917713e61001..aaa8a852b307 100644\n--- a/src/apps/common/dng_writer.h\n+++ b/src/apps/common/dng_writer.h\n@@ -8,7 +8,6 @@\n #pragma once\n \n #ifdef HAVE_TIFF\n-#define HAVE_DNG\n \n #include <libcamera/camera.h>\n #include <libcamera/controls.h>\ndiff --git a/src/apps/qcam/main_window.cpp b/src/apps/qcam/main_window.cpp\nindex dd2aa19618a1..5144c6b3eb30 100644\n--- a/src/apps/qcam/main_window.cpp\n+++ b/src/apps/qcam/main_window.cpp\n@@ -211,7 +211,7 @@ int MainWindow::createToolbars()\n \taction->setShortcut(QKeySequence::SaveAs);\n \tconnect(action, &QAction::triggered, this, &MainWindow::saveImageAs);\n \n-#ifdef HAVE_DNG\n+#ifdef HAVE_TIFF\n \t/* Save Raw action. */\n \taction = toolbar_->addAction(QIcon::fromTheme(\"camera-photo\",\n \t\t\t\t\t\t QIcon(\":aperture.svg\")),\n@@ -646,7 +646,7 @@ void MainWindow::captureRaw()\n void MainWindow::processRaw(FrameBuffer *buffer,\n \t\t\t [[maybe_unused]] const ControlList &metadata)\n {\n-#ifdef HAVE_DNG\n+#ifdef HAVE_TIFF\n \tQString defaultPath = QStandardPaths::writableLocation(QStandardPaths::PicturesLocation);\n \tQString filename = QFileDialog::getSaveFileName(this, \"Save DNG\", defaultPath,\n \t\t\t\t\t\t\t\"DNG Files (*.dng)\");\n", "prefixes": [ "1/2" ] }