[{"id":3050,"web_url":"https://patchwork.libcamera.org/comment/3050/","msgid":"<20191118112516.GG4724@pendragon.ideasonboard.com>","date":"2019-11-18T11:25:16","subject":"Re: [libcamera-devel] [PATCH 05/10] cam: BufferWriter: Use the\n\tlibcamera namespace","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Niklas,\n\nThank you for the patch.\n\nOn Mon, Oct 28, 2019 at 03:22:19AM +0100, Niklas Söderlund wrote:\n> Other parts of the cam utility uses the libcamera namespace, do the same\n> in the buffer writer.\n> \n> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\nI'm wondering if we shouldn't use the namespace explicitly everywhere\ninstead, but that would be a change on top of this, let's be consistent\nfirst.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  src/cam/buffer_writer.cpp | 8 +++++---\n>  1 file changed, 5 insertions(+), 3 deletions(-)\n> \n> diff --git a/src/cam/buffer_writer.cpp b/src/cam/buffer_writer.cpp\n> index 1c044b0634672d87..c33e99c5f8173db8 100644\n> --- a/src/cam/buffer_writer.cpp\n> +++ b/src/cam/buffer_writer.cpp\n> @@ -14,12 +14,14 @@\n>  \n>  #include \"buffer_writer.h\"\n>  \n> +using namespace libcamera;\n> +\n>  BufferWriter::BufferWriter(const std::string &pattern)\n>  \t: pattern_(pattern)\n>  {\n>  }\n>  \n> -int BufferWriter::write(libcamera::Buffer *buffer, const std::string &streamName)\n> +int BufferWriter::write(Buffer *buffer, const std::string &streamName)\n>  {\n>  \tstd::string filename;\n>  \tsize_t pos;\n> @@ -40,8 +42,8 @@ int BufferWriter::write(libcamera::Buffer *buffer, const std::string &streamName\n>  \tif (fd == -1)\n>  \t\treturn -errno;\n>  \n> -\tlibcamera::BufferMemory *mem = buffer->mem();\n> -\tfor (libcamera::Plane &plane : mem->planes()) {\n> +\tBufferMemory *mem = buffer->mem();\n> +\tfor (Plane &plane : mem->planes()) {\n>  \t\tvoid *data = plane.mem();\n>  \t\tunsigned int length = plane.length();\n>","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 AF58960F1C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 18 Nov 2019 12:25:20 +0100 (CET)","from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 45A28563;\n\tMon, 18 Nov 2019 12:25:20 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1574076320;\n\tbh=8LVIFWtgVhNTl0fFW/3JmwBvz8qk2yrkzHtPQ/G+lcs=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=fxdp4afJh+LErZGN7UZd/wzh9Zl4zC60VFv6TGtwBBCG7DVqevHmjVFrCqDK2Kc4l\n\tkRW3oRpC3bo91QhyyUxL36Bx1ZR5i9xejWY9AuhBlbKQTxYy65LjXRFBPvVoH4BNn6\n\tp18dVTSKdqvWj1zE+Q5mex5nbWwWhINNzjwunEj8=","Date":"Mon, 18 Nov 2019 13:25:16 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20191118112516.GG4724@pendragon.ideasonboard.com>","References":"<20191028022224.795355-1-niklas.soderlund@ragnatech.se>\n\t<20191028022224.795355-6-niklas.soderlund@ragnatech.se>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20191028022224.795355-6-niklas.soderlund@ragnatech.se>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH 05/10] cam: BufferWriter: Use the\n\tlibcamera namespace","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, 18 Nov 2019 11:25:20 -0000"}}]