[{"id":4179,"web_url":"https://patchwork.libcamera.org/comment/4179/","msgid":"<20200323104004.GC4768@pendragon.ideasonboard.com>","date":"2020-03-23T10:40:04","subject":"Re: [libcamera-devel] [RFC 2/6] cam: Add option to capture\n\tStillCaptureRaw stream","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, Mar 16, 2020 at 03:41:42AM +0100, Niklas Söderlund wrote:\n> Add a role name 'stillraw' to request a StillCaptureRaw stream.\n> \n> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> ---\n>  src/cam/main.cpp | 4 +++-\n>  1 file changed, 3 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/cam/main.cpp b/src/cam/main.cpp\n> index f73e77f381779853..dc86b5fee20ffa00 100644\n> --- a/src/cam/main.cpp\n> +++ b/src/cam/main.cpp\n> @@ -155,7 +155,7 @@ int CamApp::parseOptions(int argc, char *argv[])\n>  {\n>  \tKeyValueParser streamKeyValue;\n>  \tstreamKeyValue.addOption(\"role\", OptionString,\n> -\t\t\t\t \"Role for the stream (viewfinder, video, still)\",\n> +\t\t\t\t \"Role for the stream (viewfinder, video, still, stillraw)\",\n>  \t\t\t\t ArgumentRequired);\n>  \tstreamKeyValue.addOption(\"width\", OptionInteger, \"Width in pixels\",\n>  \t\t\t\t ArgumentRequired);\n> @@ -217,6 +217,8 @@ int CamApp::prepareConfig()\n>  \t\t\t\troles.push_back(StreamRole::VideoRecording);\n>  \t\t\t} else if (opt[\"role\"].toString() == \"still\") {\n>  \t\t\t\troles.push_back(StreamRole::StillCapture);\n> +\t\t\t} else if (opt[\"role\"].toString() == \"stillraw\") {\n> +\t\t\t\troles.push_back(StreamRole::StillCaptureRaw);\n>  \t\t\t} else {\n>  \t\t\t\tstd::cerr << \"Unknown stream role \"\n>  \t\t\t\t\t  << opt[\"role\"].toString() << std::endl;\n\nThis looks fine, but maybe it's a good time to optimize this a bit by\navoiding the looking of the role property every time. I've sent \"[PATCH]\nqcam: main: Cache lookup of role property\" to fix this.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>","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 E9D2560412\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Mar 2020 11:40:13 +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 7E49D308;\n\tMon, 23 Mar 2020 11:40:13 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1584960013;\n\tbh=RVaI+08EhQ20My7peZECUQLBWSgfM6seOqjRrGor+Qw=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=BnQHLkptseO9nulPdq56wDJ3RdVdkoCHlk/Qlc5fvKBlH3ZOGsBm0/J+8bqiUb7Bc\n\tfcAUz9pBnPPK5HRnsyHqjk4P5TFW9UuZ8yfS3Nshvp+OjH62D35LxF9plLYZiQf9ja\n\t3x3+x69jKgMlBVgtmHXiNGlFCcC36317Km1+HeM0=","Date":"Mon, 23 Mar 2020 12:40:04 +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":"<20200323104004.GC4768@pendragon.ideasonboard.com>","References":"<20200316024146.2474424-1-niklas.soderlund@ragnatech.se>\n\t<20200316024146.2474424-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":"<20200316024146.2474424-3-niklas.soderlund@ragnatech.se>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [RFC 2/6] cam: Add option to capture\n\tStillCaptureRaw stream","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, 23 Mar 2020 10:40:14 -0000"}},{"id":4278,"web_url":"https://patchwork.libcamera.org/comment/4278/","msgid":"<20200325110025.p2bnxcorumujc5lj@uno.localdomain>","date":"2020-03-25T11:00:25","subject":"Re: [libcamera-devel] [RFC 2/6] cam: Add option to capture\n\tStillCaptureRaw stream","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Niklas,\n\nOn Mon, Mar 23, 2020 at 12:40:04PM +0200, Laurent Pinchart wrote:\n> Hi Niklas,\n>\n> Thank you for the patch.\n>\n> On Mon, Mar 16, 2020 at 03:41:42AM +0100, Niklas Söderlund wrote:\n> > Add a role name 'stillraw' to request a StillCaptureRaw stream.\n> >\n> > Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> > ---\n> >  src/cam/main.cpp | 4 +++-\n> >  1 file changed, 3 insertions(+), 1 deletion(-)\n> >\n> > diff --git a/src/cam/main.cpp b/src/cam/main.cpp\n> > index f73e77f381779853..dc86b5fee20ffa00 100644\n> > --- a/src/cam/main.cpp\n> > +++ b/src/cam/main.cpp\n> > @@ -155,7 +155,7 @@ int CamApp::parseOptions(int argc, char *argv[])\n> >  {\n> >  \tKeyValueParser streamKeyValue;\n> >  \tstreamKeyValue.addOption(\"role\", OptionString,\n> > -\t\t\t\t \"Role for the stream (viewfinder, video, still)\",\n> > +\t\t\t\t \"Role for the stream (viewfinder, video, still, stillraw)\",\n> >  \t\t\t\t ArgumentRequired);\n> >  \tstreamKeyValue.addOption(\"width\", OptionInteger, \"Width in pixels\",\n> >  \t\t\t\t ArgumentRequired);\n> > @@ -217,6 +217,8 @@ int CamApp::prepareConfig()\n> >  \t\t\t\troles.push_back(StreamRole::VideoRecording);\n> >  \t\t\t} else if (opt[\"role\"].toString() == \"still\") {\n> >  \t\t\t\troles.push_back(StreamRole::StillCapture);\n> > +\t\t\t} else if (opt[\"role\"].toString() == \"stillraw\") {\n\nI would have just used 'raw', but that's not a big deal indeed\n\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n\nThanks\n  j\n\n> > +\t\t\t\troles.push_back(StreamRole::StillCaptureRaw);\n> >  \t\t\t} else {\n> >  \t\t\t\tstd::cerr << \"Unknown stream role \"\n> >  \t\t\t\t\t  << opt[\"role\"].toString() << std::endl;\n>\n> This looks fine, but maybe it's a good time to optimize this a bit by\n> avoiding the looking of the role property every time. I've sent \"[PATCH]\n> qcam: main: Cache lookup of role property\" to fix this.\n>\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n>\n>\n> --\n> Regards,\n>\n> Laurent Pinchart\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<jacopo@jmondi.org>","Received":["from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net\n\t[217.70.183.200])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1230860412\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 25 Mar 2020 11:57:28 +0100 (CET)","from uno.localdomain (2-224-242-101.ip172.fastwebnet.it\n\t[2.224.242.101]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 3965520005;\n\tWed, 25 Mar 2020 10:57:26 +0000 (UTC)"],"X-Originating-IP":"2.224.242.101","Date":"Wed, 25 Mar 2020 12:00:25 +0100","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>,\n\tlibcamera-devel@lists.libcamera.org","Message-ID":"<20200325110025.p2bnxcorumujc5lj@uno.localdomain>","References":"<20200316024146.2474424-1-niklas.soderlund@ragnatech.se>\n\t<20200316024146.2474424-3-niklas.soderlund@ragnatech.se>\n\t<20200323104004.GC4768@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20200323104004.GC4768@pendragon.ideasonboard.com>","Subject":"Re: [libcamera-devel] [RFC 2/6] cam: Add option to capture\n\tStillCaptureRaw stream","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":"Wed, 25 Mar 2020 10:57:28 -0000"}}]