Patch Detail
Show a patch.
GET /api/patches/1281/?format=api
{ "id": 1281, "url": "https://patchwork.libcamera.org/api/patches/1281/?format=api", "web_url": "https://patchwork.libcamera.org/patch/1281/", "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": "<20190523164210.2105-6-paul.elder@ideasonboard.com>", "date": "2019-05-23T16:42:10", "name": "[libcamera-devel,RFC,v2,5/5] libcamera: pipelines: uvcvideo: add IPAManager", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "dc07b095348cf4ec5a8ab55c84b498617c70a485", "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/1281/mbox/", "series": [ { "id": 324, "url": "https://patchwork.libcamera.org/api/series/324/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=324", "date": "2019-05-23T16:42:05", "name": "Add IPAManager", "version": 2, "mbox": "https://patchwork.libcamera.org/series/324/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/1281/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/1281/checks/", "tags": {}, "headers": { "Return-Path": "<paul.elder@ideasonboard.com>", "Received": [ "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 21DBA618DC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 23 May 2019 18:42:28 +0200 (CEST)", "from localhost.localdomain (unknown [96.44.9.117])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5BB66B7C;\n\tThu, 23 May 2019 18:42:27 +0200 (CEST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1558629747;\n\tbh=M1kfpUtCh75E1PdZNKsWvaC6MhKxCknC/QpWO1NRT+k=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=SvWRYPf/2GedpaqZ0AfN5VRt/f3dLivaaAZae14kY9euyQcyEtbCHlneOgY9XSbpF\n\tIs7Oj8j34WbIl6C7zhdGsyDsDHaJnJjNArjIum9mwrI+MK+2w7ISkMIhF6nDzpdQ+R\n\txxlwakhBpKI+OPPMVzs1blP9YoXcDDBMQxN2hmeU=", "From": "Paul Elder <paul.elder@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 23 May 2019 12:42:10 -0400", "Message-Id": "<20190523164210.2105-6-paul.elder@ideasonboard.com>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20190523164210.2105-1-paul.elder@ideasonboard.com>", "References": "<20190523164210.2105-1-paul.elder@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [RFC PATCH v2 5/5] libcamera: pipelines:\n\tuvcvideo: add IPAManager", "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, 23 May 2019 16:42:28 -0000" }, "content": "Make the UVC pipeline query for one of the test IPA modules.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n---\nChanges in v2:\n- remove IPAManager from PipelineHandler::match parameter\n\nThis is a sample of how a IPAManager would be used.\n\n src/libcamera/pipeline/uvcvideo.cpp | 16 +++++++++++++++-\n 1 file changed, 15 insertions(+), 1 deletion(-)", "diff": "diff --git a/src/libcamera/pipeline/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo.cpp\nindex 351712c..8275f5a 100644\n--- a/src/libcamera/pipeline/uvcvideo.cpp\n+++ b/src/libcamera/pipeline/uvcvideo.cpp\n@@ -6,16 +6,20 @@\n */\n \n #include <libcamera/camera.h>\n+#include <libcamera/ipa/ipa_module_info.h>\n #include <libcamera/request.h>\n #include <libcamera/stream.h>\n \n #include \"device_enumerator.h\"\n+#include \"ipa_manager.h\"\n #include \"log.h\"\n #include \"media_device.h\"\n #include \"pipeline_handler.h\"\n #include \"utils.h\"\n #include \"v4l2_device.h\"\n \n+#include <string.h>\n+\n namespace libcamera {\n \n LOG_DEFINE_CATEGORY(UVC)\n@@ -175,6 +179,16 @@ bool PipelineHandlerUVC::match(DeviceEnumerator *enumerator)\n \tif (!media)\n \t\treturn false;\n \n+\tIPAManager *ipaManager = IPAManager::instance();\n+\tipaManager->addDir(\"test/ipa\");\n+\tstruct IPAModuleInfo info;\n+\tinfo.ipaAPIVersion = 1;\n+\tinfo.pipelineVersion = 8999;\n+\tstrcpy(info.pipelineName, \"bleep\");\n+\tIPAModule *ipa = ipaManager->acquireIPA(info);\n+\tif (ipa == nullptr)\n+\t\tLOG(UVC, Warning) << \"no matching IPA found\";\n+\n \tstd::unique_ptr<UVCCameraData> data = utils::make_unique<UVCCameraData>(this);\n \n \t/* Locate and open the default video node. */\n@@ -197,7 +211,7 @@ bool PipelineHandlerUVC::match(DeviceEnumerator *enumerator)\n \n \t/* Create and register the camera. */\n \tstd::set<Stream *> streams{ &data->stream_ };\n-\tstd::shared_ptr<Camera> camera = Camera::create(this, media->model(), streams);\n+\tstd::shared_ptr<Camera> camera = Camera::create(this, media->model() + \" \" + (ipa == nullptr ? \"\" : ipa->info().name), streams);\n \tregisterCamera(std::move(camera), std::move(data));\n \n \t/* Enable hot-unplug notifications. */\n", "prefixes": [ "libcamera-devel", "RFC", "v2", "5/5" ] }