[{"id":708,"web_url":"https://patchwork.libcamera.org/comment/708/","msgid":"<20190130230646.GC5358@pendragon.ideasonboard.com>","date":"2019-01-30T23:06:46","subject":"Re: [libcamera-devel] [PATCH v5 2/6] libcamera: stream: add initial\n\tStreamConfiguration structure","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 Wed, Jan 30, 2019 at 12:56:11PM +0100, Niklas Söderlund wrote:\n> Add an initial StreamConfiguration implementation to hold configuration\n> data for a single stream of a Camera. In its current form not many\n> configuration parameters are supported but it's expected the number of\n> options will grow over time.\n> \n> At this stage the pixel format is represented as an unsigned int to\n> allow for easy mapping to the V4L2 API. This might be subject to change\n> in the future as we finalize how libcamera shall represent pixel\n> formats.\n> \n> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  include/libcamera/stream.h |  6 ++++++\n>  src/libcamera/stream.cpp   | 26 ++++++++++++++++++++++++++\n>  2 files changed, 32 insertions(+)\n> \n> diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h\n> index 4f47d85ed6382b36..4b24dd841dd64b64 100644\n> --- a/include/libcamera/stream.h\n> +++ b/include/libcamera/stream.h\n> @@ -13,6 +13,12 @@ class Stream final\n>  {\n>  };\n>  \n> +struct StreamConfiguration {\n> +\tunsigned int width;\n> +\tunsigned int height;\n> +\tunsigned int pixelFormat;\n> +};\n> +\n>  } /* namespace libcamera */\n>  \n>  #endif /* __LIBCAMERA_STREAM_H__ */\n> diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp\n> index f82b05a2bcfa14e9..4819cd94c1850efb 100644\n> --- a/src/libcamera/stream.cpp\n> +++ b/src/libcamera/stream.cpp\n> @@ -48,4 +48,30 @@ namespace libcamera {\n>   * optimal stream for the task.\n>   */\n>  \n> +/**\n> + * \\struct StreamConfiguration\n> + * \\brief Configuration parameters for a stream\n> + *\n> + * The StreamConfiguration structure models all information which can be\n> + * configured for a single video stream.\n> + */\n> +\n> +/**\n> + * \\var StreamConfiguration::width\n> + * \\brief Stream width in pixels\n> + */\n> +\n> +/**\n> + * \\var StreamConfiguration::height\n> + * \\brief Stream height in pixels\n> + */\n> +\n> +/**\n> + * \\var StreamConfiguration::pixelFormat\n> + * \\brief Stream pixel format\n> + *\n> + * This is a little endian four character code representation of the pixel\n> + * format described in V4L2 using the V4L2_PIX_FMT_* definitions.\n> + */\n> +\n>  } /* namespace libcamera */\n> -- \n> 2.20.1\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<laurent.pinchart@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 1948A60C78\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 31 Jan 2019 00:06:49 +0100 (CET)","from pendragon.ideasonboard.com (85-76-34-136-nat.elisa-mobile.fi\n\t[85.76.34.136])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C82D941;\n\tThu, 31 Jan 2019 00:06:47 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1548889608;\n\tbh=HTvdhu4CKRcbDFJ5ltCVZuROHOR71ulK0iOiww7AwG4=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Q5meHebB+ddQ1thTpkDtShO6w/ERcEnEC6xtYGH116p/tyXfpnxf9oyYvtj/DyzKQ\n\tdkL7pj3KlUdxkv6iD9vF6BNn8m8b1R0vRIkmhHI+/DD9s9Pk68WHAh2rvosv3daR81\n\tcuQeapFxUejhXjUgmO1oNQHBG6KGX5vrBGvy6NVQ=","Date":"Thu, 31 Jan 2019 01:06:46 +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":"<20190130230646.GC5358@pendragon.ideasonboard.com>","References":"<20190130115615.17362-1-niklas.soderlund@ragnatech.se>\n\t<20190130115615.17362-3-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":"<20190130115615.17362-3-niklas.soderlund@ragnatech.se>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v5 2/6] libcamera: stream: add initial\n\tStreamConfiguration structure","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, 30 Jan 2019 23:06:49 -0000"}}]