Patch Detail
Show a patch.
GET /api/1.1/patches/15390/?format=api
{ "id": 15390, "url": "https://patchwork.libcamera.org/api/1.1/patches/15390/?format=api", "web_url": "https://patchwork.libcamera.org/patch/15390/", "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": "<20220225141403.53678-2-galof.nejc@gmail.com>", "date": "2022-02-25T14:14:03", "name": "[libcamera-devel,2/2] Fixed naming, delete unused include and simplify frameDuration calculation", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "10ead158d1f5e1d89e0bd87391719371b0653f9c", "submitter": { "id": 113, "url": "https://patchwork.libcamera.org/api/1.1/people/113/?format=api", "name": "Nejc Galof", "email": "galof.nejc@gmail.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/15390/mbox/", "series": [ { "id": 2941, "url": "https://patchwork.libcamera.org/api/1.1/series/2941/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2941", "date": "2022-02-25T14:14:02", "name": "[libcamera-devel,1/2] v4l2: Support setting frame rate in the V4L2 Adaptation layer", "version": 1, "mbox": "https://patchwork.libcamera.org/series/2941/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/15390/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/15390/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 137B0BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Feb 2022 14:14:23 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 55E2661171;\n\tFri, 25 Feb 2022 15:14:21 +0100 (CET)", "from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com\n\t[IPv6:2a00:1450:4864:20::42c])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BC723601FE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Feb 2022 15:14:19 +0100 (CET)", "by mail-wr1-x42c.google.com with SMTP id n14so4720849wrq.7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Feb 2022 06:14:19 -0800 (PST)", "from e28887faee29.8.8.8.8 ([91.224.238.83])\n\tby smtp.gmail.com with ESMTPSA id\n\ti22-20020a05600c355600b0037bee3a4e00sm5963810wmq.47.2022.02.25.06.14.18\n\tfor <libcamera-devel@lists.libcamera.org>\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 25 Feb 2022 06:14:19 -0800 (PST)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"QDzSchE/\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;\n\th=from:to:subject:date:message-id:in-reply-to:references;\n\tbh=ycMeKL8IMyr8fWY9hvjhAADL5kAkW88rwt7sRGgwXDw=;\n\tb=QDzSchE/mNXmAksC1liOGD9fDpCWaAcaBCNAKEGuUG/G9Yq0FhCbCr9pztUuxlrLAY\n\tCdyqtusmUaesWGCBO5p5ihJHj2lgBVab4Ghw46d1s8RmUHMaR3aVXlT8+k1OD1XiXrtK\n\tpFa8ODOJaw8Sc3uIRa4HNxH6Gkmno6bjFfh0udHU699kd+4VpqXTrJn6lIsEF67mh8DD\n\ttzRw6nn+DL4ag9v8Q2qTlyzflSFbEyqXhAz+D321snV+4g7RupKdrkWXUNxgA4/s5a2W\n\tL/XLIQM9bGFk7uwiIkiBKCUhVp/t0dCP41UdsiDTUPuw+7pXTcCkmsZUBG60LXiO+V34\n\t30pg==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:from:to:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=ycMeKL8IMyr8fWY9hvjhAADL5kAkW88rwt7sRGgwXDw=;\n\tb=XKUjxMwECnL9Y/Ol1BoQHCxTBQ7UqHd+JnPJObkIEIe7B3mwHg9U+47+F3TvSWcPlI\n\tUiA2BOV9kz4izYhssTQvyH+A9Exvs4BpEQNI96Xb5Il2DOfXWLDl1kfmhZrMoyiZw363\n\txpUJbwAbXV85OZEqKVit3KQHLSVlMTWzHvMXyDy+ZJtOB2ePLmQOlpHJ3FJRYMSRrWRi\n\tpK2W5tptwtSTBFbMz5pLEaUKeOEzI47+CkuR2QFPN7HfX5REnVKRohYQirS3KXqjXuv0\n\t7AppLfz8lLhYw4wM7Lbn9olMCCyLrCOU5jYg7mJeaHoAnNjCZFJxQC/JtWbhpsVEujm/\n\tu6qw==", "X-Gm-Message-State": "AOAM532k2ut3wWHxJJly68D8SnqDlhrTquBPxtvQAf4aR6d2pp2Ptucr\n\tH12cdSnwzSsHU/NjdKeOsPRnhTATEfF4zg==", "X-Google-Smtp-Source": "ABdhPJxXT1F6/mKNs/Op854B4gMLkuCZ22kJB92S0Y56Cz7MiEpm6G//s0gO1T5Nlu03xADI3K+oXw==", "X-Received": "by 2002:a5d:4dce:0:b0:1ed:9fd1:53a2 with SMTP id\n\tf14-20020a5d4dce000000b001ed9fd153a2mr6291875wru.212.1645798459461; \n\tFri, 25 Feb 2022 06:14:19 -0800 (PST)", "From": "Nejc Galof <galof.nejc@gmail.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 25 Feb 2022 15:14:03 +0100", "Message-Id": "<20220225141403.53678-2-galof.nejc@gmail.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20220225141403.53678-1-galof.nejc@gmail.com>", "References": "<20220225141403.53678-1-galof.nejc@gmail.com>", "Subject": "[libcamera-devel] [PATCH 2/2] Fixed naming,\n\tdelete unused include and simplify frameDuration calculation", "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": "Signed-off-by: Nejc Galof <galof.nejc@gmail.com>\n---\n src/v4l2/v4l2_camera.h | 2 --\n src/v4l2/v4l2_camera_proxy.cpp | 7 +++----\n src/v4l2/v4l2_camera_proxy.h | 2 +-\n 3 files changed, 4 insertions(+), 7 deletions(-)", "diff": "diff --git a/src/v4l2/v4l2_camera.h b/src/v4l2/v4l2_camera.h\nindex 9e6c895a..4c203e31 100644\n--- a/src/v4l2/v4l2_camera.h\n+++ b/src/v4l2/v4l2_camera.h\n@@ -10,8 +10,6 @@\n #include <deque>\n #include <utility>\n \n-#include <linux/videodev2.h>\n-\n #include <libcamera/base/mutex.h>\n #include <libcamera/base/semaphore.h>\n #include <libcamera/base/shared_fd.h>\ndiff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp\nindex 8da42068..493c41c0 100644\n--- a/src/v4l2/v4l2_camera_proxy.cpp\n+++ b/src/v4l2/v4l2_camera_proxy.cpp\n@@ -758,7 +758,7 @@ int V4L2CameraProxy::vidioc_streamoff(V4L2CameraFile *file, int *arg)\n \treturn ret;\n }\n \n-int V4L2CameraProxy::vidioc_s_param(V4L2CameraFile *file, struct v4l2_streamparm *arg)\n+int V4L2CameraProxy::vidioc_s_parm(V4L2CameraFile *file, struct v4l2_streamparm *arg)\n {\n \tLOG(V4L2Compat, Debug)\n \t\t<< \"[\" << file->description() << \"] \" << __func__ << \"()\";\n@@ -767,8 +767,7 @@ int V4L2CameraProxy::vidioc_s_param(V4L2CameraFile *file, struct v4l2_streamparm\n \t\treturn -EINVAL;\n \n \tstruct v4l2_fract *timeperframe = &arg->parm.capture.timeperframe;\n-\tutils::Duration frameDuration = 1s * (static_cast<double>(timeperframe->numerator) /\n-\t\t\t\t\t static_cast<double>(timeperframe->denominator));\n+\tutils::Duration frameDuration = 1.0s * timeperframe->numerator / timeperframe->denominator;\n \n \tint64_t uDuration = frameDuration.get<std::micro>();\n \tvcam_->controls().set(controls::FrameDurationLimits, { uDuration, uDuration });\n@@ -875,7 +874,7 @@ int V4L2CameraProxy::ioctl(V4L2CameraFile *file, unsigned long request, void *ar\n \t\tret = vidioc_streamoff(file, static_cast<int *>(arg));\n \t\tbreak;\n \tcase VIDIOC_S_PARM:\n-\t\tret = vidioc_s_param(file, static_cast<struct v4l2_streamparm *>(arg));\n+\t\tret = vidioc_s_parm(file, static_cast<struct v4l2_streamparm *>(arg));\n \t\tbreak;\n \tdefault:\n \t\tret = -ENOTTY;\ndiff --git a/src/v4l2/v4l2_camera_proxy.h b/src/v4l2/v4l2_camera_proxy.h\nindex 30a3f492..c1aeaff9 100644\n--- a/src/v4l2/v4l2_camera_proxy.h\n+++ b/src/v4l2/v4l2_camera_proxy.h\n@@ -65,7 +65,7 @@ private:\n \tint vidioc_expbuf(V4L2CameraFile *file, struct v4l2_exportbuffer *arg);\n \tint vidioc_streamon(V4L2CameraFile *file, int *arg);\n \tint vidioc_streamoff(V4L2CameraFile *file, int *arg);\n-\tint vidioc_s_param(V4L2CameraFile *file, struct v4l2_streamparm *arg);\n+\tint vidioc_s_parm(V4L2CameraFile *file, struct v4l2_streamparm *arg);\n \n \tbool hasOwnership(V4L2CameraFile *file);\n \tint acquire(V4L2CameraFile *file);\n", "prefixes": [ "libcamera-devel", "2/2" ] }