[{"id":31992,"web_url":"https://patchwork.libcamera.org/comment/31992/","msgid":"<acbbd2d938c29c0c8eaf8134f42d5d9bb7de0236.camel@ndufresne.ca>","date":"2024-11-01T19:02:06","subject":"Re: [PATCH] gstreamer: Merge initControls_ with request controls","submitter":{"id":30,"url":"https://patchwork.libcamera.org/api/people/30/","name":"Nicolas Dufresne","email":"nicolas@ndufresne.ca"},"content":"Hi Umang,\n\nLe vendredi 01 novembre 2024 à 22:52 +0530, Umang Jain a écrit :\n> It turns out there a few pipeline-handler/IPA that do not honor\n> the controls passed during start() phase. For instance, he gstreamer\n> libcamerasrc element, passes the target framerate during start() to\n> libcamera. As rkisp1 pipeline-handler/IPA doesn't do anything with\n> controls passed during start(), the target fps is unable to take\n> effect on rkisp1 platform.\n> \n> Hence, merge the initControls_ with request controls with\n> ControlList::MergePolicy::KeepExisting. This way, the controls passed\n> by libcamerasrc during start(), can atleast get honoured on the\n> platform through requests' control.\n\nI'm not sure what to think of this, I'm literally hesitant if that should just\nbe merged or given a hard NAK (no joke). This is in my opinion an severe\ninteroperability issue if one method completely fail with a different ISP\nimplementation. Have we discussed the implication of letting the IPA do whatever\nthey want before patching the applications ?\n\nregards,\nNicolas\n\n> \n> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n> ---\n>  src/gstreamer/gstlibcamerasrc.cpp | 1 +\n>  1 file changed, 1 insertion(+)\n> \n> diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp\n> index 912a8d55..0d615f4a 100644\n> --- a/src/gstreamer/gstlibcamerasrc.cpp\n> +++ b/src/gstreamer/gstlibcamerasrc.cpp\n> @@ -208,6 +208,7 @@ int GstLibcameraSrcState::queueRequest()\n>  \t}\n>  \n>  \tGST_TRACE_OBJECT(src_, \"Requesting buffers\");\n> +\twrap->request_.get()->controls().merge(initControls_, ControlList::MergePolicy::KeepExisting);\n>  \tcam_->queueRequest(wrap->request_.get());\n>  \n>  \t{","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id ACC24C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  1 Nov 2024 19:02:11 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D41FB653A8;\n\tFri,  1 Nov 2024 20:02:10 +0100 (CET)","from mail-qv1-xf2d.google.com (mail-qv1-xf2d.google.com\n\t[IPv6:2607:f8b0:4864:20::f2d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C94FF65398\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  1 Nov 2024 20:02:08 +0100 (CET)","by mail-qv1-xf2d.google.com with SMTP id\n\t6a1803df08f44-6cbe68f787dso13803236d6.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 01 Nov 2024 12:02:08 -0700 (PDT)","from nicolas-tpx395.localdomain ([2606:6d00:15:862e::580])\n\tby smtp.gmail.com with ESMTPSA id\n\t6a1803df08f44-6d353fc63bbsm22032006d6.40.2024.11.01.12.02.06\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 01 Nov 2024 12:02:06 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=ndufresne-ca.20230601.gappssmtp.com\n\theader.i=@ndufresne-ca.20230601.gappssmtp.com\n\theader.b=\"p7acU8OZ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ndufresne-ca.20230601.gappssmtp.com; s=20230601; t=1730487727;\n\tx=1731092527; darn=lists.libcamera.org; \n\th=mime-version:user-agent:content-transfer-encoding:references\n\t:in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=EwjKuFW9sGJCadE1BwcYp8lKe8RCbMYjBI6fTyOiVCE=;\n\tb=p7acU8OZj7uLh0dbpbemLzDapuWrKp8k7xThVU2rP761jJMvCFU+7ybs2uAey4uPKy\n\tiRK9glZWaupHcR0dp2U/ea+qCRn/owEzO2XqIAnroOTGnjT6eu3NRE4KjE4WUGRKrH+g\n\twMTiU1TX428DiGWLh1cnQf/YXvWNH2JCQYbSapSKf00Hu9EISCHUQOGtELMBa0UJ2KPs\n\tH9WasBP98yH5X4J3eM42VFVKuEILJIpWi4E9f+6oXg1vOpqQ8q3+za9se7JWgOsIZ/kg\n\tRMBM3dYrd35dff9osYN0p4Zfm/w+/IOScwFogs3UOZHzjhAbbbn9xPGHrZRnmMU/20hk\n\t+A5w==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1730487727; x=1731092527;\n\th=mime-version:user-agent:content-transfer-encoding:references\n\t:in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from\n\t:to:cc:subject:date:message-id:reply-to;\n\tbh=EwjKuFW9sGJCadE1BwcYp8lKe8RCbMYjBI6fTyOiVCE=;\n\tb=BMEacDOgZKrtmTny8VE+/Je/Lk3hHBRg3Qq8hGF0f5bJrRLGRGUzaWQFTDm4if5nYg\n\tv+k9cZkVQuM0yZ0cxh/CkOGFJQzigCZxqhiitO7lprsyPFMqdyXWWhoqk5ocq64VpyAq\n\tAB7XDFM4TNwxHCnVw/d0LAQX3qUvBbyOck4lWy246lE3URkW+HHWX4wEiw5CVmmrqESy\n\tU+BkWW+CtYh9lacgC641zILznm1FhW6lL/C9+o8cmLiLC103IDhwKrxu2S69lDpOJsSO\n\tLTyd6hcHv6E9BZHiFIoG69S9E/MLc8jk44ux5WeaLrU+Q8OWlLsR2wnmqMU/dy2Wm3/B\n\tXH9g==","X-Forwarded-Encrypted":"i=1;\n\tAJvYcCWsrF+znot8pCVVF+sLZWBHBFq1XTbRVVQh/lKdOHxNn0N+Q7DWCX8vgDP9fwBJVrApJXcxuaxBbClp2FPmBoM=@lists.libcamera.org","X-Gm-Message-State":"AOJu0Yyh1GgidE4GgW4xBrw4F/W72VBR18+/VKSbZcJCmrUheU5BTL/E\n\tfeCcIqVRiKodJJGSgjZR0kc6u7fM7jf3/lcYxpAKVOU+mkYlmIzsDIKc29SodSR19U/bsrI16pl\n\tU","X-Google-Smtp-Source":"AGHT+IFRxDDX1ZPp24n24n+bqGxn0mEoFRa9uRP6Ep+sY9HLCSS9tI0Va80weuP65snmEHp0rMh+Cw==","X-Received":"by 2002:a05:6214:390c:b0:6d3:5133:7eab with SMTP id\n\t6a1803df08f44-6d351aa6479mr85686156d6.17.1730487727429; \n\tFri, 01 Nov 2024 12:02:07 -0700 (PDT)","Message-ID":"<acbbd2d938c29c0c8eaf8134f42d5d9bb7de0236.camel@ndufresne.ca>","Subject":"Re: [PATCH] gstreamer: Merge initControls_ with request controls","From":"Nicolas Dufresne <nicolas@ndufresne.ca>","To":"Umang Jain <umang.jain@ideasonboard.com>, \n\tlibcamera-devel@lists.libcamera.org","Date":"Fri, 01 Nov 2024 15:02:06 -0400","In-Reply-To":"<20241101172220.5765-1-umang.jain@ideasonboard.com>","References":"<20241101172220.5765-1-umang.jain@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable","User-Agent":"Evolution 3.54.1 (3.54.1-1.fc41) ","MIME-Version":"1.0","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":31993,"web_url":"https://patchwork.libcamera.org/comment/31993/","msgid":"<20241102002031.GM2473@pendragon.ideasonboard.com>","date":"2024-11-02T00:20:31","subject":"Re: [PATCH] gstreamer: Merge initControls_ with request controls","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Fri, Nov 01, 2024 at 03:02:06PM -0400, Nicolas Dufresne wrote:\n> Hi Umang,\n> \n> Le vendredi 01 novembre 2024 à 22:52 +0530, Umang Jain a écrit :\n> > It turns out there a few pipeline-handler/IPA that do not honor\n> > the controls passed during start() phase. For instance, he gstreamer\n> > libcamerasrc element, passes the target framerate during start() to\n> > libcamera. As rkisp1 pipeline-handler/IPA doesn't do anything with\n> > controls passed during start(), the target fps is unable to take\n> > effect on rkisp1 platform.\n> > \n> > Hence, merge the initControls_ with request controls with\n> > ControlList::MergePolicy::KeepExisting. This way, the controls passed\n> > by libcamerasrc during start(), can atleast get honoured on the\n> > platform through requests' control.\n> \n> I'm not sure what to think of this, I'm literally hesitant if that should just\n> be merged or given a hard NAK (no joke). This is in my opinion an severe\n> interoperability issue if one method completely fail with a different ISP\n> implementation. Have we discussed the implication of letting the IPA do whatever\n> they want before patching the applications ?\n\nI agree, this should be fixed in the pipeline handlers.\n\n> > Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n> > ---\n> >  src/gstreamer/gstlibcamerasrc.cpp | 1 +\n> >  1 file changed, 1 insertion(+)\n> > \n> > diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp\n> > index 912a8d55..0d615f4a 100644\n> > --- a/src/gstreamer/gstlibcamerasrc.cpp\n> > +++ b/src/gstreamer/gstlibcamerasrc.cpp\n> > @@ -208,6 +208,7 @@ int GstLibcameraSrcState::queueRequest()\n> >  \t}\n> >  \n> >  \tGST_TRACE_OBJECT(src_, \"Requesting buffers\");\n> > +\twrap->request_.get()->controls().merge(initControls_, ControlList::MergePolicy::KeepExisting);\n> >  \tcam_->queueRequest(wrap->request_.get());\n> >  \n> >  \t{","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 994E7BDB1D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat,  2 Nov 2024 00:20:41 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id ADC286539F;\n\tSat,  2 Nov 2024 01:20:40 +0100 (CET)","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 AC48160360\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  2 Nov 2024 01:20:38 +0100 (CET)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6A8F92EC;\n\tSat,  2 Nov 2024 01:20:33 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"dEUpv8k5\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1730506833;\n\tbh=wpIwWUFRwf96SytY10EFnOLC22yb/z5xk7pQFOMA6ig=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=dEUpv8k5aX5ffzvi2SRQvwm16l87GShdDqJY/OJq/9g/cUK8pl4oBShaWiR4U0GGO\n\t5Qx6SJISWOFR7izFfF5aXJekwCfBe8SfCBBCAnuMrfKQAocxhIc2mmTTKHM2Djxb3c\n\tGRGYJfRAvtbniMY5fUVDyIw9aQexklsoaFMxEwGQ=","Date":"Sat, 2 Nov 2024 02:20:31 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Nicolas Dufresne <nicolas@ndufresne.ca>","Cc":"Umang Jain <umang.jain@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH] gstreamer: Merge initControls_ with request controls","Message-ID":"<20241102002031.GM2473@pendragon.ideasonboard.com>","References":"<20241101172220.5765-1-umang.jain@ideasonboard.com>\n\t<acbbd2d938c29c0c8eaf8134f42d5d9bb7de0236.camel@ndufresne.ca>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<acbbd2d938c29c0c8eaf8134f42d5d9bb7de0236.camel@ndufresne.ca>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]