Show a patch.

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

{
    "id": 4056,
    "url": "https://patchwork.libcamera.org/api/patches/4056/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/4056/",
    "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": "<20200616131244.70308-13-paul.elder@ideasonboard.com>",
    "date": "2020-06-16T13:12:41",
    "name": "[libcamera-devel,12/15] v4l2: v4l2_camera_proxy: Add sequence number",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "459e01907066d8b0e8ef03f39421c9c1e167dcf9",
    "submitter": {
        "id": 17,
        "url": "https://patchwork.libcamera.org/api/people/17/?format=api",
        "name": "Paul Elder",
        "email": "paul.elder@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/4056/mbox/",
    "series": [
        {
            "id": 1006,
            "url": "https://patchwork.libcamera.org/api/series/1006/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1006",
            "date": "2020-06-16T13:12:29",
            "name": "Support v4l2-compliance",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/1006/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/4056/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/4056/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<paul.elder@ideasonboard.com>",
        "Received": [
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1C43E61F24\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 16 Jun 2020 15:13:23 +0200 (CEST)",
            "from jade.flets-east.jp (unknown\n\t[IPv6:2400:4051:61:600:2807:bdfa:f6a:8e53])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A6854F9;\n\tTue, 16 Jun 2020 15:13:21 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"aMYA9Shz\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1592313202;\n\tbh=nJZWEniJHxfwcC9SzvRwPbm3r/26GoPB7tpGWPcRba4=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=aMYA9ShzUOwDCRYCud3DWMnf8hFgBiIf7gIIgCn+hTSO2zF4BchalVW2dFEm7mFeT\n\tQHMgKUxT/RMgbknrUiwoDMbjjpLkFK7w/BpAe9mE4V8uYfy2MOWgq+3yJuUxnsMlZY\n\twkub+1WGUQw94Lks6d1PfS617VA7jSBKrCIz51bQ=",
        "From": "Paul Elder <paul.elder@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue, 16 Jun 2020 22:12:41 +0900",
        "Message-Id": "<20200616131244.70308-13-paul.elder@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20200616131244.70308-1-paul.elder@ideasonboard.com>",
        "References": "<20200616131244.70308-1-paul.elder@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 12/15] v4l2: v4l2_camera_proxy: Add\n\tsequence number",
        "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>",
        "X-List-Received-Date": "Tue, 16 Jun 2020 13:13:23 -0000"
    },
    "content": "Populate the sequence number field in the V4L2 buffers. Reset upon\nstreamon.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n src/v4l2/v4l2_camera_proxy.cpp | 4 +++-\n src/v4l2/v4l2_camera_proxy.h   | 2 ++\n 2 files changed, 5 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp\nindex 079961a..81f9282 100644\n--- a/src/v4l2/v4l2_camera_proxy.cpp\n+++ b/src/v4l2/v4l2_camera_proxy.cpp\n@@ -33,7 +33,7 @@ LOG_DECLARE_CATEGORY(V4L2Compat);\n V4L2CameraProxy::V4L2CameraProxy(unsigned int index,\n \t\t\t\t std::shared_ptr<Camera> camera)\n \t: refcount_(0), index_(index), bufferCount_(0), currentBuf_(0),\n-\t  vcam_(std::make_unique<V4L2Camera>(camera)), efd_(-1),\n+\t  sequence_(0), vcam_(std::make_unique<V4L2Camera>(camera)), efd_(-1),\n \t  v4l2RecordPriorityFd_(-1), acquiredFd_(-1), initialized_(false),\n \t  streaming_(false)\n {\n@@ -665,6 +665,7 @@ int V4L2CameraProxy::vidioc_dqbuf(int fd, struct v4l2_buffer *arg)\n \n \tbuf.flags &= ~V4L2_BUF_FLAG_QUEUED;\n \tbuf.length = sizeimage_;\n+\tbuf.sequence = sequence_++;\n \t*arg = buf;\n \n \tcurrentBuf_ = (currentBuf_ + 1) % bufferCount_;\n@@ -696,6 +697,7 @@ int V4L2CameraProxy::vidioc_streamon(int fd, int *arg)\n \n \tcurrentBuf_ = 0;\n \tstreaming_ = true;\n+\tsequence_ = 0;\n \n \treturn vcam_->streamOn();\n }\ndiff --git a/src/v4l2/v4l2_camera_proxy.h b/src/v4l2/v4l2_camera_proxy.h\nindex 28b2fa0..1d8e9a6 100644\n--- a/src/v4l2/v4l2_camera_proxy.h\n+++ b/src/v4l2/v4l2_camera_proxy.h\n@@ -82,6 +82,8 @@ private:\n \tunsigned int currentBuf_;\n \tunsigned int sizeimage_;\n \n+\tuint32_t sequence_;\n+\n \tstd::vector<struct v4l2_buffer> buffers_;\n \tstd::map<void *, unsigned int> mmaps_;\n \n",
    "prefixes": [
        "libcamera-devel",
        "12/15"
    ]
}