Patch Detail
Show a patch.
GET /api/1.1/patches/404/?format=api
{ "id": 404, "url": "https://patchwork.libcamera.org/api/1.1/patches/404/?format=api", "web_url": "https://patchwork.libcamera.org/patch/404/", "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": "<20190126151318.28087-4-jacopo@jmondi.org>", "date": "2019-01-26T15:13:18", "name": "[libcamera-devel,RFC,3/3,HACK] libcamera: uvc: set format on v4l2 device", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "4878921114f5cce218fb5719efb1b6746c435d0b", "submitter": { "id": 3, "url": "https://patchwork.libcamera.org/api/1.1/people/3/?format=api", "name": "Jacopo Mondi", "email": "jacopo@jmondi.org" }, "delegate": { "id": 15, "url": "https://patchwork.libcamera.org/api/1.1/users/15/?format=api", "username": "jmondi", "first_name": "Jacopo", "last_name": "Mondi", "email": "jacopo@jmondi.org" }, "mbox": "https://patchwork.libcamera.org/patch/404/mbox/", "series": [ { "id": 140, "url": "https://patchwork.libcamera.org/api/1.1/series/140/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=140", "date": "2019-01-26T15:13:15", "name": "v4l2-device: set and get format", "version": 1, "mbox": "https://patchwork.libcamera.org/series/140/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/404/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/404/checks/", "tags": {}, "headers": { "Return-Path": "<jacopo@jmondi.org>", "Received": [ "from relay11.mail.gandi.net (relay11.mail.gandi.net\n\t[217.70.178.231])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DD25060C80\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 26 Jan 2019 16:13:14 +0100 (CET)", "from uno.homenet.telecomitalia.it\n\t(host20-49-dynamic.18-79-r.retail.telecomitalia.it [79.18.49.20])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay11.mail.gandi.net (Postfix) with ESMTPSA id 54698100006;\n\tSat, 26 Jan 2019 15:13:14 +0000 (UTC)" ], "From": "Jacopo Mondi <jacopo@jmondi.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Sat, 26 Jan 2019 16:13:18 +0100", "Message-Id": "<20190126151318.28087-4-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20190126151318.28087-1-jacopo@jmondi.org>", "References": "<20190126151318.28087-1-jacopo@jmondi.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [RFC 3/3] [HACK] libcamera: uvc: set format on\n\tv4l2 device", "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": "Sat, 26 Jan 2019 15:13:15 -0000" }, "content": "Set the requested format on V4L2 device\nForce pixelformat as it is not set by the application.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/pipeline/uvcvideo.cpp | 3 +++\n 1 file changed, 3 insertions(+)", "diff": "diff --git a/src/libcamera/pipeline/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo.cpp\nindex ecc621e..2cf325b 100644\n--- a/src/libcamera/pipeline/uvcvideo.cpp\n+++ b/src/libcamera/pipeline/uvcvideo.cpp\n@@ -78,6 +78,9 @@ int PipelineHandlerUVC::configure(const Camera *camera,\n \tif (!cfg || cfg->id() != 0)\n \t\treturn -EINVAL;\n \n+\tcfg->setPixelFormat(V4L2_PIX_FMT_YUYV);\n+\tv4l2dev_->setFormat(cfg);\n+\n \tLOG(UVC, Info) << \"TODO: Configure the camera for resolution \" <<\n \t\tcfg->width() << \"x\" << cfg->height();\n \n", "prefixes": [ "libcamera-devel", "RFC", "3/3", "HACK" ] }