[{"id":815,"web_url":"https://patchwork.libcamera.org/comment/815/","msgid":"<20190213160137.GJ5332@pendragon.ideasonboard.com>","date":"2019-02-13T16:01:37","subject":"Re: [libcamera-devel] [PATCH v2 8/8] test: v4l2_device: Provide\n\tbuffer sharing test","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nThank you for the patch.\n\nOn Wed, Feb 13, 2019 at 03:10:27PM +0000, Kieran Bingham wrote:\n> Obtain two V4L2Devices and use one to obtain a BufferPool.\n> \n> Propagate the formats from the first to the second device and then commence\n> sending buffers between the two devices in a ping-pong fashion.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>  test/v4l2_device/buffer_sharing.cpp | 179 ++++++++++++++++++++++++++++\n>  test/v4l2_device/meson.build        |   1 +\n>  2 files changed, 180 insertions(+)\n>  create mode 100644 test/v4l2_device/buffer_sharing.cpp\n> \n> diff --git a/test/v4l2_device/buffer_sharing.cpp b/test/v4l2_device/buffer_sharing.cpp\n> new file mode 100644\n> index 000000000000..f03201e82084\n> --- /dev/null\n> +++ b/test/v4l2_device/buffer_sharing.cpp\n> @@ -0,0 +1,179 @@\n> +/* SPDX-License-Identifier: GPL-2.0-or-later */\n> +/*\n> + * Copyright (C) 2019, Google Inc.\n> + *\n> + * libcamera V4L2 API tests\n> + *\n> + * Validate the function of exporting buffers from a V4L2Device and\n> + * the ability to import them to another V4L2Device instance.\n> + * Ensure that the Buffers can successfully be queued and dequeued\n> + * between both devices.\n> + */\n> +\n> +#include <iostream>\n> +\n> +#include <libcamera/buffer.h>\n> +#include <libcamera/camera_manager.h>\n> +#include <libcamera/event_dispatcher.h>\n> +#include <libcamera/timer.h>\n> +\n> +#include \"v4l2_device_test.h\"\n> +\n> +#include \"log.h\"\n> +\n> +LOG_DEFINE_CATEGORY(Test)\n\nCan you use std::cout until we implement a test logger ?\n\n> +class BufferSharingTest : public V4L2DeviceTest\n> +{\n> +public:\n> +\tBufferSharingTest()\n> +\t\t: output_(nullptr), framesCapture(0), framesOutput(0){};\n\n\tBufferSharingTest()\n\t\t: V4L2DeviceTest(), output_(nullptr), framesCapture(0),\n\t\t  framesOutput(0)\n\t{\n\t}\n\n> +\n> +private:\n> +\tconst unsigned int bufferCount = 4;\n> +\n> +\tV4L2Device *output_;\n> +\tstd::shared_ptr<MediaDevice> secondMedia_;\n\nThis can be removed.\n\n> +\n> +\tunsigned int framesCapture;\n\nframesCaptured_ ?\n\n> +\tunsigned int framesOutput;\n\nframesOutput_ ?\n\n> +\n> +protected:\n> +\tint init()\n> +\t{\n> +\t\tint ret = V4L2DeviceTest::init();\n> +\t\tif (ret)\n> +\t\t\treturn ret;\n> +\n> +\t\t/* media_ already represents VIVID */\n> +\t\tMediaEntity *entity = media_->getEntityByName(\"vivid-000-vid-out\");\n> +\t\tif (!entity)\n> +\t\t\treturn TestSkip;\n> +\n> +\t\toutput_ = new V4L2Device(entity);\n> +\t\tif (!output_)\n> +\t\t\treturn TestFail;\n> +\n> +\t\tret = output_->open();\n> +\t\tif (ret)\n> +\t\t\treturn TestFail;\n> +\n> +\t\tV4L2DeviceFormat format;\n\nYou should either initialise format to all 0 here (format = {}) or do so\nin V4L2Device::getFormat().\n\n> +\n> +\t\tret = dev_->getFormat(&format);\n> +\t\tif (ret) {\n> +\t\t\treturn TestFail;\n> +\t\t}\n\nNo need for braces. Or rather please keep them and log a message\nexplaining the cause of the error. Same for the other TestFail above and\nbelow.\n\n> +\n> +\t\tLOG(Test, Info) << \"Successfully obtained format from source\";\n\nIf we log failures I think you can remove this and the other LOG()\ninstance below.\n\n> +\t\tret = output_->setFormat(&format);\n> +\t\tif (ret)\n> +\t\t\treturn TestFail;\n> +\n> +\t\tLOG(Test, Info) << \"Successfully set format to output\";\n> +\n> +\t\tpool_.createBuffers(bufferCount);\n> +\n> +\t\tret = dev_->exportBuffers(&pool_);\n\nShould we rename dev_ to capture_ in the base class ?\n\n> +\t\tif (ret)\n> +\t\t\treturn TestFail;\n> +\n> +\t\tret = output_->importBuffers(&pool_);\n> +\t\tif (ret) {\n> +\t\t\tstd::cerr << \"Failed to import buffers\" << std::endl;\n> +\t\t\treturn TestFail;\n> +\t\t}\n> +\n> +\t\treturn 0;\n> +\t}\n> +\n> +\tvoid receiveSourceBuffer(Buffer *buffer)\n\nHow about captureBufferReady() ?\n\n> +\t{\n> +\t\tstd::cout << \"Received source buffer: \" << buffer->index()\n> +\t\t\t  << \" sequence \" << buffer->sequence() << std::endl;\n> +\n> +\t\toutput_->queueBuffer(buffer);\n> +\t\tframesCapture++;\n> +\t}\n> +\n> +\tvoid receiveDestinationBuffer(Buffer *buffer)\n\nAnd outputBufferReady() ?\n\nSource and destination could be a bit confusing. I'd rework the messages\naccordingly.\n\n> +\t{\n> +\t\tstd::cout << \"Received destination buffer: \" << buffer->index()\n> +\t\t\t  << \" sequence \" << buffer->sequence() << std::endl;\n> +\n> +\t\tdev_->queueBuffer(buffer);\n> +\t\tframesOutput++;\n> +\t}\n> +\n> +\tint run()\n> +\t{\n> +\t\tEventDispatcher *dispatcher = CameraManager::instance()->eventDispatcher();\n> +\t\tTimer timeout;\n> +\t\tint ret;\n> +\n> +\t\tdev_->bufferReady.connect(this, &BufferSharingTest::receiveSourceBuffer);\n> +\t\toutput_->bufferReady.connect(this, &BufferSharingTest::receiveDestinationBuffer);\n> +\n> +\t\t/* Queue all the buffers to the device. */\n\n... to the capture device.\n\n> +\t\tfor (Buffer &b : pool_.buffers()) {\n\nI'd spell buffer in full.\n\n> +\t\t\tif (dev_->queueBuffer(&b))\n> +\t\t\t\treturn TestFail;\n> +\t\t}\n> +\n> +\t\tret = dev_->streamOn();\n> +\t\tif (ret)\n> +\t\t\treturn TestFail;\n> +\n> +\t\tret = output_->streamOn();\n> +\t\tif (ret)\n> +\t\t\treturn TestFail;\n> +\n> +\t\ttimeout.start(10000);\n> +\t\twhile (timeout.isRunning()) {\n> +\t\t\tdispatcher->processEvents();\n> +\t\t\tif (framesCapture > 30 && framesOutput > 30)\n> +\t\t\t\tbreak;\n> +\t\t}\n> +\n> +\t\tif ((framesCapture < 1) || (framesOutput < 1)) {\n> +\t\t\tstd::cout << \"Failed to process any frames within timeout.\" << std::endl;\n> +\t\t\treturn TestFail;\n> +\t\t}\n> +\n> +\t\tif ((framesCapture < 30) || (framesOutput < 30)) {\n> +\t\t\tstd::cout << \"Failed to process 30 frames within timeout.\" << std::endl;\n> +\t\t\treturn TestFail;\n> +\t\t}\n> +\n> +\t\tret = dev_->streamOff();\n> +\t\tif (ret)\n> +\t\t\treturn TestFail;\n> +\n> +\t\tret = output_->streamOff();\n> +\t\tif (ret)\n> +\t\t\treturn TestFail;\n> +\n> +\t\treturn TestPass;\n> +\t}\n> +\n> +\tvoid cleanup()\n> +\t{\n> +\t\tstd::cout\n> +\t\t\t<< \"Processed \" << framesCapture << \" capture frames\"\n> +\t\t\t<< \" and \" << framesOutput << \" output frames\"\n> +\t\t\t<< std::endl;\n\nMaybe \"Captured ... frames and output ... frames\" ?\n\n> +\n> +\t\tdev_->streamOff();\n> +\t\toutput_->streamOff();\n> +\n> +\t\tif (secondMedia_)\n> +\t\t\tsecondMedia_->release();\n\nYou should free buffers on both devices (for the capture device likely\nin the base class).\n\n> +\t\tdelete output_;\n> +\n> +\t\tV4L2DeviceTest::cleanup();\n> +\t}\n> +};\n> +\n> +TEST_REGISTER(BufferSharingTest);\n> diff --git a/test/v4l2_device/meson.build b/test/v4l2_device/meson.build\n> index ec2c7f9f11ff..9f7a7545ac9b 100644\n> --- a/test/v4l2_device/meson.build\n> +++ b/test/v4l2_device/meson.build\n> @@ -5,6 +5,7 @@ v4l2_device_tests = [\n>    [ 'request_buffers',    'request_buffers.cpp' ],\n>    [ 'stream_on_off',      'stream_on_off.cpp' ],\n>    [ 'capture_async',      'capture_async.cpp' ],\n> +  [ 'buffer_sharing',     'buffer_sharing.cpp' ],\n>  ]\n>  \n>  foreach t : v4l2_device_tests","headers":{"Return-Path":"<laurent.pinchart@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 55621610AE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 13 Feb 2019 17:01:41 +0100 (CET)","from pendragon.ideasonboard.com\n\t(dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi\n\t[IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BE26685;\n\tWed, 13 Feb 2019 17:01:40 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1550073700;\n\tbh=GHc8t6GwIomjKQolnhszkdH6gclftd2tI0nc6Nl6h74=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=eteFZyFfkXsLQy3eGW5hb894EfsncvGs8pCqTCFmgRTRoTkHQWoTtAf4t/taXQ7ML\n\tN+OyrvTbIYKS3icbK1hgDixIbFr5wOeCz8TJv9dfs7vKKwWjTDbzLXjaGoccwOxE/b\n\tUPmEHgETyScev3B+pzmtIUXw5ZV7Suh0d0CookAI=","Date":"Wed, 13 Feb 2019 18:01:37 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","Message-ID":"<20190213160137.GJ5332@pendragon.ideasonboard.com>","References":"<20190213151027.6376-1-kieran.bingham@ideasonboard.com>\n\t<20190213151027.6376-9-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20190213151027.6376-9-kieran.bingham@ideasonboard.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v2 8/8] test: v4l2_device: Provide\n\tbuffer sharing test","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":"Wed, 13 Feb 2019 16:01:41 -0000"}},{"id":816,"web_url":"https://patchwork.libcamera.org/comment/816/","msgid":"<6b06dc34-f968-635a-2825-21bf22c67113@ideasonboard.com>","date":"2019-02-13T16:02:59","subject":"Re: [libcamera-devel] [PATCH v2 8/8] test: v4l2_device: Provide\n\tbuffer sharing test","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"On 13/02/2019 16:01, Laurent Pinchart wrote:\n> Can you use std::cout until we implement a test logger ?\n\nArgh - yes - sorry - I was meant to have changed that already.","headers":{"Return-Path":"<kieran.bingham@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BAAEC610AE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 13 Feb 2019 17:03:01 +0100 (CET)","from [192.168.0.21]\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 558BC85;\n\tWed, 13 Feb 2019 17:03:01 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1550073781;\n\tbh=V1T94T5TiML1nUSiCrdhApuS4Xl0onwP74Hf5hoO0FM=;\n\th=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=eHqZMTd0BPhdmNFp30wvOivPxPBKVXqB9YXSCMgKmnihp/VIjt/ImIIytjfcQeJrE\n\tq7+WXRSURdNq0MH5Qt4KIuwZLSsxZLRljMLYw7TJPNpAFS2KOfdTjDHuvQ+ljtIbZC\n\tFx3WEoPcDdmeeFTEov0uji4EiYnuP3AjMQUgMaBc=","Reply-To":"kieran.bingham@ideasonboard.com","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","References":"<20190213151027.6376-1-kieran.bingham@ideasonboard.com>\n\t<20190213151027.6376-9-kieran.bingham@ideasonboard.com>\n\t<20190213160137.GJ5332@pendragon.ideasonboard.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Openpgp":"preference=signencrypt","Autocrypt":"addr=kieran.bingham@ideasonboard.com; keydata=\n\tmQINBFYE/WYBEACs1PwjMD9rgCu1hlIiUA1AXR4rv2v+BCLUq//vrX5S5bjzxKAryRf0uHat\n\tV/zwz6hiDrZuHUACDB7X8OaQcwhLaVlq6byfoBr25+hbZG7G3+5EUl9cQ7dQEdvNj6V6y/SC\n\trRanWfelwQThCHckbobWiQJfK9n7rYNcPMq9B8e9F020LFH7Kj6YmO95ewJGgLm+idg1Kb3C\n\tpotzWkXc1xmPzcQ1fvQMOfMwdS+4SNw4rY9f07Xb2K99rjMwZVDgESKIzhsDB5GY465sCsiQ\n\tcSAZRxqE49RTBq2+EQsbrQpIc8XiffAB8qexh5/QPzCmR4kJgCGeHIXBtgRj+nIkCJPZvZtf\n\tKr2EAbc6tgg6DkAEHJb+1okosV09+0+TXywYvtEop/WUOWQ+zo+Y/OBd+8Ptgt1pDRyOBzL8\n\tRXa8ZqRf0Mwg75D+dKntZeJHz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j8qYvP8pvGwMQfrmN9YB0zB39YzCSdaUaNrWGD3iCBxg6lwSO\n\tLKeRhxxfiXCIYEf3vwOsP3YMx2JkD5doseXmWBGW1U0T/oJF+DVfKB6mv5UfsTzpVhJRgee7\n\t4jkjqFq4qsUGxcvF2xtRkfHFpZDbRgRlVmiWkqDkT4qMA+4q1y/dWwshSKi/uwVZNycuLsz+\n\t+OD8xPNCsMTqeUkAKfbD8xW4LCay3r/dD2ckoxRxtMD9eOAyu5wYzo/ydIPTh1QEj9SYyvp8\n\tO0g6CpxEwyHUQtF5oh15O018z3ZLztFJKR3RD42VKVsrnNDKnoY0f4U0z7eJv2NeF8xHMuiU\n\tRCIzqxX1GVYaNkKTnb/Qja8hnYnkUzY1Lc+OtwiGmXTwYsPZjjAaDX35J/RSKAoy5wGo/YFA\n\tJxB1gWThL4kOTbsqqXj9GLcyOImkW0lJGGR3o/fV91Zh63S5TKnf2YGGGzxki+ADdxVQAm+Q\n\tsbsRB8KNNvVXBOVNwko86rQqF9drZuw=","Organization":"Ideas on Board","Message-ID":"<6b06dc34-f968-635a-2825-21bf22c67113@ideasonboard.com>","Date":"Wed, 13 Feb 2019 16:02:59 +0000","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101\n\tThunderbird/60.4.0","MIME-Version":"1.0","In-Reply-To":"<20190213160137.GJ5332@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH v2 8/8] test: v4l2_device: Provide\n\tbuffer sharing test","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":"Wed, 13 Feb 2019 16:03:02 -0000"}},{"id":817,"web_url":"https://patchwork.libcamera.org/comment/817/","msgid":"<c18e520b-3174-c9c2-f49a-0adfdc9e06dd@ideasonboard.com>","date":"2019-02-13T16:19:08","subject":"Re: [libcamera-devel] [PATCH v2 8/8] test: v4l2_device: Provide\n\tbuffer sharing test","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"On 13/02/2019 16:01, Laurent Pinchart wrote:\n> Hi Kieran,\n> \n> Thank you for the patch.\n> \n> On Wed, Feb 13, 2019 at 03:10:27PM +0000, Kieran Bingham wrote:\n>> Obtain two V4L2Devices and use one to obtain a BufferPool.\n>>\n>> Propagate the formats from the first to the second device and then commence\n>> sending buffers between the two devices in a ping-pong fashion.\n>>\n>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>> ---\n>>  test/v4l2_device/buffer_sharing.cpp | 179 ++++++++++++++++++++++++++++\n>>  test/v4l2_device/meson.build        |   1 +\n>>  2 files changed, 180 insertions(+)\n>>  create mode 100644 test/v4l2_device/buffer_sharing.cpp\n>>\n>> diff --git a/test/v4l2_device/buffer_sharing.cpp b/test/v4l2_device/buffer_sharing.cpp\n>> new file mode 100644\n>> index 000000000000..f03201e82084\n>> --- /dev/null\n>> +++ b/test/v4l2_device/buffer_sharing.cpp\n>> @@ -0,0 +1,179 @@\n>> +/* SPDX-License-Identifier: GPL-2.0-or-later */\n>> +/*\n>> + * Copyright (C) 2019, Google Inc.\n>> + *\n>> + * libcamera V4L2 API tests\n>> + *\n>> + * Validate the function of exporting buffers from a V4L2Device and\n>> + * the ability to import them to another V4L2Device instance.\n>> + * Ensure that the Buffers can successfully be queued and dequeued\n>> + * between both devices.\n>> + */\n>> +\n>> +#include <iostream>\n>> +\n>> +#include <libcamera/buffer.h>\n>> +#include <libcamera/camera_manager.h>\n>> +#include <libcamera/event_dispatcher.h>\n>> +#include <libcamera/timer.h>\n>> +\n>> +#include \"v4l2_device_test.h\"\n>> +\n>> +#include \"log.h\"\n>> +\n>> +LOG_DEFINE_CATEGORY(Test)\n> \n> Can you use std::cout until we implement a test logger ?\n\n#include \"log.h\" removed :) (thus all LOGs)\n\n> \n>> +class BufferSharingTest : public V4L2DeviceTest\n>> +{\n>> +public:\n>> +\tBufferSharingTest()\n>> +\t\t: output_(nullptr), framesCapture(0), framesOutput(0){};\n> \n> \tBufferSharingTest()\n> \t\t: V4L2DeviceTest(), output_(nullptr), framesCapture(0),\n> \t\t  framesOutput(0)\n> \t{\n> \t}\n> \n>> +\n>> +private:\n>> +\tconst unsigned int bufferCount = 4;\n>> +\n>> +\tV4L2Device *output_;\n>> +\tstd::shared_ptr<MediaDevice> secondMedia_;\n> \n> This can be removed.\n> \n>> +\n>> +\tunsigned int framesCapture;\n> \n> framesCaptured_ ?\n\nSure.\n\n> \n>> +\tunsigned int framesOutput;\n> \n> framesOutput_ ?\n> \n\nDone.\n\n\n>> +\n>> +protected:\n>> +\tint init()\n>> +\t{\n>> +\t\tint ret = V4L2DeviceTest::init();\n>> +\t\tif (ret)\n>> +\t\t\treturn ret;\n>> +\n>> +\t\t/* media_ already represents VIVID */\n>> +\t\tMediaEntity *entity = media_->getEntityByName(\"vivid-000-vid-out\");\n>> +\t\tif (!entity)\n>> +\t\t\treturn TestSkip;\n>> +\n>> +\t\toutput_ = new V4L2Device(entity);\n>> +\t\tif (!output_)\n>> +\t\t\treturn TestFail;\n>> +\n>> +\t\tret = output_->open();\n>> +\t\tif (ret)\n>> +\t\t\treturn TestFail;\n>> +\n>> +\t\tV4L2DeviceFormat format;\n> \n> You should either initialise format to all 0 here (format = {}) or do so\n> in V4L2Device::getFormat().\n\nReally? format is a class? Shouldn't it's constructor do that?\nHrm ... it has no constructor :(\n\n\n\n>> +\n>> +\t\tret = dev_->getFormat(&format);\n>> +\t\tif (ret) {\n>> +\t\t\treturn TestFail;\n>> +\t\t}\n> \n> No need for braces. Or rather please keep them and log a message\n> explaining the cause of the error. Same for the other TestFail above and\n> below.\n> \n>> +\n>> +\t\tLOG(Test, Info) << \"Successfully obtained format from source\";\n> \n> If we log failures I think you can remove this and the other LOG()\n> instance below.\n> \n>> +\t\tret = output_->setFormat(&format);\n>> +\t\tif (ret)\n>> +\t\t\treturn TestFail;\n>> +\n>> +\t\tLOG(Test, Info) << \"Successfully set format to output\";\n>> +\n>> +\t\tpool_.createBuffers(bufferCount);\n>> +\n>> +\t\tret = dev_->exportBuffers(&pool_);\n> \n> Should we rename dev_ to capture_ in the base class ?\n\nThat seems reasonable now.\n\nLets handle that separately though.\n\n\n> \n>> +\t\tif (ret)\n>> +\t\t\treturn TestFail;\n>> +\n>> +\t\tret = output_->importBuffers(&pool_);\n>> +\t\tif (ret) {\n>> +\t\t\tstd::cerr << \"Failed to import buffers\" << std::endl;\n>> +\t\t\treturn TestFail;\n>> +\t\t}\n>> +\n>> +\t\treturn 0;\n>> +\t}\n>> +\n>> +\tvoid receiveSourceBuffer(Buffer *buffer)\n> \n> How about captureBufferReady() ?\n> \n>> +\t{\n>> +\t\tstd::cout << \"Received source buffer: \" << buffer->index()\n>> +\t\t\t  << \" sequence \" << buffer->sequence() << std::endl;\n>> +\n>> +\t\toutput_->queueBuffer(buffer);\n>> +\t\tframesCapture++;\n>> +\t}\n>> +\n>> +\tvoid receiveDestinationBuffer(Buffer *buffer)\n> \n> And outputBufferReady() ?\n> \n> Source and destination could be a bit confusing. I'd rework the messages\n> accordingly.\n\nDone\n\n> \n>> +\t{\n>> +\t\tstd::cout << \"Received destination buffer: \" << buffer->index()\n>> +\t\t\t  << \" sequence \" << buffer->sequence() << std::endl;\n>> +\n>> +\t\tdev_->queueBuffer(buffer);\n>> +\t\tframesOutput++;\n>> +\t}\n>> +\n>> +\tint run()\n>> +\t{\n>> +\t\tEventDispatcher *dispatcher = CameraManager::instance()->eventDispatcher();\n>> +\t\tTimer timeout;\n>> +\t\tint ret;\n>> +\n>> +\t\tdev_->bufferReady.connect(this, &BufferSharingTest::receiveSourceBuffer);\n>> +\t\toutput_->bufferReady.connect(this, &BufferSharingTest::receiveDestinationBuffer);\n>> +\n>> +\t\t/* Queue all the buffers to the device. */\n> \n> ... to the capture device.\n\ndone\n\n> \n>> +\t\tfor (Buffer &b : pool_.buffers()) {\n> \n> I'd spell buffer in full.\n\ndone\n\n> \n>> +\t\t\tif (dev_->queueBuffer(&b))\n>> +\t\t\t\treturn TestFail;\n>> +\t\t}\n>> +\n>> +\t\tret = dev_->streamOn();\n>> +\t\tif (ret)\n>> +\t\t\treturn TestFail;\n>> +\n>> +\t\tret = output_->streamOn();\n>> +\t\tif (ret)\n>> +\t\t\treturn TestFail;\n>> +\n>> +\t\ttimeout.start(10000);\n>> +\t\twhile (timeout.isRunning()) {\n>> +\t\t\tdispatcher->processEvents();\n>> +\t\t\tif (framesCapture > 30 && framesOutput > 30)\n>> +\t\t\t\tbreak;\n>> +\t\t}\n>> +\n>> +\t\tif ((framesCapture < 1) || (framesOutput < 1)) {\n>> +\t\t\tstd::cout << \"Failed to process any frames within timeout.\" << std::endl;\n>> +\t\t\treturn TestFail;\n>> +\t\t}\n>> +\n>> +\t\tif ((framesCapture < 30) || (framesOutput < 30)) {\n>> +\t\t\tstd::cout << \"Failed to process 30 frames within timeout.\" << std::endl;\n>> +\t\t\treturn TestFail;\n>> +\t\t}\n>> +\n>> +\t\tret = dev_->streamOff();\n>> +\t\tif (ret)\n>> +\t\t\treturn TestFail;\n>> +\n>> +\t\tret = output_->streamOff();\n>> +\t\tif (ret)\n>> +\t\t\treturn TestFail;\n>> +\n>> +\t\treturn TestPass;\n>> +\t}\n>> +\n>> +\tvoid cleanup()\n>> +\t{\n>> +\t\tstd::cout\n>> +\t\t\t<< \"Processed \" << framesCapture << \" capture frames\"\n>> +\t\t\t<< \" and \" << framesOutput << \" output frames\"\n>> +\t\t\t<< std::endl;\n> \n> Maybe \"Captured ... frames and output ... frames\" ?\n\nSure.\n\n\n> \n>> +\n>> +\t\tdev_->streamOff();\n>> +\t\toutput_->streamOff();\n>> +\n>> +\t\tif (secondMedia_)\n>> +\t\t\tsecondMedia_->release();\n> \n> You should free buffers on both devices (for the capture device likely\n> in the base class).\nWould you object to the destructor doing these things ? (as well?) as a\ncatch all?\n\n\n>> +\t\tdelete output_;\n>> +\n>> +\t\tV4L2DeviceTest::cleanup();\n>> +\t}\n>> +};\n>> +\n>> +TEST_REGISTER(BufferSharingTest);\n>> diff --git a/test/v4l2_device/meson.build b/test/v4l2_device/meson.build\n>> index ec2c7f9f11ff..9f7a7545ac9b 100644\n>> --- a/test/v4l2_device/meson.build\n>> +++ b/test/v4l2_device/meson.build\n>> @@ -5,6 +5,7 @@ v4l2_device_tests = [\n>>    [ 'request_buffers',    'request_buffers.cpp' ],\n>>    [ 'stream_on_off',      'stream_on_off.cpp' ],\n>>    [ 'capture_async',      'capture_async.cpp' ],\n>> +  [ 'buffer_sharing',     'buffer_sharing.cpp' ],\n>>  ]\n>>  \n>>  foreach t : v4l2_device_tests\n>","headers":{"Return-Path":"<kieran.bingham@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 90777610AE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 13 Feb 2019 17:19:11 +0100 (CET)","from [192.168.0.21]\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E7D7585;\n\tWed, 13 Feb 2019 17:19:10 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1550074751;\n\tbh=FLxVSDcDfFGRAir6dzgN5N0iqsdqjc9OmXf9VEheaOI=;\n\th=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=pJ3+N1VM+ePBUmJ63pohtPBGXzKIRr3pkU0EGfY1iI4v09SKZc5v3wiqHK7uB1WU/\n\tZY/o5nfxu4Xqb3gAw3xbLI0Pjvjw+jYuFKEswOtZucwC+RoxZILASY/LK3yc9nGHAR\n\tDF3Q5uKpUJvovqucd++3C8VXzmQ3lHqTxZcg2bsM=","Reply-To":"kieran.bingham@ideasonboard.com","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","References":"<20190213151027.6376-1-kieran.bingham@ideasonboard.com>\n\t<20190213151027.6376-9-kieran.bingham@ideasonboard.com>\n\t<20190213160137.GJ5332@pendragon.ideasonboard.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Openpgp":"preference=signencrypt","Autocrypt":"addr=kieran.bingham@ideasonboard.com; keydata=\n\tmQINBFYE/WYBEACs1PwjMD9rgCu1hlIiUA1AXR4rv2v+BCLUq//vrX5S5bjzxKAryRf0uHat\n\tV/zwz6hiDrZuHUACDB7X8OaQcwhLaVlq6byfoBr25+hbZG7G3+5EUl9cQ7dQEdvNj6V6y/SC\n\trRanWfelwQThCHckbobWiQJfK9n7rYNcPMq9B8e9F020LFH7Kj6YmO95ewJGgLm+idg1Kb3C\n\tpotzWkXc1xmPzcQ1fvQMOfMwdS+4SNw4rY9f07Xb2K99rjMwZVDgESKIzhsDB5GY465sCsiQ\n\tcSAZRxqE49RTBq2+EQsbrQpIc8XiffAB8qexh5/QPzCmR4kJgCGeHIXBtgRj+nIkCJPZvZtf\n\tKr2EAbc6tgg6DkAEHJb+1okosV09+0+TXywYvtEop/WUOWQ+zo+Y/OBd+8Ptgt1pDRyOBzL8\n\tRXa8ZqRf0Mwg75D+dKntZeJHzPRJyrlfQokngAAs4PaFt6UfS+ypMAF37T6CeDArQC41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iCBxg6lwSO\n\tLKeRhxxfiXCIYEf3vwOsP3YMx2JkD5doseXmWBGW1U0T/oJF+DVfKB6mv5UfsTzpVhJRgee7\n\t4jkjqFq4qsUGxcvF2xtRkfHFpZDbRgRlVmiWkqDkT4qMA+4q1y/dWwshSKi/uwVZNycuLsz+\n\t+OD8xPNCsMTqeUkAKfbD8xW4LCay3r/dD2ckoxRxtMD9eOAyu5wYzo/ydIPTh1QEj9SYyvp8\n\tO0g6CpxEwyHUQtF5oh15O018z3ZLztFJKR3RD42VKVsrnNDKnoY0f4U0z7eJv2NeF8xHMuiU\n\tRCIzqxX1GVYaNkKTnb/Qja8hnYnkUzY1Lc+OtwiGmXTwYsPZjjAaDX35J/RSKAoy5wGo/YFA\n\tJxB1gWThL4kOTbsqqXj9GLcyOImkW0lJGGR3o/fV91Zh63S5TKnf2YGGGzxki+ADdxVQAm+Q\n\tsbsRB8KNNvVXBOVNwko86rQqF9drZuw=","Organization":"Ideas on Board","Message-ID":"<c18e520b-3174-c9c2-f49a-0adfdc9e06dd@ideasonboard.com>","Date":"Wed, 13 Feb 2019 16:19:08 +0000","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101\n\tThunderbird/60.4.0","MIME-Version":"1.0","In-Reply-To":"<20190213160137.GJ5332@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH v2 8/8] test: v4l2_device: Provide\n\tbuffer sharing test","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":"Wed, 13 Feb 2019 16:19:11 -0000"}},{"id":818,"web_url":"https://patchwork.libcamera.org/comment/818/","msgid":"<d5c5c1a9-0629-ab46-0ca6-1c2c22946644@ideasonboard.com>","date":"2019-02-13T16:23:07","subject":"Re: [libcamera-devel] [PATCH v2 8/8] test: v4l2_device: Provide\n\tbuffer sharing test","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Laurent,\n\nOn 13/02/2019 16:01, Laurent Pinchart wrote:\n> Hi Kieran,\n> \n> Thank you for the patch.\n> \n> On Wed, Feb 13, 2019 at 03:10:27PM +0000, Kieran Bingham wrote:\n>> Obtain two V4L2Devices and use one to obtain a BufferPool.\n>>\n>> Propagate the formats from the first to the second device and then commence\n>> sending buffers between the two devices in a ping-pong fashion.\n>>\n>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>> ---\n>>  test/v4l2_device/buffer_sharing.cpp | 179 ++++++++++++++++++++++++++++\n>>  test/v4l2_device/meson.build        |   1 +\n>>  2 files changed, 180 insertions(+)\n>>  create mode 100644 test/v4l2_device/buffer_sharing.cpp\n>>\n>> diff --git a/test/v4l2_device/buffer_sharing.cpp b/test/v4l2_device/buffer_sharing.cpp\n>> new file mode 100644\n>> index 000000000000..f03201e82084\n>> --- /dev/null\n>> +++ b/test/v4l2_device/buffer_sharing.cpp\n>> @@ -0,0 +1,179 @@\n>> +/* SPDX-License-Identifier: GPL-2.0-or-later */\n>> +/*\n>> + * Copyright (C) 2019, Google Inc.\n>> + *\n>> + * libcamera V4L2 API tests\n>> + *\n>> + * Validate the function of exporting buffers from a V4L2Device and\n>> + * the ability to import them to another V4L2Device instance.\n>> + * Ensure that the Buffers can successfully be queued and dequeued\n>> + * between both devices.\n>> + */\n>> +\n>> +#include <iostream>\n>> +\n>> +#include <libcamera/buffer.h>\n>> +#include <libcamera/camera_manager.h>\n>> +#include <libcamera/event_dispatcher.h>\n>> +#include <libcamera/timer.h>\n>> +\n>> +#include \"v4l2_device_test.h\"\n>> +\n>> +#include \"log.h\"\n>> +\n>> +LOG_DEFINE_CATEGORY(Test)\n> \n> Can you use std::cout until we implement a test logger ?\n> \n>> +class BufferSharingTest : public V4L2DeviceTest\n>> +{\n>> +public:\n>> +\tBufferSharingTest()\n>> +\t\t: output_(nullptr), framesCapture(0), framesOutput(0){};\n> \n> \tBufferSharingTest()\n> \t\t: V4L2DeviceTest(), output_(nullptr), framesCapture(0),\n> \t\t  framesOutput(0)\n> \t{\n> \t}\n\n\nCheckstyle complains at this change, and prefers to have the {} inline.\n\n--- test/v4l2_device/buffer_sharing.cpp\n+++ test/v4l2_device/buffer_sharing.cpp\n@@ -23,9 +23,7 @@\n {\n public:\n        BufferSharingTest()\n-               : output_(nullptr), framesCaptured_(0), framesOutput_(0)\n-       {\n-       };\n+               : output_(nullptr), framesCaptured_(0), framesOutput_(0){};\n\n\nWould you like to override checkstyle here?\n\n<snip> ...","headers":{"Return-Path":"<kieran.bingham@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 8A371610AE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 13 Feb 2019 17:23:11 +0100 (CET)","from [192.168.0.21]\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id DE45B85;\n\tWed, 13 Feb 2019 17:23:10 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1550074991;\n\tbh=rFs+yDq9v8+wan9a/WlrpAcwmNhBpzNbxpXC7RWsPuc=;\n\th=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=Dsc4gBvJy4USLxZPh03Fce2ogLrjlRyh9ibQ9piD1aazrRzwPWJ/ETRyeKc4+XcZ4\n\tz2H6Ng5b9fPiVqZZD40IN8986574soT409i5NYlamoRaSdCVe7w3kMlR7rDS9a/c+e\n\tOWd1qVela6IUAk2lx5xJZb5uAIdFq5brKzMyoQSo=","Reply-To":"kieran.bingham@ideasonboard.com","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","References":"<20190213151027.6376-1-kieran.bingham@ideasonboard.com>\n\t<20190213151027.6376-9-kieran.bingham@ideasonboard.com>\n\t<20190213160137.GJ5332@pendragon.ideasonboard.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Openpgp":"preference=signencrypt","Autocrypt":"addr=kieran.bingham@ideasonboard.com; keydata=\n\tmQINBFYE/WYBEACs1PwjMD9rgCu1hlIiUA1AXR4rv2v+BCLUq//vrX5S5bjzxKAryRf0uHat\n\tV/zwz6hiDrZuHUACDB7X8OaQcwhLaVlq6byfoBr25+hbZG7G3+5EUl9cQ7dQEdvNj6V6y/SC\n\trRanWfelwQThCHckbobWiQJfK9n7rYNcPMq9B8e9F020LFH7Kj6YmO95ewJGgLm+idg1Kb3C\n\tpotzWkXc1xmPzcQ1fvQMOfMwdS+4SNw4rY9f07Xb2K99rjMwZVDgESKIzhsDB5GY465sCsiQ\n\tcSAZRxqE49RTBq2+EQsbrQpIc8XiffAB8qexh5/QPzCmR4kJgCGeHIXBtgRj+nIkCJPZvZtf\n\tKr2EAbc6tgg6DkAEHJb+1okosV09+0+TXywYvtEop/WUOWQ+zo+Y/OBd+8Ptgt1pDRyOBzL8\n\tRXa8ZqRf0Mwg75D+dKntZeJHzPRJyrlfQokngAAs4PaFt6UfS+ypMAF37T6CeDArQC41V3ko\n\tlPn1yMsVD0p+6i3DPvA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Ef3vwOsP3YMx2JkD5doseXmWBGW1U0T/oJF+DVfKB6mv5UfsTzpVhJRgee7\n\t4jkjqFq4qsUGxcvF2xtRkfHFpZDbRgRlVmiWkqDkT4qMA+4q1y/dWwshSKi/uwVZNycuLsz+\n\t+OD8xPNCsMTqeUkAKfbD8xW4LCay3r/dD2ckoxRxtMD9eOAyu5wYzo/ydIPTh1QEj9SYyvp8\n\tO0g6CpxEwyHUQtF5oh15O018z3ZLztFJKR3RD42VKVsrnNDKnoY0f4U0z7eJv2NeF8xHMuiU\n\tRCIzqxX1GVYaNkKTnb/Qja8hnYnkUzY1Lc+OtwiGmXTwYsPZjjAaDX35J/RSKAoy5wGo/YFA\n\tJxB1gWThL4kOTbsqqXj9GLcyOImkW0lJGGR3o/fV91Zh63S5TKnf2YGGGzxki+ADdxVQAm+Q\n\tsbsRB8KNNvVXBOVNwko86rQqF9drZuw=","Organization":"Ideas on Board","Message-ID":"<d5c5c1a9-0629-ab46-0ca6-1c2c22946644@ideasonboard.com>","Date":"Wed, 13 Feb 2019 16:23:07 +0000","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101\n\tThunderbird/60.4.0","MIME-Version":"1.0","In-Reply-To":"<20190213160137.GJ5332@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH v2 8/8] test: v4l2_device: Provide\n\tbuffer sharing test","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":"Wed, 13 Feb 2019 16:23:11 -0000"}},{"id":821,"web_url":"https://patchwork.libcamera.org/comment/821/","msgid":"<20190213165138.GN5332@pendragon.ideasonboard.com>","date":"2019-02-13T16:51:38","subject":"Re: [libcamera-devel] [PATCH v2 8/8] test: v4l2_device: Provide\n\tbuffer sharing test","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nOn Wed, Feb 13, 2019 at 04:19:08PM +0000, Kieran Bingham wrote:\n> On 13/02/2019 16:01, Laurent Pinchart wrote:\n> > On Wed, Feb 13, 2019 at 03:10:27PM +0000, Kieran Bingham wrote:\n> >> Obtain two V4L2Devices and use one to obtain a BufferPool.\n> >>\n> >> Propagate the formats from the first to the second device and then commence\n> >> sending buffers between the two devices in a ping-pong fashion.\n> >>\n> >> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> >> ---\n> >>  test/v4l2_device/buffer_sharing.cpp | 179 ++++++++++++++++++++++++++++\n> >>  test/v4l2_device/meson.build        |   1 +\n> >>  2 files changed, 180 insertions(+)\n> >>  create mode 100644 test/v4l2_device/buffer_sharing.cpp\n> >>\n> >> diff --git a/test/v4l2_device/buffer_sharing.cpp b/test/v4l2_device/buffer_sharing.cpp\n> >> new file mode 100644\n> >> index 000000000000..f03201e82084\n> >> --- /dev/null\n> >> +++ b/test/v4l2_device/buffer_sharing.cpp\n> >> @@ -0,0 +1,179 @@\n> >> +/* SPDX-License-Identifier: GPL-2.0-or-later */\n> >> +/*\n> >> + * Copyright (C) 2019, Google Inc.\n> >> + *\n> >> + * libcamera V4L2 API tests\n> >> + *\n> >> + * Validate the function of exporting buffers from a V4L2Device and\n> >> + * the ability to import them to another V4L2Device instance.\n> >> + * Ensure that the Buffers can successfully be queued and dequeued\n> >> + * between both devices.\n> >> + */\n> >> +\n> >> +#include <iostream>\n> >> +\n> >> +#include <libcamera/buffer.h>\n> >> +#include <libcamera/camera_manager.h>\n> >> +#include <libcamera/event_dispatcher.h>\n> >> +#include <libcamera/timer.h>\n> >> +\n> >> +#include \"v4l2_device_test.h\"\n> >> +\n> >> +#include \"log.h\"\n> >> +\n> >> +LOG_DEFINE_CATEGORY(Test)\n> > \n> > Can you use std::cout until we implement a test logger ?\n> \n> #include \"log.h\" removed :) (thus all LOGs)\n> \n> >> +class BufferSharingTest : public V4L2DeviceTest\n> >> +{\n> >> +public:\n> >> +\tBufferSharingTest()\n> >> +\t\t: output_(nullptr), framesCapture(0), framesOutput(0){};\n> > \n> > \tBufferSharingTest()\n> > \t\t: V4L2DeviceTest(), output_(nullptr), framesCapture(0),\n> > \t\t  framesOutput(0)\n> > \t{\n> > \t}\n> > \n> >> +\n> >> +private:\n> >> +\tconst unsigned int bufferCount = 4;\n> >> +\n> >> +\tV4L2Device *output_;\n> >> +\tstd::shared_ptr<MediaDevice> secondMedia_;\n> > \n> > This can be removed.\n> > \n> >> +\n> >> +\tunsigned int framesCapture;\n> > \n> > framesCaptured_ ?\n> \n> Sure.\n> \n> >> +\tunsigned int framesOutput;\n> > \n> > framesOutput_ ?\n> \n> Done.\n> \n> >> +\n> >> +protected:\n> >> +\tint init()\n> >> +\t{\n> >> +\t\tint ret = V4L2DeviceTest::init();\n> >> +\t\tif (ret)\n> >> +\t\t\treturn ret;\n> >> +\n> >> +\t\t/* media_ already represents VIVID */\n> >> +\t\tMediaEntity *entity = media_->getEntityByName(\"vivid-000-vid-out\");\n> >> +\t\tif (!entity)\n> >> +\t\t\treturn TestSkip;\n> >> +\n> >> +\t\toutput_ = new V4L2Device(entity);\n> >> +\t\tif (!output_)\n> >> +\t\t\treturn TestFail;\n> >> +\n> >> +\t\tret = output_->open();\n> >> +\t\tif (ret)\n> >> +\t\t\treturn TestFail;\n> >> +\n> >> +\t\tV4L2DeviceFormat format;\n> > \n> > You should either initialise format to all 0 here (format = {}) or do so\n> > in V4L2Device::getFormat().\n> \n> Really? format is a class? Shouldn't it's constructor do that?\n> Hrm ... it has no constructor :(\n\nMaybe we should turn it into a struct.\n\n> >> +\n> >> +\t\tret = dev_->getFormat(&format);\n> >> +\t\tif (ret) {\n> >> +\t\t\treturn TestFail;\n> >> +\t\t}\n> > \n> > No need for braces. Or rather please keep them and log a message\n> > explaining the cause of the error. Same for the other TestFail above and\n> > below.\n> > \n> >> +\n> >> +\t\tLOG(Test, Info) << \"Successfully obtained format from source\";\n> > \n> > If we log failures I think you can remove this and the other LOG()\n> > instance below.\n> > \n> >> +\t\tret = output_->setFormat(&format);\n> >> +\t\tif (ret)\n> >> +\t\t\treturn TestFail;\n> >> +\n> >> +\t\tLOG(Test, Info) << \"Successfully set format to output\";\n> >> +\n> >> +\t\tpool_.createBuffers(bufferCount);\n> >> +\n> >> +\t\tret = dev_->exportBuffers(&pool_);\n> > \n> > Should we rename dev_ to capture_ in the base class ?\n> \n> That seems reasonable now.\n> \n> Lets handle that separately though.\n> \n> >> +\t\tif (ret)\n> >> +\t\t\treturn TestFail;\n> >> +\n> >> +\t\tret = output_->importBuffers(&pool_);\n> >> +\t\tif (ret) {\n> >> +\t\t\tstd::cerr << \"Failed to import buffers\" << std::endl;\n> >> +\t\t\treturn TestFail;\n> >> +\t\t}\n> >> +\n> >> +\t\treturn 0;\n> >> +\t}\n> >> +\n> >> +\tvoid receiveSourceBuffer(Buffer *buffer)\n> > \n> > How about captureBufferReady() ?\n> > \n> >> +\t{\n> >> +\t\tstd::cout << \"Received source buffer: \" << buffer->index()\n> >> +\t\t\t  << \" sequence \" << buffer->sequence() << std::endl;\n> >> +\n> >> +\t\toutput_->queueBuffer(buffer);\n> >> +\t\tframesCapture++;\n> >> +\t}\n> >> +\n> >> +\tvoid receiveDestinationBuffer(Buffer *buffer)\n> > \n> > And outputBufferReady() ?\n> > \n> > Source and destination could be a bit confusing. I'd rework the messages\n> > accordingly.\n> \n> Done\n> \n> >> +\t{\n> >> +\t\tstd::cout << \"Received destination buffer: \" << buffer->index()\n> >> +\t\t\t  << \" sequence \" << buffer->sequence() << std::endl;\n> >> +\n> >> +\t\tdev_->queueBuffer(buffer);\n> >> +\t\tframesOutput++;\n> >> +\t}\n> >> +\n> >> +\tint run()\n> >> +\t{\n> >> +\t\tEventDispatcher *dispatcher = CameraManager::instance()->eventDispatcher();\n> >> +\t\tTimer timeout;\n> >> +\t\tint ret;\n> >> +\n> >> +\t\tdev_->bufferReady.connect(this, &BufferSharingTest::receiveSourceBuffer);\n> >> +\t\toutput_->bufferReady.connect(this, &BufferSharingTest::receiveDestinationBuffer);\n> >> +\n> >> +\t\t/* Queue all the buffers to the device. */\n> > \n> > ... to the capture device.\n> \n> done\n> \n> >> +\t\tfor (Buffer &b : pool_.buffers()) {\n> > \n> > I'd spell buffer in full.\n> \n> done\n> \n> >> +\t\t\tif (dev_->queueBuffer(&b))\n> >> +\t\t\t\treturn TestFail;\n> >> +\t\t}\n> >> +\n> >> +\t\tret = dev_->streamOn();\n> >> +\t\tif (ret)\n> >> +\t\t\treturn TestFail;\n> >> +\n> >> +\t\tret = output_->streamOn();\n> >> +\t\tif (ret)\n> >> +\t\t\treturn TestFail;\n> >> +\n> >> +\t\ttimeout.start(10000);\n> >> +\t\twhile (timeout.isRunning()) {\n> >> +\t\t\tdispatcher->processEvents();\n> >> +\t\t\tif (framesCapture > 30 && framesOutput > 30)\n> >> +\t\t\t\tbreak;\n> >> +\t\t}\n> >> +\n> >> +\t\tif ((framesCapture < 1) || (framesOutput < 1)) {\n> >> +\t\t\tstd::cout << \"Failed to process any frames within timeout.\" << std::endl;\n> >> +\t\t\treturn TestFail;\n> >> +\t\t}\n> >> +\n> >> +\t\tif ((framesCapture < 30) || (framesOutput < 30)) {\n> >> +\t\t\tstd::cout << \"Failed to process 30 frames within timeout.\" << std::endl;\n> >> +\t\t\treturn TestFail;\n> >> +\t\t}\n> >> +\n> >> +\t\tret = dev_->streamOff();\n> >> +\t\tif (ret)\n> >> +\t\t\treturn TestFail;\n> >> +\n> >> +\t\tret = output_->streamOff();\n> >> +\t\tif (ret)\n> >> +\t\t\treturn TestFail;\n> >> +\n> >> +\t\treturn TestPass;\n> >> +\t}\n> >> +\n> >> +\tvoid cleanup()\n> >> +\t{\n> >> +\t\tstd::cout\n> >> +\t\t\t<< \"Processed \" << framesCapture << \" capture frames\"\n> >> +\t\t\t<< \" and \" << framesOutput << \" output frames\"\n> >> +\t\t\t<< std::endl;\n> > \n> > Maybe \"Captured ... frames and output ... frames\" ?\n> \n> Sure.\n> \n> >> +\n> >> +\t\tdev_->streamOff();\n> >> +\t\toutput_->streamOff();\n> >> +\n> >> +\t\tif (secondMedia_)\n> >> +\t\t\tsecondMedia_->release();\n> > \n> > You should free buffers on both devices (for the capture device likely\n> > in the base class).\n> \n> Would you object to the destructor doing these things ? (as well?) as a\n> catch all?\n\nNo objection, as long as we clean up properly and log errors\nappropriately. It's important to test the cleanup paths too.\n\n> >> +\t\tdelete output_;\n> >> +\n> >> +\t\tV4L2DeviceTest::cleanup();\n> >> +\t}\n> >> +};\n> >> +\n> >> +TEST_REGISTER(BufferSharingTest);\n> >> diff --git a/test/v4l2_device/meson.build b/test/v4l2_device/meson.build\n> >> index ec2c7f9f11ff..9f7a7545ac9b 100644\n> >> --- a/test/v4l2_device/meson.build\n> >> +++ b/test/v4l2_device/meson.build\n> >> @@ -5,6 +5,7 @@ v4l2_device_tests = [\n> >>    [ 'request_buffers',    'request_buffers.cpp' ],\n> >>    [ 'stream_on_off',      'stream_on_off.cpp' ],\n> >>    [ 'capture_async',      'capture_async.cpp' ],\n> >> +  [ 'buffer_sharing',     'buffer_sharing.cpp' ],\n> >>  ]\n> >>  \n> >>  foreach t : v4l2_device_tests","headers":{"Return-Path":"<laurent.pinchart@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 26F5E610AE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 13 Feb 2019 17:51:42 +0100 (CET)","from pendragon.ideasonboard.com\n\t(dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi\n\t[IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8D20385;\n\tWed, 13 Feb 2019 17:51:41 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1550076701;\n\tbh=EjRnPxSuTgQesYcyxvAx9QTPzoatGTo7jNW/vD07EEA=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=tAn+8UZKeHxpV0yjobxghApytQ3Pvln3O+rY3ECAXGPn/gOCisG9PNuJ9TIqAGs9H\n\t+Zl2DMcC0sTzk74jcTcrgkK+t9pGDUt5FMRiF0VK7x5Kv9JfXOSSKxuaPWvYQM7mbO\n\tkavPTZL5LCSvVZn3HlX+G5LwybkHsTOznnn3zGLM=","Date":"Wed, 13 Feb 2019 18:51:38 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","Message-ID":"<20190213165138.GN5332@pendragon.ideasonboard.com>","References":"<20190213151027.6376-1-kieran.bingham@ideasonboard.com>\n\t<20190213151027.6376-9-kieran.bingham@ideasonboard.com>\n\t<20190213160137.GJ5332@pendragon.ideasonboard.com>\n\t<c18e520b-3174-c9c2-f49a-0adfdc9e06dd@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<c18e520b-3174-c9c2-f49a-0adfdc9e06dd@ideasonboard.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v2 8/8] test: v4l2_device: Provide\n\tbuffer sharing test","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":"Wed, 13 Feb 2019 16:51:42 -0000"}},{"id":822,"web_url":"https://patchwork.libcamera.org/comment/822/","msgid":"<20190213165405.GO5332@pendragon.ideasonboard.com>","date":"2019-02-13T16:54:05","subject":"Re: [libcamera-devel] [PATCH v2 8/8] test: v4l2_device: Provide\n\tbuffer sharing test","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nOn Wed, Feb 13, 2019 at 04:23:07PM +0000, Kieran Bingham wrote:\n> On 13/02/2019 16:01, Laurent Pinchart wrote:\n> > On Wed, Feb 13, 2019 at 03:10:27PM +0000, Kieran Bingham wrote:\n> >> Obtain two V4L2Devices and use one to obtain a BufferPool.\n> >>\n> >> Propagate the formats from the first to the second device and then commence\n> >> sending buffers between the two devices in a ping-pong fashion.\n> >>\n> >> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> >> ---\n> >>  test/v4l2_device/buffer_sharing.cpp | 179 ++++++++++++++++++++++++++++\n> >>  test/v4l2_device/meson.build        |   1 +\n> >>  2 files changed, 180 insertions(+)\n> >>  create mode 100644 test/v4l2_device/buffer_sharing.cpp\n> >>\n> >> diff --git a/test/v4l2_device/buffer_sharing.cpp b/test/v4l2_device/buffer_sharing.cpp\n> >> new file mode 100644\n> >> index 000000000000..f03201e82084\n> >> --- /dev/null\n> >> +++ b/test/v4l2_device/buffer_sharing.cpp\n> >> @@ -0,0 +1,179 @@\n> >> +/* SPDX-License-Identifier: GPL-2.0-or-later */\n> >> +/*\n> >> + * Copyright (C) 2019, Google Inc.\n> >> + *\n> >> + * libcamera V4L2 API tests\n> >> + *\n> >> + * Validate the function of exporting buffers from a V4L2Device and\n> >> + * the ability to import them to another V4L2Device instance.\n> >> + * Ensure that the Buffers can successfully be queued and dequeued\n> >> + * between both devices.\n> >> + */\n> >> +\n> >> +#include <iostream>\n> >> +\n> >> +#include <libcamera/buffer.h>\n> >> +#include <libcamera/camera_manager.h>\n> >> +#include <libcamera/event_dispatcher.h>\n> >> +#include <libcamera/timer.h>\n> >> +\n> >> +#include \"v4l2_device_test.h\"\n> >> +\n> >> +#include \"log.h\"\n> >> +\n> >> +LOG_DEFINE_CATEGORY(Test)\n> > \n> > Can you use std::cout until we implement a test logger ?\n> > \n> >> +class BufferSharingTest : public V4L2DeviceTest\n> >> +{\n> >> +public:\n> >> +\tBufferSharingTest()\n> >> +\t\t: output_(nullptr), framesCapture(0), framesOutput(0){};\n> > \n> > \tBufferSharingTest()\n> > \t\t: V4L2DeviceTest(), output_(nullptr), framesCapture(0),\n> > \t\t  framesOutput(0)\n> > \t{\n> > \t}\n> \n> \n> Checkstyle complains at this change, and prefers to have the {} inline.\n> \n> --- test/v4l2_device/buffer_sharing.cpp\n> +++ test/v4l2_device/buffer_sharing.cpp\n> @@ -23,9 +23,7 @@\n>  {\n>  public:\n>         BufferSharingTest()\n> -               : output_(nullptr), framesCaptured_(0), framesOutput_(0)\n> -       {\n> -       };\n> +               : output_(nullptr), framesCaptured_(0), framesOutput_(0){};\n> \n> \n> Would you like to override checkstyle here?\n\nThe trailing ; is really not needed, and we need at least a space before\n{}. When we have a list of initialisers I prefer splitting { and } to\nseparate lines for readability. If clang-format can do that through an\noption it would be best. Otherwise we can override checkstyle here, or\nkeep {} inline (provided we add the space and remove the ;) if you\nprefer (it's your code after all :-)).","headers":{"Return-Path":"<laurent.pinchart@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 C95C1610AE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 13 Feb 2019 17:54:09 +0100 (CET)","from pendragon.ideasonboard.com\n\t(dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi\n\t[IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 250E585;\n\tWed, 13 Feb 2019 17:54:09 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1550076849;\n\tbh=L38iXZFhOESl0DrzWH+W4PTvbP7OF4YLgWv0CE/6tDo=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=QwYhcSA62OHIDAMNtQjgL2w75+lR5uHbkGC5IRLQY2WhsluKjC9waIPwvpv7AZOfo\n\t4xIkap6d56Q1AFBHJcPDO+uuczmMFCrftfj0oqQy0BtMCxwLs8+NPUmg+dbJzu+eOR\n\tG3p8qvd9jfRX56oqvkrK65hbDbVI2LY8NgbOGjOI=","Date":"Wed, 13 Feb 2019 18:54:05 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","Message-ID":"<20190213165405.GO5332@pendragon.ideasonboard.com>","References":"<20190213151027.6376-1-kieran.bingham@ideasonboard.com>\n\t<20190213151027.6376-9-kieran.bingham@ideasonboard.com>\n\t<20190213160137.GJ5332@pendragon.ideasonboard.com>\n\t<d5c5c1a9-0629-ab46-0ca6-1c2c22946644@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<d5c5c1a9-0629-ab46-0ca6-1c2c22946644@ideasonboard.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v2 8/8] test: v4l2_device: Provide\n\tbuffer sharing test","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":"Wed, 13 Feb 2019 16:54:10 -0000"}},{"id":823,"web_url":"https://patchwork.libcamera.org/comment/823/","msgid":"<716bf150-3921-2119-8c59-d38832fd7ed5@ideasonboard.com>","date":"2019-02-13T17:00:50","subject":"Re: [libcamera-devel] [PATCH v2 8/8] test: v4l2_device: Provide\n\tbuffer sharing test","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Heya,\n\nOn 13/02/2019 16:54, Laurent Pinchart wrote:\n> Hi Kieran,\n> \n> On Wed, Feb 13, 2019 at 04:23:07PM +0000, Kieran Bingham wrote:\n>> On 13/02/2019 16:01, Laurent Pinchart wrote:\n>>> On Wed, Feb 13, 2019 at 03:10:27PM +0000, Kieran Bingham wrote:\n>>>> Obtain two V4L2Devices and use one to obtain a BufferPool.\n>>>>\n>>>> Propagate the formats from the first to the second device and then commence\n>>>> sending buffers between the two devices in a ping-pong fashion.\n>>>>\n>>>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>>>> ---\n>>>>  test/v4l2_device/buffer_sharing.cpp | 179 ++++++++++++++++++++++++++++\n>>>>  test/v4l2_device/meson.build        |   1 +\n>>>>  2 files changed, 180 insertions(+)\n>>>>  create mode 100644 test/v4l2_device/buffer_sharing.cpp\n>>>>\n>>>> diff --git a/test/v4l2_device/buffer_sharing.cpp b/test/v4l2_device/buffer_sharing.cpp\n>>>> new file mode 100644\n>>>> index 000000000000..f03201e82084\n>>>> --- /dev/null\n>>>> +++ b/test/v4l2_device/buffer_sharing.cpp\n>>>> @@ -0,0 +1,179 @@\n>>>> +/* SPDX-License-Identifier: GPL-2.0-or-later */\n>>>> +/*\n>>>> + * Copyright (C) 2019, Google Inc.\n>>>> + *\n>>>> + * libcamera V4L2 API tests\n>>>> + *\n>>>> + * Validate the function of exporting buffers from a V4L2Device and\n>>>> + * the ability to import them to another V4L2Device instance.\n>>>> + * Ensure that the Buffers can successfully be queued and dequeued\n>>>> + * between both devices.\n>>>> + */\n>>>> +\n>>>> +#include <iostream>\n>>>> +\n>>>> +#include <libcamera/buffer.h>\n>>>> +#include <libcamera/camera_manager.h>\n>>>> +#include <libcamera/event_dispatcher.h>\n>>>> +#include <libcamera/timer.h>\n>>>> +\n>>>> +#include \"v4l2_device_test.h\"\n>>>> +\n>>>> +#include \"log.h\"\n>>>> +\n>>>> +LOG_DEFINE_CATEGORY(Test)\n>>>\n>>> Can you use std::cout until we implement a test logger ?\n>>>\n>>>> +class BufferSharingTest : public V4L2DeviceTest\n>>>> +{\n>>>> +public:\n>>>> +\tBufferSharingTest()\n>>>> +\t\t: output_(nullptr), framesCapture(0), framesOutput(0){};\n>>>\n>>> \tBufferSharingTest()\n>>> \t\t: V4L2DeviceTest(), output_(nullptr), framesCapture(0),\n>>> \t\t  framesOutput(0)\n>>> \t{\n>>> \t}\n>>\n>>\n>> Checkstyle complains at this change, and prefers to have the {} inline.\n>>\n>> --- test/v4l2_device/buffer_sharing.cpp\n>> +++ test/v4l2_device/buffer_sharing.cpp\n>> @@ -23,9 +23,7 @@\n>>  {\n>>  public:\n>>         BufferSharingTest()\n>> -               : output_(nullptr), framesCaptured_(0), framesOutput_(0)\n>> -       {\n>> -       };\n>> +               : output_(nullptr), framesCaptured_(0), framesOutput_(0){};\n>>\n>>\n>> Would you like to override checkstyle here?\n> \n> The trailing ; is really not needed, and we need at least a space before\n> {}. When we have a list of initialisers I prefer splitting { and } to\n> separate lines for readability. If clang-format can do that through an\n> option it would be best. Otherwise we can override checkstyle here, or\n> keep {} inline (provided we add the space and remove the ;) if you\n> prefer (it's your code after all :-)).\n\nI don't really care as long as checkstyle is clean.\n\nRemoving the ; satisfies clang-format in putting the { } on new lines,\nso I've done that.","headers":{"Return-Path":"<kieran.bingham@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 58AA8610AE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 13 Feb 2019 18:00:53 +0100 (CET)","from [192.168.0.21]\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 86CBE304;\n\tWed, 13 Feb 2019 18:00:52 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1550077252;\n\tbh=PWIcmAWzqyqhsV57tbr0w0bHxShAlYi8jPVTK3O++5I=;\n\th=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=eBsRx++lOPj14CojBnjXFWhOSpHLsWGSH1e721p63TSwlQ0prtz46fpACnBggNAL3\n\tiD6ROptP/ALAJbq2LaYffbH70zj4LdEWf3YjfWUqrOYrpAI8E5kFxtTWeU9YWsaME9\n\tgXniEv6tCZU/qYXtCYK/W7mgZXNyscQTSYPgPC4A=","Reply-To":"kieran.bingham@ideasonboard.com","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","References":"<20190213151027.6376-1-kieran.bingham@ideasonboard.com>\n\t<20190213151027.6376-9-kieran.bingham@ideasonboard.com>\n\t<20190213160137.GJ5332@pendragon.ideasonboard.com>\n\t<d5c5c1a9-0629-ab46-0ca6-1c2c22946644@ideasonboard.com>\n\t<20190213165405.GO5332@pendragon.ideasonboard.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Openpgp":"preference=signencrypt","Autocrypt":"addr=kieran.bingham@ideasonboard.com; keydata=\n\tmQINBFYE/WYBEACs1PwjMD9rgCu1hlIiUA1AXR4rv2v+BCLUq//vrX5S5bjzxKAryRf0uHat\n\tV/zwz6hiDrZuHUACDB7X8OaQcwhLaVlq6byfoBr25+hbZG7G3+5EUl9cQ7dQEdvNj6V6y/SC\n\trRanWfelwQThCHckbobWiQJfK9n7rYNcPMq9B8e9F020LFH7Kj6YmO95ewJGgLm+idg1Kb3C\n\tpotzWkXc1xmPzcQ1fvQMOfMwdS+4SNw4rY9f07Xb2K99rjMwZVDgESKIzhsDB5GY465sCsiQ\n\tcSAZRxqE49RTBq2+EQsbrQpIc8XiffAB8qexh5/QPzCmR4kJgCGeHIXBtgRj+nIkCJPZvZtf\n\tKr2EAbc6tgg6DkAEHJb+1okosV09+0+TXywYvtEop/WUOWQ+zo+Y/OBd+8Ptgt1pDRyOBzL8\n\tRXa8ZqRf0Mwg75D+dKntZeJHzPRJyrlfQokngAAs4PaFt6UfS+ypMAF37T6CeDArQC41V3ko\n\tlPn1yMsVD0p+6i3DPvA/GPIksDC4owjnzVX9kM8Zc5Cx+XoAN0w5Eqo4t6qEVbuettxx55gq\n\t8K8FieAjgjMSxngo/HST8TpFeqI5nVeq0/lqtBRQKumuIqDg+Bkr4L1V/PSB6XgQcOdhtd36\n\tOe9X9dXB8YSNt7VjOcO7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UkAKfbD8xW4LCay3r/dD2ckoxRxtMD9eOAyu5wYzo/ydIPTh1QEj9SYyvp8\n\tO0g6CpxEwyHUQtF5oh15O018z3ZLztFJKR3RD42VKVsrnNDKnoY0f4U0z7eJv2NeF8xHMuiU\n\tRCIzqxX1GVYaNkKTnb/Qja8hnYnkUzY1Lc+OtwiGmXTwYsPZjjAaDX35J/RSKAoy5wGo/YFA\n\tJxB1gWThL4kOTbsqqXj9GLcyOImkW0lJGGR3o/fV91Zh63S5TKnf2YGGGzxki+ADdxVQAm+Q\n\tsbsRB8KNNvVXBOVNwko86rQqF9drZuw=","Organization":"Ideas on Board","Message-ID":"<716bf150-3921-2119-8c59-d38832fd7ed5@ideasonboard.com>","Date":"Wed, 13 Feb 2019 17:00:50 +0000","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101\n\tThunderbird/60.4.0","MIME-Version":"1.0","In-Reply-To":"<20190213165405.GO5332@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH v2 8/8] test: v4l2_device: Provide\n\tbuffer sharing test","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":"Wed, 13 Feb 2019 17:00:53 -0000"}}]