Patch Detail
Show a patch.
GET /api/patches/14773/?format=api
{ "id": 14773, "url": "https://patchwork.libcamera.org/api/patches/14773/?format=api", "web_url": "https://patchwork.libcamera.org/patch/14773/", "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": "<20211125080518.779815-1-umang.jain@ideasonboard.com>", "date": "2021-11-25T08:05:18", "name": "[libcamera-devel] android: camera_device: Provide toString() helper for stream_type", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "ee09eea4164eb0e71902311e7b2d1dadf03d8d62", "submitter": { "id": 86, "url": "https://patchwork.libcamera.org/api/people/86/?format=api", "name": "Umang Jain", "email": "umang.jain@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/14773/mbox/", "series": [ { "id": 2753, "url": "https://patchwork.libcamera.org/api/series/2753/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2753", "date": "2021-11-25T08:05:18", "name": "[libcamera-devel] android: camera_device: Provide toString() helper for stream_type", "version": 1, "mbox": "https://patchwork.libcamera.org/series/2753/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/14773/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/14773/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\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id D8A2BBDB13\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 25 Nov 2021 08:05:27 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0B5AA60233;\n\tThu, 25 Nov 2021 09:05:27 +0100 (CET)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 73D1060228\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 25 Nov 2021 09:05:25 +0100 (CET)", "from perceval.ideasonboard.com (unknown [103.251.226.170])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 3D31090E;\n\tThu, 25 Nov 2021 09:05:23 +0100 (CET)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"iVVkOXkO\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1637827525;\n\tbh=uuu6qKx5kpNbrosqfGorVCdCd6lNOGlg4U5SmhNigbU=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=iVVkOXkOnxgzrO8Q1IjfSkzGGn70t2/5cRNAa7op4COYzZgWh3L4uZLbHyW/siOiS\n\tRKHDhNhLBpUhPRptCFPeQW4tLCWYWfa9ijXxaWE6eumf06r5kNyvcTEaACxo2FQlrb\n\taqdcXgVhIe2Peb6zaEScBrw5T4TZFDK6l16iiP0U=", "From": "Umang Jain <umang.jain@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 25 Nov 2021 13:35:18 +0530", "Message-Id": "<20211125080518.779815-1-umang.jain@ideasonboard.com>", "X-Mailer": "git-send-email 2.31.1", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH] android: camera_device: Provide\n\ttoString() helper for stream_type", "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>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Provide a directionToString() helper to return a human-friendly name\nfor camera3_stream_t->stream_type. Replace the int value being printed\nin configureStreams() INFO log with directionToString().\n\nSigned-off-by: Umang Jain <umang.jain@ideasonboard.com>\n---\n src/android/camera_device.cpp | 16 +++++++++++++++-\n 1 file changed, 15 insertions(+), 1 deletion(-)", "diff": "diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex f2e0bdbd..804a71fd 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -175,6 +175,20 @@ const char *rotationToString(int rotation)\n \treturn \"INVALID\";\n }\n \n+const char *directionToString(int stream_type)\n+{\n+\tswitch (stream_type) {\n+\tcase CAMERA3_STREAM_OUTPUT:\n+\t\treturn \"Output\";\n+\tcase CAMERA3_STREAM_INPUT:\n+\t\treturn \"Input\";\n+\tcase CAMERA3_STREAM_BIDIRECTIONAL:\n+\t\treturn \"Bidirectional\";\n+\t}\n+\n+\treturn \"Unknown\";\n+}\n+\n #if defined(OS_CHROMEOS)\n /*\n * Check whether the crop_rotate_scale_degrees values for all streams in\n@@ -548,7 +562,7 @@ int CameraDevice::configureStreams(camera3_stream_configuration_t *stream_list)\n \t\tPixelFormat format = capabilities_.toPixelFormat(stream->format);\n \n \t\tLOG(HAL, Info) << \"Stream #\" << i\n-\t\t\t << \", direction: \" << stream->stream_type\n+\t\t\t << \", direction: \" << directionToString(stream->stream_type)\n \t\t\t << \", width: \" << stream->width\n \t\t\t << \", height: \" << stream->height\n \t\t\t << \", format: \" << utils::hex(stream->format)\n", "prefixes": [ "libcamera-devel" ] }