Patch Detail
Show a patch.
GET /api/patches/428/?format=api
{ "id": 428, "url": "https://patchwork.libcamera.org/api/patches/428/?format=api", "web_url": "https://patchwork.libcamera.org/patch/428/", "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": "<20190128005118.27099-1-niklas.soderlund@ragnatech.se>", "date": "2019-01-28T00:51:18", "name": "[libcamera-devel,v2] libcamera: pipeline: uvcvideo: add warning if no default video device is found", "commit_ref": "5745bd3df519ed3064b2e8d308b90834272504b8", "pull_url": null, "state": "accepted", "archived": false, "hash": "bdc3dce35bb4e749a7062ef993feef866027f064", "submitter": { "id": 5, "url": "https://patchwork.libcamera.org/api/people/5/?format=api", "name": "Niklas Söderlund", "email": "niklas.soderlund@ragnatech.se" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/428/mbox/", "series": [ { "id": 150, "url": "https://patchwork.libcamera.org/api/series/150/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=150", "date": "2019-01-28T00:51:18", "name": "[libcamera-devel,v2] libcamera: pipeline: uvcvideo: add warning if no default video device is found", "version": 2, "mbox": "https://patchwork.libcamera.org/series/150/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/428/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/428/checks/", "tags": {}, "headers": { "Return-Path": "<niklas.soderlund@ragnatech.se>", "Received": [ "from vsp-unauthed02.binero.net (vsp-unauthed02.binero.net\n\t[195.74.38.227])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A151260B2D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Jan 2019 01:51:24 +0100 (CET)", "from bismarck.berto.se (unknown [89.233.230.99])\n\tby bin-vsp-out-02.atm.binero.net (Halon) with ESMTPA\n\tid d3099eab-2296-11e9-874f-005056917f90;\n\tMon, 28 Jan 2019 01:51:22 +0100 (CET)" ], "X-Halon-ID": "d3099eab-2296-11e9-874f-005056917f90", "Authorized-sender": "niklas@soderlund.pp.se", "From": "=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 28 Jan 2019 01:51:18 +0100", "Message-Id": "<20190128005118.27099-1-niklas.soderlund@ragnatech.se>", "X-Mailer": "git-send-email 2.20.1", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2] libcamera: pipeline: uvcvideo: add\n\twarning if no default video device is found", "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": "Mon, 28 Jan 2019 00:51:24 -0000" }, "content": "If for any reason a default video device is not found in the media graph\nthe creation of the UVC pipeline silently failed. This is not optimal\nwhen debugging problems with the pipeline, add an error to notify the\nuser of the issue.\n\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n---\n src/libcamera/pipeline/uvcvideo.cpp | 6 ++++++\n 1 file changed, 6 insertions(+)\n---\n* Changes since v1\n- Make the log output an Error instead of a Warning", "diff": "diff --git a/src/libcamera/pipeline/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo.cpp\nindex c51e8bc1f2c2bf25..2ebdb2b9eb880174 100644\n--- a/src/libcamera/pipeline/uvcvideo.cpp\n+++ b/src/libcamera/pipeline/uvcvideo.cpp\n@@ -8,12 +8,15 @@\n #include <libcamera/camera.h>\n \n #include \"device_enumerator.h\"\n+#include \"log.h\"\n #include \"media_device.h\"\n #include \"pipeline_handler.h\"\n #include \"v4l2_device.h\"\n \n namespace libcamera {\n \n+LOG_DEFINE_CATEGORY(UVC)\n+\n class PipelineHandlerUVC : public PipelineHandler\n {\n public:\n@@ -60,6 +63,9 @@ bool PipelineHandlerUVC::match(DeviceEnumerator *enumerator)\n \t}\n \n \tif (!video_ || video_->open()) {\n+\t\tif (!video_)\n+\t\t\tLOG(UVC, Error) << \"Could not find a default video device\";\n+\n \t\tmedia_->release();\n \t\treturn false;\n \t}\n", "prefixes": [ "libcamera-devel", "v2" ] }