Patch Detail
Show a patch.
GET /api/1.1/patches/717/?format=api
{ "id": 717, "url": "https://patchwork.libcamera.org/api/1.1/patches/717/?format=api", "web_url": "https://patchwork.libcamera.org/patch/717/", "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": "<20190312121242.2253-3-jacopo@jmondi.org>", "date": "2019-03-12T12:12:30", "name": "[libcamera-devel,v2,02/14] libcamera: v4l2_subdevice: Define format enumeration type", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "bd78189d88cf569ecf2dec926850658f69c63772", "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/717/mbox/", "series": [ { "id": 205, "url": "https://patchwork.libcamera.org/api/1.1/series/205/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=205", "date": "2019-03-12T12:12:28", "name": "libcamera: ipu3: ImgU support", "version": 2, "mbox": "https://patchwork.libcamera.org/series/205/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/717/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/717/checks/", "tags": {}, "headers": { "Return-Path": "<jacopo@jmondi.org>", "Received": [ "from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net\n\t[217.70.183.197])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A9AA3610D5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 12 Mar 2019 13:12:20 +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 relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 417651C000A;\n\tTue, 12 Mar 2019 12:12:20 +0000 (UTC)" ], "X-Originating-IP": "2.224.242.101", "From": "Jacopo Mondi <jacopo@jmondi.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 12 Mar 2019 13:12:30 +0100", "Message-Id": "<20190312121242.2253-3-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20190312121242.2253-1-jacopo@jmondi.org>", "References": "<20190312121242.2253-1-jacopo@jmondi.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 02/14] libcamera: v4l2_subdevice:\n\tDefine format enumeration type", "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": "Tue, 12 Mar 2019 12:12:20 -0000" }, "content": "Provide a type definition for the map used to enumerate the subdevice\nimage formats and associated sizes.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/include/v4l2_subdevice.h | 5 +++--\n src/libcamera/v4l2_subdevice.cpp | 14 +++++++++++---\n 2 files changed, 14 insertions(+), 5 deletions(-)", "diff": "diff --git a/src/libcamera/include/v4l2_subdevice.h b/src/libcamera/include/v4l2_subdevice.h\nindex 700e66bcddac..15add95a825c 100644\n--- a/src/libcamera/include/v4l2_subdevice.h\n+++ b/src/libcamera/include/v4l2_subdevice.h\n@@ -17,6 +17,8 @@\n \n namespace libcamera {\n \n+typedef std::map<unsigned int, std::vector<SizeRange>> SubdevFormatEnum;\n+\n struct V4L2SubdeviceFormat {\n \tuint32_t mbus_code;\n \tuint32_t width;\n@@ -42,8 +44,7 @@ public:\n \tint setCrop(unsigned int pad, Rectangle *rect);\n \tint setCompose(unsigned int pad, Rectangle *rect);\n \n-\tconst std::map<unsigned int, std::vector<SizeRange>>\n-\t\t\t\t\t\tformats(unsigned int pad);\n+\tconst SubdevFormatEnum formats(unsigned int pad);\n \n \tint getFormat(unsigned int pad, V4L2SubdeviceFormat *format);\n \tint setFormat(unsigned int pad, V4L2SubdeviceFormat *format);\ndiff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp\nindex 7c56ba3ba510..153330bccc97 100644\n--- a/src/libcamera/v4l2_subdevice.cpp\n+++ b/src/libcamera/v4l2_subdevice.cpp\n@@ -28,6 +28,15 @@ namespace libcamera {\n \n LOG_DEFINE_CATEGORY(V4L2Subdev)\n \n+/**\n+ * \\typedef SubdevFormatEnum\n+ * \\brief Type definition for the map of image formats and associated sizes\n+ *\n+ * Type definition for the map of media bus codes and associated image\n+ * resolutions used by V4L2Subdevice to report the enumeration of supported\n+ * image formats.\n+ */\n+\n /**\n * \\struct V4L2SubdeviceFormat\n * \\brief The V4L2 sub-device image format and sizes\n@@ -210,10 +219,9 @@ int V4L2Subdevice::setCompose(unsigned int pad, Rectangle *rect)\n * \\return A map of image formats associated with a list of image sizes, or\n * an empty map on error or if the pad does not exist\n */\n-const std::map<unsigned int, std::vector<SizeRange>>\n-V4L2Subdevice::formats(unsigned int pad)\n+const SubdevFormatEnum V4L2Subdevice::formats(unsigned int pad)\n {\n-\tstd::map<unsigned int, std::vector<SizeRange>> formatMap = {};\n+\tSubdevFormatEnum formatMap = {};\n \tstruct v4l2_subdev_mbus_code_enum mbusEnum = {};\n \tint ret;\n \n", "prefixes": [ "libcamera-devel", "v2", "02/14" ] }