Show a patch.

GET /api/patches/2430/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2430,
    "url": "https://patchwork.libcamera.org/api/patches/2430/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/2430/",
    "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": "<20191216124456.1049508-3-niklas.soderlund@ragnatech.se>",
    "date": "2019-12-16T12:44:56",
    "name": "[libcamera-devel,2/2] libcamera: Remove buffer index from logging",
    "commit_ref": "89dc54af09d4885a4134b332ddd9f82eef3789ad",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "e439c2dee2e5e96309d6c6fbe4f102cade0ecb47",
    "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/2430/mbox/",
    "series": [
        {
            "id": 589,
            "url": "https://patchwork.libcamera.org/api/series/589/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=589",
            "date": "2019-12-16T12:44:54",
            "name": "libcamera: Misc buffer fixes",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/589/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/2430/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/2430/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<niklas.soderlund@ragnatech.se>",
        "Received": [
            "from bin-mail-out-06.binero.net (bin-mail-out-06.binero.net\n\t[195.74.38.229])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 251C9601E4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 16 Dec 2019 13:45:37 +0100 (CET)",
            "from bismarck.berto.se (p54ac5865.dip0.t-ipconnect.de\n\t[84.172.88.101]) by bin-vsp-out-01.atm.binero.net (Halon) with ESMTPA\n\tid ebc2056e-2001-11ea-a00b-005056917a89;\n\tMon, 16 Dec 2019 13:45:33 +0100 (CET)"
        ],
        "X-Halon-ID": "ebc2056e-2001-11ea-a00b-005056917a89",
        "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, 16 Dec 2019 13:44:56 +0100",
        "Message-Id": "<20191216124456.1049508-3-niklas.soderlund@ragnatech.se>",
        "X-Mailer": "git-send-email 2.24.0",
        "In-Reply-To": "<20191216124456.1049508-1-niklas.soderlund@ragnatech.se>",
        "References": "<20191216124456.1049508-1-niklas.soderlund@ragnatech.se>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 2/2] libcamera: Remove buffer index from\n\tlogging",
        "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>",
        "X-List-Received-Date": "Mon, 16 Dec 2019 12:45:37 -0000"
    },
    "content": "The buffer index is a V4L2 concept that will be hidden from users with\nthe introduction of a new FrameBuffer class. In preparation for this,\nremove the index from log messages.\n\nKeep and move one debug log message where the index is available as the\nV4L2 buffer is being dequeued for the video device and it's useful when\ndebugging.\n\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/cam/capture.cpp                      | 3 +--\n src/libcamera/v4l2_videodevice.cpp       | 3 +--\n src/qcam/main_window.cpp                 | 3 +--\n test/v4l2_videodevice/buffer_sharing.cpp | 6 ++----\n test/v4l2_videodevice/capture_async.cpp  | 2 +-\n test/v4l2_videodevice/v4l2_m2mdevice.cpp | 4 ++--\n 6 files changed, 8 insertions(+), 13 deletions(-)",
    "diff": "diff --git a/src/cam/capture.cpp b/src/cam/capture.cpp\nindex e665d819fb777a90..4b65b1d0a2dbed35 100644\n--- a/src/cam/capture.cpp\n+++ b/src/cam/capture.cpp\n@@ -155,7 +155,6 @@ void Capture::requestComplete(Request *request)\n \t\tconst std::string &name = streamName_[stream];\n \n \t\tinfo << \" \" << name\n-\t\t     << \" (\" << buffer->index() << \")\"\n \t\t     << \" seq: \" << std::setw(6) << std::setfill('0') << buffer->sequence()\n \t\t     << \" bytesused: \" << buffer->bytesused();\n \n@@ -182,7 +181,7 @@ void Capture::requestComplete(Request *request)\n \n \t\tstd::unique_ptr<Buffer> newBuffer = stream->createBuffer(index);\n \t\tif (!newBuffer) {\n-\t\t\tstd::cerr << \"Can't create buffer \" << index << std::endl;\n+\t\t\tstd::cerr << \"Can't create buffer\" << std::endl;\n \t\t\treturn;\n \t\t}\n \ndiff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\nindex 992130751286994c..13e023237dab0daf 100644\n--- a/src/libcamera/v4l2_videodevice.cpp\n+++ b/src/libcamera/v4l2_videodevice.cpp\n@@ -1102,6 +1102,7 @@ Buffer *V4L2VideoDevice::dequeueBuffer()\n \t\treturn nullptr;\n \t}\n \n+\tLOG(V4L2, Debug) << \"Dequeuing buffer \" << buf.index;\n \tASSERT(buf.index < bufferPool_->count());\n \n \tauto it = queuedBuffers_.find(buf.index);\n@@ -1138,8 +1139,6 @@ void V4L2VideoDevice::bufferAvailable(EventNotifier *notifier)\n \tif (!buffer)\n \t\treturn;\n \n-\tLOG(V4L2, Debug) << \"Buffer \" << buffer->index() << \" is available\";\n-\n \t/* Notify anyone listening to the device. */\n \tbufferReady.emit(buffer);\n }\ndiff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp\nindex cca7365ae75687f9..0c7ca61ac12ec41c 100644\n--- a/src/qcam/main_window.cpp\n+++ b/src/qcam/main_window.cpp\n@@ -264,7 +264,6 @@ void MainWindow::requestComplete(Request *request)\n \tlastBufferTime_ = buffer->timestamp();\n \n \tstd::cout << \"seq: \" << std::setw(6) << std::setfill('0') << buffer->sequence()\n-\t\t  << \" buf: \" << buffer->index()\n \t\t  << \" bytesused: \" << buffer->bytesused()\n \t\t  << \" timestamp: \" << buffer->timestamp()\n \t\t  << \" fps: \" << std::fixed << std::setprecision(2) << fps\n@@ -285,7 +284,7 @@ void MainWindow::requestComplete(Request *request)\n \n \t\tstd::unique_ptr<Buffer> newBuffer = stream->createBuffer(index);\n \t\tif (!newBuffer) {\n-\t\t\tstd::cerr << \"Can't create buffer \" << index << std::endl;\n+\t\t\tstd::cerr << \"Can't create buffer\" << std::endl;\n \t\t\treturn;\n \t\t}\n \ndiff --git a/test/v4l2_videodevice/buffer_sharing.cpp b/test/v4l2_videodevice/buffer_sharing.cpp\nindex 1629f34cfa6c79fe..3a56862cb2b77d38 100644\n--- a/test/v4l2_videodevice/buffer_sharing.cpp\n+++ b/test/v4l2_videodevice/buffer_sharing.cpp\n@@ -92,8 +92,7 @@ protected:\n \n \tvoid captureBufferReady(Buffer *buffer)\n \t{\n-\t\tstd::cout << \"Received capture buffer: \" << buffer->index()\n-\t\t\t  << \" sequence \" << buffer->sequence() << std::endl;\n+\t\tstd::cout << \"Received capture buffer\" << std::endl;\n \n \t\tif (buffer->status() != Buffer::BufferSuccess)\n \t\t\treturn;\n@@ -104,8 +103,7 @@ protected:\n \n \tvoid outputBufferReady(Buffer *buffer)\n \t{\n-\t\tstd::cout << \"Received output buffer: \" << buffer->index()\n-\t\t\t  << \" sequence \" << buffer->sequence() << std::endl;\n+\t\tstd::cout << \"Received output buffer\" << std::endl;\n \n \t\tif (buffer->status() != Buffer::BufferSuccess)\n \t\t\treturn;\ndiff --git a/test/v4l2_videodevice/capture_async.cpp b/test/v4l2_videodevice/capture_async.cpp\nindex 442a4fe56eace57e..f62bbd837b213a0a 100644\n--- a/test/v4l2_videodevice/capture_async.cpp\n+++ b/test/v4l2_videodevice/capture_async.cpp\n@@ -22,7 +22,7 @@ public:\n \n \tvoid receiveBuffer(Buffer *buffer)\n \t{\n-\t\tstd::cout << \"Received buffer \" << buffer->index() << std::endl;\n+\t\tstd::cout << \"Buffer received\" << std::endl;\n \t\tframes++;\n \n \t\t/* Requeue the buffer for further use. */\ndiff --git a/test/v4l2_videodevice/v4l2_m2mdevice.cpp b/test/v4l2_videodevice/v4l2_m2mdevice.cpp\nindex 4d3644c2d28792f1..442bcac5dc49cc59 100644\n--- a/test/v4l2_videodevice/v4l2_m2mdevice.cpp\n+++ b/test/v4l2_videodevice/v4l2_m2mdevice.cpp\n@@ -31,7 +31,7 @@ public:\n \n \tvoid outputBufferComplete(Buffer *buffer)\n \t{\n-\t\tcout << \"Received output buffer \" << buffer->index() << endl;\n+\t\tcout << \"Received output buffer\" << endl;\n \n \t\toutputFrames_++;\n \n@@ -41,7 +41,7 @@ public:\n \n \tvoid receiveCaptureBuffer(Buffer *buffer)\n \t{\n-\t\tcout << \"Received capture buffer \" << buffer->index() << endl;\n+\t\tcout << \"Received capture buffer\" << endl;\n \n \t\tcaptureFrames_++;\n \n",
    "prefixes": [
        "libcamera-devel",
        "2/2"
    ]
}