[{"id":3688,"web_url":"https://patchwork.libcamera.org/comment/3688/","msgid":"<20200212004102.GA30632@pendragon.ideasonboard.com>","date":"2020-02-12T00:41:02","subject":"Re: [libcamera-devel] [PATCH v1 23/23] gst: libcamerasrc: Add a\n\tTODO comment","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Nicolas,\n\nThank you for the patch.\n\nOn Tue, Jan 28, 2020 at 10:32:10PM -0500, Nicolas Dufresne wrote:\n> From: Nicolas Dufresne <nicolas.dufresne@collabora.com>\n> \n> This is to guide upcoming contributors toward what is left to do to get\n> toward a production element.\n> \n> Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>\n> ---\n>  src/gstreamer/gstlibcamerasrc.cpp | 20 ++++++++++++++++++++\n>  1 file changed, 20 insertions(+)\n> \n> diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp\n> index 947a8bf..878ae2f 100644\n> --- a/src/gstreamer/gstlibcamerasrc.cpp\n> +++ b/src/gstreamer/gstlibcamerasrc.cpp\n> @@ -6,6 +6,26 @@\n>   * gstlibcamerasrc.cpp - GStreamer Capture Element\n>   */\n>  \n> +/* TODO\n\ns/TODO/\\\\todo/\n\n> + *  - Implement GstElement::send_event\n> + *    + Allowing application to send EOS\n> + *    + Allowing application to use FLUSH/FLUSH_STOP\n> + *    + Prevent the main thread from accessing streaming thread\n> + *  - Implement renegotiation (even if slow)\n> + *  - Implement GstElement::request-new-pad (multi stream)\n> + *    + Evaluate if a single streaming thread is fine\n> + *  - Add application driven request (snapshot)\n> + *  - Add framerate control\n> + *\n> + *  Requires new libcamera API:\n> + *  - Add framerate negotiation support\n> + *  - Add colorimetry support\n> + *  - Add timestamp support\n> + *  - Use unique names to select the camera\n> + *  - Add GstVideoMeta support (strides and offsets)\n> + *  - Add buffer importation support\n\nEven if I don't understand most of the items, it's a nice list :-) I'm\nsure we'll get back to you to discuss individual items, but I would like\nto already ask about the last one. What is missing for buffer import ?\n\n> + */\n> +\n>  #include \"gstlibcamerasrc.h\"\n>  #include \"gstlibcamerapad.h\"\n>  #include \"gstlibcameraallocator.h\"","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 451E661020\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 12 Feb 2020 01:41:19 +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 8B70C9DA;\n\tWed, 12 Feb 2020 01:41:18 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1581468078;\n\tbh=8WhSe8G0Mx3gLjvg/yYCZqtQVRjYykQGEeBc35jZwxw=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=NVMdxLNU4Jnj2rtGtXoSL11BG+wd+pkJwa1Pwhi22bg3whI2HkXI9gTAMRkBiX0nf\n\t7SeEhHxv3GC46rHgSXlDBPGwNi+BtpbFQ73B7WizQFOXCLjdnbQzbajOLERKHhRW4r\n\tFLAdmpYIHoC/C3DK7W2S8yqU3gkXsFkx1cBREKJI=","Date":"Wed, 12 Feb 2020 02:41:02 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Nicolas Dufresne <nicolas@ndufresne.ca>","Cc":"libcamera-devel@lists.libcamera.org,\n\tNicolas Dufresne <nicolas.dufresne@collabora.com>","Message-ID":"<20200212004102.GA30632@pendragon.ideasonboard.com>","References":"<20200129033210.278800-1-nicolas@ndufresne.ca>\n\t<20200129033210.278800-24-nicolas@ndufresne.ca>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20200129033210.278800-24-nicolas@ndufresne.ca>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v1 23/23] gst: libcamerasrc: Add a\n\tTODO comment","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, 12 Feb 2020 00:41:19 -0000"}},{"id":3696,"web_url":"https://patchwork.libcamera.org/comment/3696/","msgid":"<2242f1fb124bf4b58883254331f6e4be3c4a6fba.camel@ndufresne.ca>","date":"2020-02-12T17:42:02","subject":"Re: [libcamera-devel] [PATCH v1 23/23] gst: libcamerasrc: Add a\n\tTODO comment","submitter":{"id":30,"url":"https://patchwork.libcamera.org/api/people/30/","name":"Nicolas Dufresne","email":"nicolas@ndufresne.ca"},"content":"Le mercredi 12 février 2020 à 02:41 +0200, Laurent Pinchart a écrit :\n> Hi Nicolas,\n> \n> Thank you for the patch.\n> \n> On Tue, Jan 28, 2020 at 10:32:10PM -0500, Nicolas Dufresne wrote:\n> > From: Nicolas Dufresne <nicolas.dufresne@collabora.com>\n> > \n> > This is to guide upcoming contributors toward what is left to do to get\n> > toward a production element.\n> > \n> > Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>\n> > ---\n> >  src/gstreamer/gstlibcamerasrc.cpp | 20 ++++++++++++++++++++\n> >  1 file changed, 20 insertions(+)\n> > \n> > diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp\n> > index 947a8bf..878ae2f 100644\n> > --- a/src/gstreamer/gstlibcamerasrc.cpp\n> > +++ b/src/gstreamer/gstlibcamerasrc.cpp\n> > @@ -6,6 +6,26 @@\n> >   * gstlibcamerasrc.cpp - GStreamer Capture Element\n> >   */\n> >  \n> > +/* TODO\n> \n> s/TODO/\\\\todo/\n> \n> > + *  - Implement GstElement::send_event\n> > + *    + Allowing application to send EOS\n> > + *    + Allowing application to use FLUSH/FLUSH_STOP\n> > + *    + Prevent the main thread from accessing streaming thread\n> > + *  - Implement renegotiation (even if slow)\n> > + *  - Implement GstElement::request-new-pad (multi stream)\n> > + *    + Evaluate if a single streaming thread is fine\n> > + *  - Add application driven request (snapshot)\n> > + *  - Add framerate control\n> > + *\n> > + *  Requires new libcamera API:\n> > + *  - Add framerate negotiation support\n> > + *  - Add colorimetry support\n> > + *  - Add timestamp support\n> > + *  - Use unique names to select the camera\n> > + *  - Add GstVideoMeta support (strides and offsets)\n> > + *  - Add buffer importation support\n> \n> Even if I don't understand most of the items, it's a nice list :-) I'm\n> sure we'll get back to you to discuss individual items, but I would like\n> to already ask about the last one. What is missing for buffer import ?\n\nI haven't seen any API that ingest a DMABuf, maybe I missed it. But\nit's a bit pointless to implement importation without strides and\noffset support as this won't be robust (can produce very bad frames).\nSo I think it's fine to keep it in that section.\n\n> \n> > + */\n> > +\n> >  #include \"gstlibcamerasrc.h\"\n> >  #include \"gstlibcamerapad.h\"\n> >  #include \"gstlibcameraallocator.h\"","headers":{"Return-Path":"<nicolas@ndufresne.ca>","Received":["from mail-qk1-x742.google.com (mail-qk1-x742.google.com\n\t[IPv6:2607:f8b0:4864:20::742])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5D7DE6043B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 12 Feb 2020 18:42:05 +0100 (CET)","by mail-qk1-x742.google.com with SMTP id v2so2891663qkj.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 12 Feb 2020 09:42:05 -0800 (PST)","from skullcanyon ([192.222.193.21])\n\tby smtp.gmail.com with ESMTPSA id\n\tq5sm574012qkf.14.2020.02.12.09.42.03\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 12 Feb 2020 09:42:03 -0800 (PST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ndufresne-ca.20150623.gappssmtp.com; s=20150623;\n\th=message-id:subject:from:to:cc:date:in-reply-to:references\n\t:user-agent:mime-version:content-transfer-encoding;\n\tbh=dsEk2GmDs6VyJSF6w/G5AxUrq5102+xcPfFPea1w0m0=;\n\tb=l+OtIGxmcE4+1+XKJfNm1jNFD5oW1ZmUCUDTH1J8UMtjMVPTBmkq2RDkxebZQjsTfr\n\tV0Ypq44oudnB/m686zfwdV2mMpl6YoDE2ywq2tZN/YsA1rGqlLKBzTqOC+5/84HByeCD\n\t0l5Q0hXOqUblyy586Sqiy9mNrEC58+UFFUIkBOdvW68Jiq5hwz/6EGF/jbgzHXMH6rOV\n\tSQWpZojXV+1jeTlnWA/zL2QBWMdOLhnhMbDnesrfpl3cqoqeXy3+MVa08rkVCBMJPoc8\n\tMYuEM3XkZaE/Y+M63drvf70POytLZ5q6rE6EfgtgfuTMmiip2H3wqWpkvSSjYGXPuI/M\n\tjCwg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to\n\t:references:user-agent:mime-version:content-transfer-encoding;\n\tbh=dsEk2GmDs6VyJSF6w/G5AxUrq5102+xcPfFPea1w0m0=;\n\tb=cJkCrmmPJqcfedmLyIEBl9aX6umkru+fcJueWTGLFM7qAzC8DMIdQM1473R3FO62xj\n\tKiDZRjFqVWyJ0CEyKDye0jJK64m7exSWqTdHjjJGNSM0qrfDgDMzEu6idyrmq3ezoTR3\n\tfljGTF19rE2sThHXYYpWeBN+OCP0neI6Brbq6dTZIh1GBEB6km0/Th/lgvt+xhvXeEtT\n\tM9OivEGmMJmJroCra+YD7nRohPrcP+1g3Hv04GtC4YOhV2+fsNol6f0Sbq+QMMSCXQvq\n\tDgzBYYxorzuYOAIfB1NoHJBhnvarYj2z9dm5rgXa5a8KLw8enXLgciHYY1X5/GBJp9P/\n\tQcOQ==","X-Gm-Message-State":"APjAAAWc/cVkxiPOkiioL1an3utb4t7PAL4ycB3Auxy74ItmCJbf4kAr\n\t02uKzzXr/UjGLFWS0vPrfLEIHg==","X-Google-Smtp-Source":"APXvYqzxifP2BZtwod8dqnPDuJMkyW7r0LLBi1Fe6KRxh6UrzLhSBYdWq2r6fzQRGlm3+i44/rxOQQ==","X-Received":"by 2002:a05:620a:1203:: with SMTP id\n\tu3mr2453904qkj.402.1581529324339; \n\tWed, 12 Feb 2020 09:42:04 -0800 (PST)","Message-ID":"<2242f1fb124bf4b58883254331f6e4be3c4a6fba.camel@ndufresne.ca>","From":"Nicolas Dufresne <nicolas@ndufresne.ca>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Date":"Wed, 12 Feb 2020 12:42:02 -0500","In-Reply-To":"<20200212004102.GA30632@pendragon.ideasonboard.com>","References":"<20200129033210.278800-1-nicolas@ndufresne.ca>\n\t<20200129033210.278800-24-nicolas@ndufresne.ca>\n\t<20200212004102.GA30632@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","User-Agent":"Evolution 3.34.3 (3.34.3-1.fc31) ","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH v1 23/23] gst: libcamerasrc: Add a\n\tTODO comment","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, 12 Feb 2020 17:42:05 -0000"}},{"id":3700,"web_url":"https://patchwork.libcamera.org/comment/3700/","msgid":"<20200212201227.GC17626@pendragon.ideasonboard.com>","date":"2020-02-12T20:12:27","subject":"Re: [libcamera-devel] [PATCH v1 23/23] gst: libcamerasrc: Add a\n\tTODO comment","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Nicolas,\n\nOn Wed, Feb 12, 2020 at 12:42:02PM -0500, Nicolas Dufresne wrote:\n> Le mercredi 12 février 2020 à 02:41 +0200, Laurent Pinchart a écrit :\n> > On Tue, Jan 28, 2020 at 10:32:10PM -0500, Nicolas Dufresne wrote:\n> > > From: Nicolas Dufresne <nicolas.dufresne@collabora.com>\n> > > \n> > > This is to guide upcoming contributors toward what is left to do to get\n> > > toward a production element.\n> > > \n> > > Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>\n> > > ---\n> > >  src/gstreamer/gstlibcamerasrc.cpp | 20 ++++++++++++++++++++\n> > >  1 file changed, 20 insertions(+)\n> > > \n> > > diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp\n> > > index 947a8bf..878ae2f 100644\n> > > --- a/src/gstreamer/gstlibcamerasrc.cpp\n> > > +++ b/src/gstreamer/gstlibcamerasrc.cpp\n> > > @@ -6,6 +6,26 @@\n> > >   * gstlibcamerasrc.cpp - GStreamer Capture Element\n> > >   */\n> > >  \n> > > +/* TODO\n> > \n> > s/TODO/\\\\todo/\n> > \n> > > + *  - Implement GstElement::send_event\n> > > + *    + Allowing application to send EOS\n> > > + *    + Allowing application to use FLUSH/FLUSH_STOP\n> > > + *    + Prevent the main thread from accessing streaming thread\n> > > + *  - Implement renegotiation (even if slow)\n> > > + *  - Implement GstElement::request-new-pad (multi stream)\n> > > + *    + Evaluate if a single streaming thread is fine\n> > > + *  - Add application driven request (snapshot)\n> > > + *  - Add framerate control\n> > > + *\n> > > + *  Requires new libcamera API:\n> > > + *  - Add framerate negotiation support\n> > > + *  - Add colorimetry support\n> > > + *  - Add timestamp support\n> > > + *  - Use unique names to select the camera\n> > > + *  - Add GstVideoMeta support (strides and offsets)\n> > > + *  - Add buffer importation support\n> > \n> > Even if I don't understand most of the items, it's a nice list :-) I'm\n> > sure we'll get back to you to discuss individual items, but I would like\n> > to already ask about the last one. What is missing for buffer import ?\n> \n> I haven't seen any API that ingest a DMABuf, maybe I missed it. But\n\nYou can create a FrameBuffer object manually to wrap a set of dmabufs\n(one per plane) and use it instead of the FrameBuffer instances created\nby the FrameBufferAllocator. The allocator is a side helper, the main\nAPI is designed for the import use case.\n\n> it's a bit pointless to implement importation without strides and\n> offset support as this won't be robust (can produce very bad frames).\n> So I think it's fine to keep it in that section.\n\nAbsolutely. We need strides and offsets for sure.\n\n> > > + */\n> > > +\n> > >  #include \"gstlibcamerasrc.h\"\n> > >  #include \"gstlibcamerapad.h\"\n> > >  #include \"gstlibcameraallocator.h\"","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 B7A5761917\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 12 Feb 2020 21:12:45 +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 BDDE8808;\n\tWed, 12 Feb 2020 21:12:44 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1581538365;\n\tbh=ig/sNIVuJT4RJjVV1nn5JBYaztR/jPEmd0l4qtrl3b0=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=c7PRmkJ4icrdUGGpifOwJup7+ijwGEDyxc1z11vPAKRqr/lE5EHtuHPdKe7Z4btFF\n\tSFnUWHLlAxNE9+sl1ike/1HEJ9dP9CU5P7REDjUnQDcNWZQQ+5wwoA3x5+4bMe8ahR\n\tq5HDvkLeidU9mRCqHjN4xHd1bxpCWzOO84SRwsfI=","Date":"Wed, 12 Feb 2020 22:12:27 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Nicolas Dufresne <nicolas@ndufresne.ca>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20200212201227.GC17626@pendragon.ideasonboard.com>","References":"<20200129033210.278800-1-nicolas@ndufresne.ca>\n\t<20200129033210.278800-24-nicolas@ndufresne.ca>\n\t<20200212004102.GA30632@pendragon.ideasonboard.com>\n\t<2242f1fb124bf4b58883254331f6e4be3c4a6fba.camel@ndufresne.ca>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<2242f1fb124bf4b58883254331f6e4be3c4a6fba.camel@ndufresne.ca>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v1 23/23] gst: libcamerasrc: Add a\n\tTODO comment","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, 12 Feb 2020 20:12:45 -0000"}},{"id":3713,"web_url":"https://patchwork.libcamera.org/comment/3713/","msgid":"<CAKQmDh_9-SPFj0Q-PX0nOo4B66upWHnCCHJZ7nkFD7+aGD9sBg@mail.gmail.com>","date":"2020-02-13T14:26:04","subject":"Re: [libcamera-devel] [PATCH v1 23/23] gst: libcamerasrc: Add a\n\tTODO comment","submitter":{"id":30,"url":"https://patchwork.libcamera.org/api/people/30/","name":"Nicolas Dufresne","email":"nicolas@ndufresne.ca"},"content":"Le mer. 12 févr. 2020 15 h 12, Laurent Pinchart <\nlaurent.pinchart@ideasonboard.com> a écrit :\n\n> Hi Nicolas,\n>\n> On Wed, Feb 12, 2020 at 12:42:02PM -0500, Nicolas Dufresne wrote:\n> > Le mercredi 12 février 2020 à 02:41 +0200, Laurent Pinchart a écrit :\n> > > On Tue, Jan 28, 2020 at 10:32:10PM -0500, Nicolas Dufresne wrote:\n> > > > From: Nicolas Dufresne <nicolas.dufresne@collabora.com>\n> > > >\n> > > > This is to guide upcoming contributors toward what is left to do to\n> get\n> > > > toward a production element.\n> > > >\n> > > > Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>\n> > > > ---\n> > > >  src/gstreamer/gstlibcamerasrc.cpp | 20 ++++++++++++++++++++\n> > > >  1 file changed, 20 insertions(+)\n> > > >\n> > > > diff --git a/src/gstreamer/gstlibcamerasrc.cpp\n> b/src/gstreamer/gstlibcamerasrc.cpp\n> > > > index 947a8bf..878ae2f 100644\n> > > > --- a/src/gstreamer/gstlibcamerasrc.cpp\n> > > > +++ b/src/gstreamer/gstlibcamerasrc.cpp\n> > > > @@ -6,6 +6,26 @@\n> > > >   * gstlibcamerasrc.cpp - GStreamer Capture Element\n> > > >   */\n> > > >\n> > > > +/* TODO\n> > >\n> > > s/TODO/\\\\todo/\n> > >\n> > > > + *  - Implement GstElement::send_event\n> > > > + *    + Allowing application to send EOS\n> > > > + *    + Allowing application to use FLUSH/FLUSH_STOP\n> > > > + *    + Prevent the main thread from accessing streaming thread\n> > > > + *  - Implement renegotiation (even if slow)\n> > > > + *  - Implement GstElement::request-new-pad (multi stream)\n> > > > + *    + Evaluate if a single streaming thread is fine\n> > > > + *  - Add application driven request (snapshot)\n> > > > + *  - Add framerate control\n> > > > + *\n> > > > + *  Requires new libcamera API:\n> > > > + *  - Add framerate negotiation support\n> > > > + *  - Add colorimetry support\n> > > > + *  - Add timestamp support\n> > > > + *  - Use unique names to select the camera\n> > > > + *  - Add GstVideoMeta support (strides and offsets)\n> > > > + *  - Add buffer importation support\n> > >\n> > > Even if I don't understand most of the items, it's a nice list :-) I'm\n> > > sure we'll get back to you to discuss individual items, but I would\n> like\n> > > to already ask about the last one. What is missing for buffer import ?\n> >\n> > I haven't seen any API that ingest a DMABuf, maybe I missed it. But\n>\n> You can create a FrameBuffer object manually to wrap a set of dmabufs\n> (one per plane) and use it instead of the FrameBuffer instances created\n> by the FrameBufferAllocator. The allocator is a side helper, the main\n> API is designed for the import use case.\n>\n\nOh, thanks, I didn't figure out. I'll update the comment to clarify.\n\n\n> > it's a bit pointless to implement importation without strides and\n> > offset support as this won't be robust (can produce very bad frames).\n> > So I think it's fine to keep it in that section.\n>\n> Absolutely. We need strides and offsets for sure.\n>\n\nJust in case someone wants to start on this, be aware that currently v4l2\ndoes not allow using data_offset for importation and does not offer\nanything else, so if you have a v4l2 driver, we are also limited and must\ndo very strong validation, otherwise you get a broken image. I can help on\nthat.\n\n\n> > > > + */\n> > > > +\n> > > >  #include \"gstlibcamerasrc.h\"\n> > > >  #include \"gstlibcamerapad.h\"\n> > > >  #include \"gstlibcameraallocator.h\"\n>\n> --\n> Regards,\n>\n> Laurent Pinchart\n>","headers":{"Return-Path":"<nicolas@ndufresne.ca>","Received":["from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com\n\t[IPv6:2607:f8b0:4864:20::42b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8EF456043D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 13 Feb 2020 15:26:21 +0100 (CET)","by mail-pf1-x42b.google.com with SMTP id y5so3148318pfb.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 13 Feb 2020 06:26:21 -0800 (PST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ndufresne-ca.20150623.gappssmtp.com; s=20150623;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=or6nZ3hDBUEDI6zVGrE7lDeLShMS/ArMjzhzWa9W33U=;\n\tb=a2WQTc74dvPaiNYLyyBfXeW/nCqAtHIqPvCxk5Iyf6gbI3sZg3lTnsmC2/6cFS8p0S\n\tbuBl80EzbkfmyZuIw8MUQL83CFtRF7bbjOIt/SDNOMd5wRrhPF+WXOtEXD24OnoU7CP7\n\tp1kdZ7ymhcffh/wiTjObU7Ugb2zSOYCaYAdLqItjYvd/E9R5MDwixCNFDKHestuFHfag\n\tLKzx908alzcqsNP78npN18pZmJvFCWiraFgj1eTmTxSL5W8LQuLpbdWhsFt9xhyOdUQg\n\tadkcgJTkDlP+EX9DbvwxI5E0ZecZH99wnLHuAACHhzyABGs6fp1XBxXWSyOBNSXFs3aw\n\tgq5A==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=or6nZ3hDBUEDI6zVGrE7lDeLShMS/ArMjzhzWa9W33U=;\n\tb=ap8+wzSYf7Tn23oaLgI1c+gCYWCiDBZsThh/VO+vV/EFYodOLq0U9RGS9+wE+hcPYo\n\t+vphJs9xZhjhlfknWRRn1PiCRaG2j0cxnelDk5JeGE687Iy1CIz98w0uU4nyWXaFVMjH\n\tuMPsr6rikJZPrUETxqku70FShu/z9/lARW4jFZq+qpLAg1lsSTon+9pkB3oezTJm6EH8\n\tzD+dp7VFZMQWf2f+YrKbjxWrNbGSQc6viHJErvTKsAG8kEYK3xTsnUOtBQ13XT0k8VV6\n\t9KCX/IZiukNMq3HknfjLegWymNJJTB0xEBtbIp5WXPiXVHsMYCJ/N77z8vYaHaWGCQOR\n\t51kQ==","X-Gm-Message-State":"APjAAAUuwF6QWcU+lq2SD2b4nImINR8g73weZx1fzVHClBxd6XvA2PgG\n\tWDIo+7wtwAKsH0uYhwBhVe9b0z4qGY5U57JV7E2Jsg==","X-Google-Smtp-Source":"APXvYqymbzAae6ir2goxh6NJp2j+uWcwrpJ0r39b9nSpXMu42MkbPfVrmsDqASEnpfTfvfygYJfZAguaSJterFrEzW8=","X-Received":"by 2002:a63:504f:: with SMTP id q15mr18332029pgl.8.1581603979678;\n\tThu, 13 Feb 2020 06:26:19 -0800 (PST)","MIME-Version":"1.0","References":"<20200129033210.278800-1-nicolas@ndufresne.ca>\n\t<20200129033210.278800-24-nicolas@ndufresne.ca>\n\t<20200212004102.GA30632@pendragon.ideasonboard.com>\n\t<2242f1fb124bf4b58883254331f6e4be3c4a6fba.camel@ndufresne.ca>\n\t<20200212201227.GC17626@pendragon.ideasonboard.com>","In-Reply-To":"<20200212201227.GC17626@pendragon.ideasonboard.com>","From":"Nicolas Dufresne <nicolas@ndufresne.ca>","Date":"Thu, 13 Feb 2020 09:26:04 -0500","Message-ID":"<CAKQmDh_9-SPFj0Q-PX0nOo4B66upWHnCCHJZ7nkFD7+aGD9sBg@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","Content-Type":"multipart/alternative; boundary=\"00000000000062646e059e75dfde\"","Subject":"Re: [libcamera-devel] [PATCH v1 23/23] gst: libcamerasrc: Add a\n\tTODO comment","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":"Thu, 13 Feb 2020 14:26:21 -0000"}},{"id":3714,"web_url":"https://patchwork.libcamera.org/comment/3714/","msgid":"<20200213153902.GH4833@pendragon.ideasonboard.com>","date":"2020-02-13T15:39:02","subject":"Re: [libcamera-devel] [PATCH v1 23/23] gst: libcamerasrc: Add a\n\tTODO comment","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Nicolas,\n\nOn Thu, Feb 13, 2020 at 09:26:04AM -0500, Nicolas Dufresne wrote:\n> Le mer. 12 févr. 2020 15 h 12, Laurent Pinchart a écrit :\n> > On Wed, Feb 12, 2020 at 12:42:02PM -0500, Nicolas Dufresne wrote:\n> >> Le mercredi 12 février 2020 à 02:41 +0200, Laurent Pinchart a écrit :\n> >>> On Tue, Jan 28, 2020 at 10:32:10PM -0500, Nicolas Dufresne wrote:\n> >>>> From: Nicolas Dufresne <nicolas.dufresne@collabora.com>\n> >>>>\n> >>>> This is to guide upcoming contributors toward what is left to do to get\n> >>>> toward a production element.\n> >>>>\n> >>>> Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>\n> >>>> ---\n> >>>>  src/gstreamer/gstlibcamerasrc.cpp | 20 ++++++++++++++++++++\n> >>>>  1 file changed, 20 insertions(+)\n> >>>>\n> >>>> diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp\n> >>>> index 947a8bf..878ae2f 100644\n> >>>> --- a/src/gstreamer/gstlibcamerasrc.cpp\n> >>>> +++ b/src/gstreamer/gstlibcamerasrc.cpp\n> >>>> @@ -6,6 +6,26 @@\n> >>>>   * gstlibcamerasrc.cpp - GStreamer Capture Element\n> >>>>   */\n> >>>>\n> >>>> +/* TODO\n> >>>\n> >>> s/TODO/\\\\todo/\n> >>>\n> >>>> + *  - Implement GstElement::send_event\n> >>>> + *    + Allowing application to send EOS\n> >>>> + *    + Allowing application to use FLUSH/FLUSH_STOP\n> >>>> + *    + Prevent the main thread from accessing streaming thread\n> >>>> + *  - Implement renegotiation (even if slow)\n> >>>> + *  - Implement GstElement::request-new-pad (multi stream)\n> >>>> + *    + Evaluate if a single streaming thread is fine\n> >>>> + *  - Add application driven request (snapshot)\n> >>>> + *  - Add framerate control\n> >>>> + *\n> >>>> + *  Requires new libcamera API:\n> >>>> + *  - Add framerate negotiation support\n> >>>> + *  - Add colorimetry support\n> >>>> + *  - Add timestamp support\n> >>>> + *  - Use unique names to select the camera\n> >>>> + *  - Add GstVideoMeta support (strides and offsets)\n> >>>> + *  - Add buffer importation support\n> >>>\n> >>> Even if I don't understand most of the items, it's a nice list :-) I'm\n> >>> sure we'll get back to you to discuss individual items, but I would like\n> >>> to already ask about the last one. What is missing for buffer import ?\n> >>\n> >> I haven't seen any API that ingest a DMABuf, maybe I missed it. But\n> >\n> > You can create a FrameBuffer object manually to wrap a set of dmabufs\n> > (one per plane) and use it instead of the FrameBuffer instances created\n> > by the FrameBufferAllocator. The allocator is a side helper, the main\n> > API is designed for the import use case.\n> \n> Oh, thanks, I didn't figure out. I'll update the comment to clarify.\n> \n> >> it's a bit pointless to implement importation without strides and\n> >> offset support as this won't be robust (can produce very bad frames).\n> >> So I think it's fine to keep it in that section.\n> >\n> > Absolutely. We need strides and offsets for sure.\n> \n> Just in case someone wants to start on this, be aware that currently v4l2\n> does not allow using data_offset for importation and does not offer\n> anything else, so if you have a v4l2 driver, we are also limited and must\n> do very strong validation, otherwise you get a broken image. I can help on\n> that.\n\nThat's partly why we have no offset support yet :-( It should be fixed\nin V4L2, and Boris had a go at that at the end of last year, but as far\nas I know the development has been put on hold. Are you offering help to\nresume that work on the kernel side ? ;-)\n\n> >>>> + */\n> >>>> +\n> >>>>  #include \"gstlibcamerasrc.h\"\n> >>>>  #include \"gstlibcamerapad.h\"\n> >>>>  #include \"gstlibcameraallocator.h\"","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 9B30F6043D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 13 Feb 2020 16:39:19 +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 162772D2;\n\tThu, 13 Feb 2020 16:39:19 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1581608359;\n\tbh=wHTg9PiVhFROYLwnJSDQBQM6n7MO0vy3N+CMyiR5cmI=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=R49v2c8Shuq8Uq5bGluSvNusReD0kdU0pdAI85KrwYzJcy62OqUpvuvjRef0i58Ju\n\tH8IERSJfB05mtk+5vk/zQCRe5crXLHuRBSEBicF/pdIB5EfqM/oxq0WTa5KFxxavbP\n\trWwr47Z9iswupWPnHptlYmlx3T/F/twYnoWZF1EY=","Date":"Thu, 13 Feb 2020 17:39:02 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Nicolas Dufresne <nicolas@ndufresne.ca>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Message-ID":"<20200213153902.GH4833@pendragon.ideasonboard.com>","References":"<20200129033210.278800-1-nicolas@ndufresne.ca>\n\t<20200129033210.278800-24-nicolas@ndufresne.ca>\n\t<20200212004102.GA30632@pendragon.ideasonboard.com>\n\t<2242f1fb124bf4b58883254331f6e4be3c4a6fba.camel@ndufresne.ca>\n\t<20200212201227.GC17626@pendragon.ideasonboard.com>\n\t<CAKQmDh_9-SPFj0Q-PX0nOo4B66upWHnCCHJZ7nkFD7+aGD9sBg@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<CAKQmDh_9-SPFj0Q-PX0nOo4B66upWHnCCHJZ7nkFD7+aGD9sBg@mail.gmail.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v1 23/23] gst: libcamerasrc: Add a\n\tTODO comment","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":"Thu, 13 Feb 2020 15:39:19 -0000"}}]