Show a patch.

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

{
    "id": 2350,
    "url": "https://patchwork.libcamera.org/api/patches/2350/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/2350/",
    "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": "<20191126233620.1695316-3-niklas.soderlund@ragnatech.se>",
    "date": "2019-11-26T23:35:52",
    "name": "[libcamera-devel,02/30] libcamera: Remove buffer index from logging",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "c5fd27173d0aa8dc20cc1bfbb9a5d3318dbd65cf",
    "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/2350/mbox/",
    "series": [
        {
            "id": 579,
            "url": "https://patchwork.libcamera.org/api/series/579/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=579",
            "date": "2019-11-26T23:35:50",
            "name": "libcamera: Rework buffer API",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/579/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/2350/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/2350/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<niklas.soderlund@ragnatech.se>",
        "Received": [
            "from bin-mail-out-05.binero.net (bin-mail-out-05.binero.net\n\t[195.74.38.228])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 11EB960C21\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 27 Nov 2019 00:39:27 +0100 (CET)",
            "from bismarck.berto.se (p54ac5865.dip0.t-ipconnect.de\n\t[84.172.88.101]) by bin-vsp-out-02.atm.binero.net (Halon) with ESMTPA\n\tid fad60a2c-10a5-11ea-a0b9-005056917f90;\n\tWed, 27 Nov 2019 00:39:25 +0100 (CET)"
        ],
        "X-Halon-ID": "fad60a2c-10a5-11ea-a0b9-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": "Wed, 27 Nov 2019 00:35:52 +0100",
        "Message-Id": "<20191126233620.1695316-3-niklas.soderlund@ragnatech.se>",
        "X-Mailer": "git-send-email 2.24.0",
        "In-Reply-To": "<20191126233620.1695316-1-niklas.soderlund@ragnatech.se>",
        "References": "<20191126233620.1695316-1-niklas.soderlund@ragnatech.se>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 02/30] 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": "Tue, 26 Nov 2019 23:39:27 -0000"
    },
    "content": "The buffer index is a V4L2 concept that will be hidden from users when\nthe switch to FrameBuffer is complete, in preparation remove it from\nlogging.\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>\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 | 8 ++++----\n test/v4l2_videodevice/capture_async.cpp  | 2 +-\n test/v4l2_videodevice/v4l2_m2mdevice.cpp | 4 ++--\n 6 files changed, 10 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..dbb5c3982334e243 100644\n--- a/src/libcamera/v4l2_videodevice.cpp\n+++ b/src/libcamera/v4l2_videodevice.cpp\n@@ -1103,6 +1103,7 @@ Buffer *V4L2VideoDevice::dequeueBuffer()\n \t}\n \n \tASSERT(buf.index < bufferPool_->count());\n+\tLOG(V4L2, Debug) << \"Buffer \" << buf.index << \" is available\";\n \n \tauto it = queuedBuffers_.find(buf.index);\n \tBuffer *buffer = it->second;\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..d02c391b95933922 100644\n--- a/test/v4l2_videodevice/buffer_sharing.cpp\n+++ b/test/v4l2_videodevice/buffer_sharing.cpp\n@@ -92,8 +92,8 @@ 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  sequence \"\n+\t\t\t  << buffer->sequence() << std::endl;\n \n \t\tif (buffer->status() != Buffer::BufferSuccess)\n \t\t\treturn;\n@@ -104,8 +104,8 @@ 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 sequence \"\n+\t\t\t  << buffer->sequence() << 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..0bc0067c50909c9d 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 << \"Received buffer\" << 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",
        "02/30"
    ]
}