[{"id":676,"web_url":"https://patchwork.libcamera.org/comment/676/","msgid":"<cbd0cf08-7df1-008d-6078-fda0b872544d@ideasonboard.com>","date":"2019-01-29T09:47:43","subject":"Re: [libcamera-devel] [PATCH v4 2/6] libcamera: stream: add initial\n\tStreamConfiguration structure","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Niklas,\n\nOn 29/01/2019 02:00, 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> ---\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\n\nShould we consider a single global 'Format Configuration' structure or\nobject as Jacopo has been looking at ? or would that be too generic? (or\neven too specific if it has planar information etc)\n\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 01f4e5008af8ac46..ef55f947574e241c 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>","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 E0B1960B2D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 29 Jan 2019 10:47:46 +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 5AC3785;\n\tTue, 29 Jan 2019 10:47:46 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1548755266;\n\tbh=lyW8G/nRtaI+iDv7UCTJAwCZOX7pJflz4S/ygczwBBM=;\n\th=Reply-To:Subject:To:References:From:Date:In-Reply-To:From;\n\tb=R2ML+P4I1I9Ct9c7wSHdK3xWfludcnm9D6/3hFwYsHhZARN+VItfqr3TBT625hOuo\n\tqbhmTxnNl2NejHFsJ1m72w1rJxHvK0MqtMZDiWQ6XsJbuFMS15Fj6NX36WcWm4GgaD\n\tA4R3S1EUn1F/xGxb7PH4Spe6r+sum7LrQ/pUMijs=","Reply-To":"kieran.bingham@ideasonboard.com","To":"=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20190129020048.16774-1-niklas.soderlund@ragnatech.se>\n\t<20190129020048.16774-3-niklas.soderlund@ragnatech.se>","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\tOe9X9dXB8YSNt7VjOcO7BTmFn/Z8r92mSAfHXpb07YJWJosQOQARAQABtDBLaWVyYW4gQmlu\n\tZ2hhbSA8a2llcmFuLmJpbmdoYW1AaWRlYXNvbmJvYXJkLmNvbT6JAkAEEwEKACoCGwMFCwkI\n\tBwIGFQgJCgsCBBYCAwECHgECF4ACGQEFAlnDk/gFCQeA/YsACgkQoR5GchCk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jjAaDX35J/RSKAoy5wGo/YFA\n\tJxB1gWThL4kOTbsqqXj9GLcyOImkW0lJGGR3o/fV91Zh63S5TKnf2YGGGzxki+ADdxVQAm+Q\n\tsbsRB8KNNvVXBOVNwko86rQqF9drZuw=","Organization":"Ideas on Board","Message-ID":"<cbd0cf08-7df1-008d-6078-fda0b872544d@ideasonboard.com>","Date":"Tue, 29 Jan 2019 09:47:43 +0000","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101\n\tThunderbird/60.2.1","MIME-Version":"1.0","In-Reply-To":"<20190129020048.16774-3-niklas.soderlund@ragnatech.se>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH v4 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":"Tue, 29 Jan 2019 09:47:47 -0000"}},{"id":681,"web_url":"https://patchwork.libcamera.org/comment/681/","msgid":"<20190129131301.GB19527@bigcity.dyn.berto.se>","date":"2019-01-29T13:13:01","subject":"Re: [libcamera-devel] [PATCH v4 2/6] libcamera: stream: add initial\n\tStreamConfiguration structure","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Kieran,\n\nThanks for your feedback.\n\nOn 2019-01-29 09:47:43 +0000, Kieran Bingham wrote:\n> Hi Niklas,\n> \n> On 29/01/2019 02:00, 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> > ---\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> \n> \n> Should we consider a single global 'Format Configuration' structure or\n> object as Jacopo has been looking at ? or would that be too generic? (or\n> even too specific if it has planar information etc)\n\nI'm not sure I follow you. The idea for StreamConfiguration is to hold \nall configuration parameters that can act on a stream before stream on.  \nOnce the stream is running I think we will need a different object to \nhandle parameters that can change in runtime, such as controls. I think \nwe need to tackle this once we start working with queuing requests \ninstead of buffers :-)\n\n> \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 01f4e5008af8ac46..ef55f947574e241c 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> \n> -- \n> Regards\n> --\n> Kieran","headers":{"Return-Path":"<niklas.soderlund@ragnatech.se>","Received":["from mail-lj1-x244.google.com (mail-lj1-x244.google.com\n\t[IPv6:2a00:1450:4864:20::244])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4C03060DB6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 29 Jan 2019 14:13:03 +0100 (CET)","by mail-lj1-x244.google.com with SMTP id k19-v6so17400566lji.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 29 Jan 2019 05:13:03 -0800 (PST)","from localhost (89-233-230-99.cust.bredband2.com. [89.233.230.99])\n\tby smtp.gmail.com with ESMTPSA id\n\tq10-v6sm3532697ljj.3.2019.01.29.05.13.01\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tTue, 29 Jan 2019 05:13:01 -0800 (PST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to\n\t:user-agent; bh=rChri8vCm6sWSNmXHx9u2Aiot5aX1sNsxJLIOBnGOYs=;\n\tb=Nc1unonPoS2dsdvABgcfJB9sgpkeaqYgPnfNOv4omzToiPkucddzrTA+e0rLTF5ilo\n\tUeeMDRlWlpYDaFmnInf3AhI5bLgEEOflOGXumKT8hlnNfNJSNinExXcfzQKrNrrObCJQ\n\tyuUIkgW3mjiOLQ/n3WB7FzohzJdzZCZrNsIEXaU2+MJGNnIHTRL7KyYf9Xan6Y36Cdup\n\tn8CJu/4q1A1SXDvEU9zrpTdxO3Eg5jDPh5akZVrYKnmj3MJ40MVgcMQujb7zn/P3nTA+\n\tdAF94ADRmSvL+Atd3kLehz+Y/62yiyXvVB6dXRZrdX00wMX1p7mp0WwDpmEGJLnhAPDQ\n\tPaXw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to:user-agent;\n\tbh=rChri8vCm6sWSNmXHx9u2Aiot5aX1sNsxJLIOBnGOYs=;\n\tb=BarVKjoNG8mGZ/4a51oaBsdZqfsdLZMo4bY27njcUFDtsY9JPh0OrpGaPdOvcyYmNb\n\tRMIpzKW6SSAZfRHo0oR2ZZ7PyEFG8k+DmfjMPPxUtv1MZIIw4o23N1zUC+cinIX9n4oJ\n\te9IKC6jKZzkl2wFIMwPyS7v6v/bp9FLWtrIaECm3agzqFQ+1998wxwwWgfZNfWmMlcRp\n\tT29qphFWs6IF1fSPTDizH/NiJEJh3MzzY/3aMLc4aGgXQqNQ/Yae3YyMY1wPITomnmar\n\t/PBDCVCCfOeveTHNesggHGXjP2cLBJAeZjc9TPKzANd1YjgG19ewFJxLlBJ3a2JkYuLT\n\tpJiw==","X-Gm-Message-State":"AJcUuke1nEhsCc9vse5JjdNDLfB+c5W2EpdO3Sfadb7F+63RLg4mpFpx\n\tDVcnTjsaFWa7f6qxkfHeWSg1FPgJnnE=","X-Google-Smtp-Source":"ALg8bN6k+a2FmVrbkzd3GA9j+uHJbxOtiT6tLj47tRSZaPXqMT7K70/5RAHJ6g3kQzDEnBbw19WLxg==","X-Received":"by 2002:a2e:484:: with SMTP id\n\ta4-v6mr20166980ljf.27.1548767582510; \n\tTue, 29 Jan 2019 05:13:02 -0800 (PST)","Date":"Tue, 29 Jan 2019 14:13:01 +0100","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190129131301.GB19527@bigcity.dyn.berto.se>","References":"<20190129020048.16774-1-niklas.soderlund@ragnatech.se>\n\t<20190129020048.16774-3-niklas.soderlund@ragnatech.se>\n\t<cbd0cf08-7df1-008d-6078-fda0b872544d@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<cbd0cf08-7df1-008d-6078-fda0b872544d@ideasonboard.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v4 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":"Tue, 29 Jan 2019 13:13:03 -0000"}}]