Show a patch.

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

{
    "id": 3198,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/3198/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/3198/",
    "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": "<20200319132919.9563-3-laurent.pinchart@ideasonboard.com>",
    "date": "2020-03-19T13:29:18",
    "name": "[libcamera-devel,v3,2/3] libcamera: v4l2_videodevice: Rename toV4L2Fourcc to toV4L2PixelFormat",
    "commit_ref": "6015d9702e2920644347d5f497c230f3a7133105",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "38b4371b69230b0b5e83de9f8a6aef4884e6f5a5",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/3198/mbox/",
    "series": [
        {
            "id": 741,
            "url": "https://patchwork.libcamera.org/api/1.1/series/741/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=741",
            "date": "2020-03-19T13:29:16",
            "name": "Add a V4L2PixelFormat class",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/741/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/3198/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/3198/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<laurent.pinchart@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 9F25260418\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 19 Mar 2020 14:29:32 +0100 (CET)",
            "from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 47025A53\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 19 Mar 2020 14:29:32 +0100 (CET)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1584624572;\n\tbh=R5rI25mDATFbMNVt1IovmuGW/3TyOnkakPB/CKkJIdI=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=QAbT6fxaB4sD12VHpjnArMMdlhLSUm6zJwh6WCqnEWyDwHsgVi912p3qCK5P1biUw\n\tRoOfzJbzUWxYiePoWIqzFEMXqYjqGmMBpzee1yRF0P/5cgAz9Xa12qtbECWHQvP0u9\n\t7p7S2YY0Rz4UTfQHJGgQ3C/pRnW2hGZx7uRaDEZQ=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 19 Mar 2020 15:29:18 +0200",
        "Message-Id": "<20200319132919.9563-3-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.24.1",
        "In-Reply-To": "<20200319132919.9563-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20200319132919.9563-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v3 2/3] libcamera: v4l2_videodevice:\n\tRename toV4L2Fourcc to toV4L2PixelFormat",
        "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": "Thu, 19 Mar 2020 13:29:32 -0000"
    },
    "content": "Now that the functions return a V4L2PixelFormat, adapt their name\naccordingly.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/include/v4l2_videodevice.h | 6 +++---\n src/libcamera/pipeline/ipu3/ipu3.cpp     | 2 +-\n src/libcamera/pipeline/rkisp1/rkisp1.cpp | 4 ++--\n src/libcamera/pipeline/uvcvideo.cpp      | 4 ++--\n src/libcamera/pipeline/vimc.cpp          | 4 ++--\n src/libcamera/v4l2_videodevice.cpp       | 8 ++++----\n test/libtest/buffer_source.cpp           | 3 ++-\n 7 files changed, 16 insertions(+), 15 deletions(-)",
    "diff": "diff --git a/src/libcamera/include/v4l2_videodevice.h b/src/libcamera/include/v4l2_videodevice.h\nindex 2a380c0e61cd..5e40c0c57df9 100644\n--- a/src/libcamera/include/v4l2_videodevice.h\n+++ b/src/libcamera/include/v4l2_videodevice.h\n@@ -229,9 +229,9 @@ public:\n \t\t\t\t\t       const std::string &entity);\n \n \tstatic PixelFormat toPixelFormat(V4L2PixelFormat v4l2Fourcc);\n-\tV4L2PixelFormat toV4L2Fourcc(const PixelFormat &pixelFormat);\n-\tstatic V4L2PixelFormat toV4L2Fourcc(const PixelFormat &pixelFormat,\n-\t\t\t\t\t    bool multiplanar);\n+\tV4L2PixelFormat toV4L2PixelFormat(const PixelFormat &pixelFormat);\n+\tstatic V4L2PixelFormat toV4L2PixelFormat(const PixelFormat &pixelFormat,\n+\t\t\t\t\t\t bool multiplanar);\n \n protected:\n \tstd::string logPrefix() const;\ndiff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex 55ce8fa16af1..e9085f2f0c7e 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -1078,7 +1078,7 @@ int ImgUDevice::configureOutput(ImgUOutput *output,\n \t\treturn 0;\n \n \tV4L2DeviceFormat outputFormat = {};\n-\toutputFormat.fourcc = dev->toV4L2Fourcc(PixelFormat(DRM_FORMAT_NV12));\n+\toutputFormat.fourcc = dev->toV4L2PixelFormat(PixelFormat(DRM_FORMAT_NV12));\n \toutputFormat.size = cfg.size;\n \toutputFormat.planesCount = 2;\n \ndiff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\nindex 737e331459f3..07d837abe1ac 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n@@ -626,7 +626,7 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n \tLOG(RkISP1, Debug) << \"Resizer output pad configured with \" << format.toString();\n \n \tV4L2DeviceFormat outputFormat = {};\n-\toutputFormat.fourcc = video_->toV4L2Fourcc(cfg.pixelFormat);\n+\toutputFormat.fourcc = video_->toV4L2PixelFormat(cfg.pixelFormat);\n \toutputFormat.size = cfg.size;\n \toutputFormat.planesCount = 2;\n \n@@ -635,7 +635,7 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n \t\treturn ret;\n \n \tif (outputFormat.size != cfg.size ||\n-\t    outputFormat.fourcc != video_->toV4L2Fourcc(cfg.pixelFormat)) {\n+\t    outputFormat.fourcc != video_->toV4L2PixelFormat(cfg.pixelFormat)) {\n \t\tLOG(RkISP1, Error)\n \t\t\t<< \"Unable to configure capture in \" << cfg.toString();\n \t\treturn -EINVAL;\ndiff --git a/src/libcamera/pipeline/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo.cpp\nindex 67750fbc7c0c..15c8baef1a24 100644\n--- a/src/libcamera/pipeline/uvcvideo.cpp\n+++ b/src/libcamera/pipeline/uvcvideo.cpp\n@@ -187,7 +187,7 @@ int PipelineHandlerUVC::configure(Camera *camera, CameraConfiguration *config)\n \tint ret;\n \n \tV4L2DeviceFormat format = {};\n-\tformat.fourcc = data->video_->toV4L2Fourcc(cfg.pixelFormat);\n+\tformat.fourcc = data->video_->toV4L2PixelFormat(cfg.pixelFormat);\n \tformat.size = cfg.size;\n \n \tret = data->video_->setFormat(&format);\n@@ -195,7 +195,7 @@ int PipelineHandlerUVC::configure(Camera *camera, CameraConfiguration *config)\n \t\treturn ret;\n \n \tif (format.size != cfg.size ||\n-\t    format.fourcc != data->video_->toV4L2Fourcc(cfg.pixelFormat))\n+\t    format.fourcc != data->video_->toV4L2PixelFormat(cfg.pixelFormat))\n \t\treturn -EINVAL;\n \n \tcfg.setStream(&data->stream_);\ndiff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp\nindex cbf330614bd6..1097eea243a1 100644\n--- a/src/libcamera/pipeline/vimc.cpp\n+++ b/src/libcamera/pipeline/vimc.cpp\n@@ -229,7 +229,7 @@ int PipelineHandlerVimc::configure(Camera *camera, CameraConfiguration *config)\n \t\treturn ret;\n \n \tV4L2DeviceFormat format = {};\n-\tformat.fourcc = data->video_->toV4L2Fourcc(cfg.pixelFormat);\n+\tformat.fourcc = data->video_->toV4L2PixelFormat(cfg.pixelFormat);\n \tformat.size = cfg.size;\n \n \tret = data->video_->setFormat(&format);\n@@ -237,7 +237,7 @@ int PipelineHandlerVimc::configure(Camera *camera, CameraConfiguration *config)\n \t\treturn ret;\n \n \tif (format.size != cfg.size ||\n-\t    format.fourcc != data->video_->toV4L2Fourcc(cfg.pixelFormat))\n+\t    format.fourcc != data->video_->toV4L2PixelFormat(cfg.pixelFormat))\n \t\treturn -EINVAL;\n \n \t/*\ndiff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\nindex 1c60014caa6f..496bc56b6f89 100644\n--- a/src/libcamera/v4l2_videodevice.cpp\n+++ b/src/libcamera/v4l2_videodevice.cpp\n@@ -1689,9 +1689,9 @@ PixelFormat V4L2VideoDevice::toPixelFormat(V4L2PixelFormat v4l2Fourcc)\n  *\n  * \\return The V4L2_PIX_FMT_* pixel format code corresponding to \\a pixelFormat\n  */\n-V4L2PixelFormat V4L2VideoDevice::toV4L2Fourcc(const PixelFormat &pixelFormat)\n+V4L2PixelFormat V4L2VideoDevice::toV4L2PixelFormat(const PixelFormat &pixelFormat)\n {\n-\treturn V4L2VideoDevice::toV4L2Fourcc(pixelFormat, caps_.isMultiplanar());\n+\treturn toV4L2PixelFormat(pixelFormat, caps_.isMultiplanar());\n }\n \n /**\n@@ -1707,8 +1707,8 @@ V4L2PixelFormat V4L2VideoDevice::toV4L2Fourcc(const PixelFormat &pixelFormat)\n  *\n  * \\return The V4L2_PIX_FMT_* pixel format code corresponding to \\a pixelFormat\n  */\n-V4L2PixelFormat V4L2VideoDevice::toV4L2Fourcc(const PixelFormat &pixelFormat,\n-\t\t\t\t\t      bool multiplanar)\n+V4L2PixelFormat V4L2VideoDevice::toV4L2PixelFormat(const PixelFormat &pixelFormat,\n+\t\t\t\t\t\t   bool multiplanar)\n {\n \tswitch (pixelFormat) {\n \t/* RGB formats. */\ndiff --git a/test/libtest/buffer_source.cpp b/test/libtest/buffer_source.cpp\nindex 26d2764d5f8f..dae3cb9f7a6c 100644\n--- a/test/libtest/buffer_source.cpp\n+++ b/test/libtest/buffer_source.cpp\n@@ -70,7 +70,8 @@ int BufferSource::allocate(const StreamConfiguration &config)\n \t}\n \n \tformat.size = config.size;\n-\tformat.fourcc = V4L2VideoDevice::toV4L2Fourcc(config.pixelFormat, false);\n+\tformat.fourcc = V4L2VideoDevice::toV4L2PixelFormat(config.pixelFormat,\n+\t\t\t\t\t\t\t   false);\n \tif (video->setFormat(&format)) {\n \t\tstd::cout << \"Failed to set format on output device\" << std::endl;\n \t\treturn TestFail;\n",
    "prefixes": [
        "libcamera-devel",
        "v3",
        "2/3"
    ]
}