Show a patch.

GET /api/patches/15467/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 15467,
    "url": "https://patchwork.libcamera.org/api/patches/15467/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/15467/",
    "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": "<20220317104740.569310-3-umang.jain@ideasonboard.com>",
    "date": "2022-03-17T10:47:39",
    "name": "[libcamera-devel,2/3] libcamera: v4l2_videodevice: Clarify setting of v4l2_buffer timestamp",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "17532332c568de402bdbd81dbf0dc59596b8ad5f",
    "submitter": {
        "id": 86,
        "url": "https://patchwork.libcamera.org/api/people/86/?format=api",
        "name": "Umang Jain",
        "email": "umang.jain@ideasonboard.com"
    },
    "delegate": {
        "id": 12,
        "url": "https://patchwork.libcamera.org/api/users/12/?format=api",
        "username": "uajain",
        "first_name": "Umang",
        "last_name": "Jain",
        "email": "umang.jain@ideasonboard.com"
    },
    "mbox": "https://patchwork.libcamera.org/patch/15467/mbox/",
    "series": [
        {
            "id": 2970,
            "url": "https://patchwork.libcamera.org/api/series/2970/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2970",
            "date": "2022-03-17T10:47:37",
            "name": "v4l2_videodevice: Small fixup & clarifications",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/2970/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/15467/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/15467/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\r\n\t[92.243.16.209])\r\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 653E4BF415\r\n\tfor <parsemail@patchwork.libcamera.org>;\r\n\tThu, 17 Mar 2022 10:48:00 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\r\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 172DE604E7;\r\n\tThu, 17 Mar 2022 11:48:00 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\r\n\t[213.167.242.64])\r\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3FEBA604DB\r\n\tfor <libcamera-devel@lists.libcamera.org>;\r\n\tThu, 17 Mar 2022 11:47:58 +0100 (CET)",
            "from perceval.ideasonboard.com (unknown [103.251.226.83])\r\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2CE1C929;\r\n\tThu, 17 Mar 2022 11:47:55 +0100 (CET)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\r\n\ts=mail; t=1647514080;\r\n\tbh=QrHewiwr1p6gh6db+ZbzoHZ+xKjSPTmddti8+OdsEPA=;\r\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\r\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\r\n\tFrom;\r\n\tb=Oai80aMnFNtMDBIziX+D+v3EMI2CT3kubUwg1fhb17y5ngLkD52t6gS33YkjU6xLc\r\n\t2SOAEVkgrDsue4NnbzhcPrYLjTlESxyr8SOntGa3vG7fz/RQsviqb7dth2PWm5tdVV\r\n\t1rvYarW+AOdwnmfjtTE7rADONm6LMnRQeYFqr6XwNQ1ppXFRPj51mWfcMBmQX7qdmN\r\n\t+d9ZMHEp6aZjTkvTPbF4tyQbe2MMZXosGs2zV7q247bQ8bvMQJwu6F1+WZW+LhE6Nt\r\n\tAL3qEDitZ8s309Odz7TjMeQSzf+TUxYb/ilOrZvdoDA3canq9isHZdz2YWyYSLYRHy\r\n\ts+ZqY1OptzmUA==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\r\n\ts=mail; t=1647514077;\r\n\tbh=QrHewiwr1p6gh6db+ZbzoHZ+xKjSPTmddti8+OdsEPA=;\r\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\r\n\tb=Xs2At/4zIM0B9VIBnANmHdDnlBoSiBprTtiI7gRSVw1aBalBoMKLZE6ztNNx6Q0Ry\r\n\tUw3qT/OKUAQGUruFgxiIrjgr9gdl/ezy0Hd5eI8pR9jMoBQA2O7E6xe9m8iOfouylZ\r\n\tVhND34aQQxp4MzDuXuAz2qPgmqLPZHzaYFDgu1J0="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \r\n\tunprotected) header.d=ideasonboard.com\r\n\theader.i=@ideasonboard.com\r\n\theader.b=\"Xs2At/4z\"; dkim-atps=neutral",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 17 Mar 2022 16:17:39 +0530",
        "Message-Id": "<20220317104740.569310-3-umang.jain@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.31.1",
        "In-Reply-To": "<20220317104740.569310-1-umang.jain@ideasonboard.com>",
        "References": "<20220317104740.569310-1-umang.jain@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 2/3] libcamera: v4l2_videodevice: Clarify\r\n\tsetting of v4l2_buffer timestamp",
        "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>,\r\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>,\r\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>",
        "From": "Umang Jain via libcamera-devel <libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Umang Jain <umang.jain@ideasonboard.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Add a comment to clarify why we set v4l2_buffer timestamp while\nqueuing the buffer (VIDIOC_QBUF). The timstamps are required to\nbe supplied for memory-to-memory devices for output streams which\nthen are copied to capture stream buffers with the help of\nV4L2_BUF_FLAG_TIMESTAMP_COPY (set by the driver).\n\nSigned-off-by: Umang Jain <umang.jain@ideasonboard.com>\n---\n src/libcamera/v4l2_videodevice.cpp | 8 ++++++++\n 1 file changed, 8 insertions(+)",
    "diff": "diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\r\nindex 5580269f..a6c54b19 100644\r\n--- a/src/libcamera/v4l2_videodevice.cpp\r\n+++ b/src/libcamera/v4l2_videodevice.cpp\r\n@@ -1600,6 +1600,14 @@ int V4L2VideoDevice::queueBuffer(FrameBuffer *buffer)\r\n \t\t\tbuf.length = planes[0].length;\r\n \t\t}\r\n \r\n+\t\t/*\r\n+\t\t * Timestamps are to be supplied if the device is a mem-to-mem\r\n+\t\t * device. The drivers will have V4L2_BUF_FLAG_TIMESTAMP_COPY\r\n+\t\t * set hence these timestamps will be copied from the output\r\n+\t\t * buffers to capture buffers. If the device is not mem-to-men,\r\n+\t\t * there is no harm in setting the timestamps as they will be\r\n+\t\t * ignored (and over-written).\r\n+\t\t */\r\n \t\tbuf.timestamp.tv_sec = metadata.timestamp / 1000000000;\r\n \t\tbuf.timestamp.tv_usec = (metadata.timestamp / 1000) % 1000000;\r\n \t}",
    "prefixes": [
        "libcamera-devel",
        "2/3"
    ]
}