Show a patch.

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

{
    "id": 673,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/673/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/673/",
    "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": "<20190228200151.2948-6-jacopo@jmondi.org>",
    "date": "2019-02-28T20:01:47",
    "name": "[libcamera-devel,v5,5/9] libcamera: v4l2_subdevice: Update crop/compose rectangle",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "8c5426a8ff40c76f83cb72a8e6f08b14df7b5647",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/1.1/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/673/mbox/",
    "series": [
        {
            "id": 198,
            "url": "https://patchwork.libcamera.org/api/1.1/series/198/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=198",
            "date": "2019-02-28T20:01:42",
            "name": "v4l2_(sub)dev: improvements and tests",
            "version": 4,
            "mbox": "https://patchwork.libcamera.org/series/198/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/673/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/673/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<jacopo@jmondi.org>",
        "Received": [
            "from relay11.mail.gandi.net (relay11.mail.gandi.net\n\t[217.70.178.231])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EF0E3610C4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 28 Feb 2019 21:01:33 +0100 (CET)",
            "from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay11.mail.gandi.net (Postfix) with ESMTPSA id 87F1610000A;\n\tThu, 28 Feb 2019 20:01:33 +0000 (UTC)"
        ],
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 28 Feb 2019 21:01:47 +0100",
        "Message-Id": "<20190228200151.2948-6-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20190228200151.2948-1-jacopo@jmondi.org>",
        "References": "<20190228200151.2948-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v5 5/9] libcamera: v4l2_subdevice: Update\n\tcrop/compose rectangle",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.23",
        "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": "Thu, 28 Feb 2019 20:01:34 -0000"
    },
    "content": "Update the crop/compose rectangle provided to setCrop()/setCompose()\nmethods with the rectangle sizes set by the device driver after a\nS_SELECTION ioctl operation.\n\nWhile at there, fix the use of 'top' and 'left' field of the selection\nrectangle, which where wrongly used.\n\nFixes: 468176fa07d9 (\"libcamera: Add V4L2Subdevice\")\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/v4l2_subdevice.cpp | 9 +++++++--\n 1 file changed, 7 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp\nindex 7f191e072c61..d2f9365a9537 100644\n--- a/src/libcamera/v4l2_subdevice.cpp\n+++ b/src/libcamera/v4l2_subdevice.cpp\n@@ -342,8 +342,8 @@ int V4L2Subdevice::setSelection(unsigned int pad, unsigned int target,\n \tsel.target = target;\n \tsel.flags = 0;\n \n-\tsel.r.left = rect->y;\n-\tsel.r.top = rect->x;\n+\tsel.r.left = rect->x;\n+\tsel.r.top = rect->y;\n \tsel.r.width = rect->w;\n \tsel.r.height = rect->h;\n \n@@ -356,6 +356,11 @@ int V4L2Subdevice::setSelection(unsigned int pad, unsigned int target,\n \t\treturn ret;\n \t}\n \n+\trect->x = sel.r.left;\n+\trect->y = sel.r.top;\n+\trect->w = sel.r.width;\n+\trect->h = sel.r.height;\n+\n \treturn 0;\n }\n \n",
    "prefixes": [
        "libcamera-devel",
        "v5",
        "5/9"
    ]
}