[{"id":36799,"web_url":"https://patchwork.libcamera.org/comment/36799/","msgid":"<870359be0313b296648401743655718a899ea6b5.camel@collabora.com>","date":"2025-11-13T14:16:34","subject":"Re: [PATCH v1] gstreamer: allocator: Remove use of `g_once_init_*()`","submitter":{"id":31,"url":"https://patchwork.libcamera.org/api/people/31/","name":"Nicolas Dufresne","email":"nicolas.dufresne@collabora.com"},"content":"Hi Barnabás,\n\nLe jeudi 13 novembre 2025 à 14:58 +0100, Barnabás Pőcze a écrit :\n> `g_once_init_enter()` can trigger `-Wvolatile` in certain configurations,\n\nSounds like you are running an outdated glib, I don't think this is true\nanymore.\n\n> so replace it by just a normal initialization since the required\n> synchronization is guaranteed since C++11. Additionally, switch to\n\nHow is that even possible ? You can't turn all static variable into atomic\noperations without a major performance hit on TLS. That makes no sense to me.\nAlso, GOnce is just a mutex, its fully reliable.\n\n> using `g_quark_from_static_string()` since a string literal is used.\n\nThis is a different change, should be in a different patch.\n\nNicolas\n\n> \n> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> ---\n>  src/gstreamer/gstlibcameraallocator.cpp | 7 +------\n>  1 file changed, 1 insertion(+), 6 deletions(-)\n> \n> diff --git a/src/gstreamer/gstlibcameraallocator.cpp b/src/gstreamer/gstlibcameraallocator.cpp\n> index d4492d994b..164f16b1be 100644\n> --- a/src/gstreamer/gstlibcameraallocator.cpp\n> +++ b/src/gstreamer/gstlibcameraallocator.cpp\n> @@ -76,12 +76,7 @@ FrameWrap::~FrameWrap()\n>  \n>  GQuark FrameWrap::getQuark()\n>  {\n> -\tstatic gsize frame_quark = 0;\n> -\n> -\tif (g_once_init_enter(&frame_quark)) {\n> -\t\tGQuark quark = g_quark_from_string(\"GstLibcameraFrameWrap\");\n> -\t\tg_once_init_leave(&frame_quark, quark);\n> -\t}\n> +\tstatic const GQuark frame_quark = g_quark_from_static_string(\"GstLibcameraFrameWrap\");\n>  \n>  \treturn frame_quark;\n>  }","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 03435C3241\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 13 Nov 2025 14:16:39 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BA3BA60A85;\n\tThu, 13 Nov 2025 15:16:38 +0100 (CET)","from bali.collaboradmins.com (bali.collaboradmins.com\n\t[IPv6:2a01:4f8:201:9162::2])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 39D0D609D8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 13 Nov 2025 15:16:37 +0100 (CET)","from [IPv6:2606:6d00:11:696f::c41] (unknown\n\t[IPv6:2606:6d00:11:696f::c41])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits)\n\tserver-digest SHA256) (No client certificate requested)\n\t(Authenticated sender: nicolas)\n\tby bali.collaboradmins.com (Postfix) with ESMTPSA id 1818117E1299;\n\tThu, 13 Nov 2025 15:16:35 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=collabora.com header.i=@collabora.com\n\theader.b=\"MYgC4urA\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com;\n\ts=mail; t=1763043396;\n\tbh=Yz0zjGWkshsnERS6oRbjsqwwP1uQj5uD+Tkq0JJF12A=;\n\th=Subject:From:To:Cc:Date:In-Reply-To:References:From;\n\tb=MYgC4urAALAXc3uJxNNT793ee3fO7dpsgwQ8v/l3U5P8MweQ7VCK+bWGVvpo87QGo\n\tknUUY6FIkwuaGgtpIidtsr21/cVk2Z7jBKo3fKoscz9kFAGxOY39ecQJNGJ2kBTvMd\n\t6CmjLYBLZaQlkGazDf54PsNzmTfzSsvErX8P+j960DTjaztShKycdGCJLV6+Z5Pnln\n\tqZZ96JzwYUUEXOltpamCTfRhceQaPz7uWrsoqgiYQUqA5kwwef1A5a9Oiw5tDVWx9s\n\tD38xegivY1orYJumSYGtMKYM6DjltnU704Ri4NQbkwh2tnP1Zp8qjLGn9tiGOHmdC+\n\tf9479kfnjjEyw==","Message-ID":"<870359be0313b296648401743655718a899ea6b5.camel@collabora.com>","Subject":"Re: [PATCH v1] gstreamer: allocator: Remove use of `g_once_init_*()`","From":"Nicolas Dufresne <nicolas.dufresne@collabora.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Cc":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Date":"Thu, 13 Nov 2025 09:16:34 -0500","In-Reply-To":"<20251113135840.610653-1-barnabas.pocze@ideasonboard.com>","References":"<20251113135840.610653-1-barnabas.pocze@ideasonboard.com>","Autocrypt":"addr=nicolas.dufresne@collabora.com; prefer-encrypt=mutual;\n\tkeydata=mDMEaCN2ixYJKwYBBAHaRw8BAQdAM0EHepTful3JOIzcPv6ekHOenE1u0vDG1gdHFrChD\n\t/e0J05pY29sYXMgRHVmcmVzbmUgPG5pY29sYXNAbmR1ZnJlc25lLmNhPoicBBMWCgBEAhsDBQsJCA\n\tcCAiICBhUKCQgLAgQWAgMBAh4HAheABQkJZfd1FiEE7w1SgRXEw8IaBG8S2UGUUSlgcvQFAmibrjo\n\tCGQEACgkQ2UGUUSlgcvQlQwD/RjpU1SZYcKG6pnfnQ8ivgtTkGDRUJ8gP3fK7+XUjRNIA/iXfhXMN\n\tabIWxO2oCXKf3TdD7aQ4070KO6zSxIcxgNQFtDFOaWNvbGFzIER1ZnJlc25lIDxuaWNvbGFzLmR1Z\n\tnJlc25lQGNvbGxhYm9yYS5jb20+iJkEExYKAEECGwMFCwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4\n\tAWIQTvDVKBFcTDwhoEbxLZQZRRKWBy9AUCaCyyxgUJCWX3dQAKCRDZQZRRKWBy9ARJAP96pFmLffZ\n\tsmBUpkyVBfFAf+zq6BJt769R0al3kHvUKdgD9G7KAHuioxD2v6SX7idpIazjzx8b8rfzwTWyOQWHC\n\tAAS0LU5pY29sYXMgRHVmcmVzbmUgPG5pY29sYXMuZHVmcmVzbmVAZ21haWwuY29tPoiZBBMWCgBBF\n\tiEE7w1SgRXEw8IaBG8S2UGUUSlgcvQFAmibrGYCGwMFCQll93UFCwkIBwICIgIGFQoJCAsCBBYCAw\n\tECHgcCF4AACgkQ2UGUUSlgcvRObgD/YnQjfi4+L8f4fI7p1pPMTwRTcaRdy6aqkKEmKsCArzQBAK8\n\tbRLv9QjuqsE6oQZra/RB4widZPvphs78H0P6NmpIJ","Organization":"Collabora Canada","Content-Type":"multipart/signed; micalg=\"pgp-sha512\";\n\tprotocol=\"application/pgp-signature\";\n\tboundary=\"=-yKPeS4YC0ObdNNlx/eZ3\"","User-Agent":"Evolution 3.58.1 (3.58.1-1.fc43) ","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":36801,"web_url":"https://patchwork.libcamera.org/comment/36801/","msgid":"<5ca458bf-29a2-4e2f-9c92-09b1be2239d3@ideasonboard.com>","date":"2025-11-13T14:37:11","subject":"Re: [PATCH v1] gstreamer: allocator: Remove use of `g_once_init_*()`","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"2025. 11. 13. 15:16 keltezéssel, Nicolas Dufresne írta:\n> Hi Barnabás,\n> \n> Le jeudi 13 novembre 2025 à 14:58 +0100, Barnabás Pőcze a écrit :\n>> `g_once_init_enter()` can trigger `-Wvolatile` in certain configurations,\n> \n> Sounds like you are running an outdated glib, I don't think this is true\n> anymore.\n\nAhh, sorry, the above part is wrong because I misremembered. It's not `g_once_init_enter()`,\nbut how it was used in certain `G_DEFINE_TYPE*()` macros. This was indeed addressed\nin https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719. At least one build in\nthe CI is affected by that, but that's unrelated.\n\n\n> \n>> so replace it by just a normal initialization since the required\n>> synchronization is guaranteed since C++11. Additionally, switch to\n> \n> How is that even possible ? You can't turn all static variable into atomic\n> operations without a major performance hit on TLS. That makes no sense to me.\n> Also, GOnce is just a mutex, its fully reliable.\n\nThe compiler essentially inserts a pthread_once, call_once, etc. equivalent for\nthe initialization part. See https://en.cppreference.com/w/cpp/language/storage_duration.html#Static_block_variables\n\n\nRegards,\nBarnabás Pőcze\n\n> \n>> using `g_quark_from_static_string()` since a string literal is used.\n> \n> This is a different change, should be in a different patch.\n> \n> Nicolas\n> \n>>\n>> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n>> ---\n>>   src/gstreamer/gstlibcameraallocator.cpp | 7 +------\n>>   1 file changed, 1 insertion(+), 6 deletions(-)\n>>\n>> diff --git a/src/gstreamer/gstlibcameraallocator.cpp b/src/gstreamer/gstlibcameraallocator.cpp\n>> index d4492d994b..164f16b1be 100644\n>> --- a/src/gstreamer/gstlibcameraallocator.cpp\n>> +++ b/src/gstreamer/gstlibcameraallocator.cpp\n>> @@ -76,12 +76,7 @@ FrameWrap::~FrameWrap()\n>>   \n>>   GQuark FrameWrap::getQuark()\n>>   {\n>> -\tstatic gsize frame_quark = 0;\n>> -\n>> -\tif (g_once_init_enter(&frame_quark)) {\n>> -\t\tGQuark quark = g_quark_from_string(\"GstLibcameraFrameWrap\");\n>> -\t\tg_once_init_leave(&frame_quark, quark);\n>> -\t}\n>> +\tstatic const GQuark frame_quark = g_quark_from_static_string(\"GstLibcameraFrameWrap\");\n>>   \n>>   \treturn frame_quark;\n>>   }","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 4C790C3241\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 13 Nov 2025 14:37:18 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8DE4260A9D;\n\tThu, 13 Nov 2025 15:37:17 +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 A7B3260805\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 13 Nov 2025 15:37:15 +0100 (CET)","from [192.168.33.32] (185.221.140.239.nat.pool.zt.hu\n\t[185.221.140.239])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 531D3AB4;\n\tThu, 13 Nov 2025 15:35:15 +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=\"GHhPE8Jj\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1763044515;\n\tbh=GAYUMJDBDG0O5WCC4VR54a4KvEDEAH/AgGp/9tFxxE4=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=GHhPE8JjByUy0LcNcajjhgJwF7QX7J+cpvqcr5voWepkJ5K0wT4kdcsT1/qRn38gp\n\tNDXPNtU4i1HCHzT3QLX3XXeLblBXYxm3DJnlOoewUNwZJ1n4gGHo85yN0WJzPsxXpY\n\tGvLZCXTk7nnWgr27PbTafA3DiKz+2FrI5RCDvUBc=","Message-ID":"<5ca458bf-29a2-4e2f-9c92-09b1be2239d3@ideasonboard.com>","Date":"Thu, 13 Nov 2025 15:37:11 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v1] gstreamer: allocator: Remove use of `g_once_init_*()`","To":"Nicolas Dufresne <nicolas.dufresne@collabora.com>,\n\tlibcamera-devel@lists.libcamera.org","Cc":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","References":"<20251113135840.610653-1-barnabas.pocze@ideasonboard.com>\n\t<870359be0313b296648401743655718a899ea6b5.camel@collabora.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<870359be0313b296648401743655718a899ea6b5.camel@collabora.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","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":36803,"web_url":"https://patchwork.libcamera.org/comment/36803/","msgid":"<323be476fffd83a8bb1861400bfe1070a877c819.camel@collabora.com>","date":"2025-11-13T14:48:59","subject":"Re: [PATCH v1] gstreamer: allocator: Remove use of `g_once_init_*()`","submitter":{"id":31,"url":"https://patchwork.libcamera.org/api/people/31/","name":"Nicolas Dufresne","email":"nicolas.dufresne@collabora.com"},"content":"Le jeudi 13 novembre 2025 à 15:37 +0100, Barnabás Pőcze a écrit :\n> 2025. 11. 13. 15:16 keltezéssel, Nicolas Dufresne írta:\n> > Hi Barnabás,\n> > \n> > Le jeudi 13 novembre 2025 à 14:58 +0100, Barnabás Pőcze a écrit :\n> > > `g_once_init_enter()` can trigger `-Wvolatile` in certain configurations,\n> > \n> > Sounds like you are running an outdated glib, I don't think this is true\n> > anymore.\n> \n> Ahh, sorry, the above part is wrong because I misremembered. It's not `g_once_init_enter()`,\n> but how it was used in certain `G_DEFINE_TYPE*()` macros. This was indeed addressed\n> in https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719. At least one build in\n> the CI is affected by that, but that's unrelated.\n> \n> \n> > \n> > > so replace it by just a normal initialization since the required\n> > > synchronization is guaranteed since C++11. Additionally, switch to\n> > \n> > How is that even possible ? You can't turn all static variable into atomic\n> > operations without a major performance hit on TLS. That makes no sense to me.\n> > Also, GOnce is just a mutex, its fully reliable.\n> \n> The compiler essentially inserts a pthread_once, call_once, etc. equivalent for\n> the initialization part. See https://en.cppreference.com/w/cpp/language/storage_duration.html#Static_block_variables\n\nI didn't know about that, the \"since C++11\" is not clear though, this is part of\na comment saying \"or thread(since C++11)\". Can we leave this code alone ? Any\nC/GObject reviewer will trip on the new construction, which utilize implicit\nlocking. I don't think we have a justification to \"simplify\" this code. At best,\nyou could make it more \"C++\" and use an explicit std::call_once instead of the\nGLib variant.\n\nNicolas\n\n> \n> \n> Regards,\n> Barnabás Pőcze\n> \n> > \n> > > using `g_quark_from_static_string()` since a string literal is used.\n> > \n> > This is a different change, should be in a different patch.\n> > \n> > Nicolas\n> > \n> > > \n> > > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> > > ---\n> > >   src/gstreamer/gstlibcameraallocator.cpp | 7 +------\n> > >   1 file changed, 1 insertion(+), 6 deletions(-)\n> > > \n> > > diff --git a/src/gstreamer/gstlibcameraallocator.cpp b/src/gstreamer/gstlibcameraallocator.cpp\n> > > index d4492d994b..164f16b1be 100644\n> > > --- a/src/gstreamer/gstlibcameraallocator.cpp\n> > > +++ b/src/gstreamer/gstlibcameraallocator.cpp\n> > > @@ -76,12 +76,7 @@ FrameWrap::~FrameWrap()\n> > >   \n> > >   GQuark FrameWrap::getQuark()\n> > >   {\n> > > -\tstatic gsize frame_quark = 0;\n> > > -\n> > > -\tif (g_once_init_enter(&frame_quark)) {\n> > > -\t\tGQuark quark = g_quark_from_string(\"GstLibcameraFrameWrap\");\n> > > -\t\tg_once_init_leave(&frame_quark, quark);\n> > > -\t}\n> > > +\tstatic const GQuark frame_quark = g_quark_from_static_string(\"GstLibcameraFrameWrap\");\n> > >   \n> > >   \treturn frame_quark;\n> > >   }","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 C2122C3241\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 13 Nov 2025 14:49:04 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E73FB609D8;\n\tThu, 13 Nov 2025 15:49:03 +0100 (CET)","from bali.collaboradmins.com (bali.collaboradmins.com\n\t[IPv6:2a01:4f8:201:9162::2])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5FD0C60805\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 13 Nov 2025 15:49:02 +0100 (CET)","from [IPv6:2606:6d00:11:696f::c41] (unknown\n\t[IPv6:2606:6d00:11:696f::c41])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits)\n\tserver-digest SHA256) (No client certificate requested)\n\t(Authenticated sender: nicolas)\n\tby bali.collaboradmins.com (Postfix) with ESMTPSA id 5029717E00B0;\n\tThu, 13 Nov 2025 15:49:01 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=collabora.com header.i=@collabora.com\n\theader.b=\"YMeHNP5T\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com;\n\ts=mail; t=1763045341;\n\tbh=xL5ggdoPQLlGfivC5fkdAOnMzlZrWhr2eHlRTlJUqFA=;\n\th=Subject:From:To:Cc:Date:In-Reply-To:References:From;\n\tb=YMeHNP5TFCA6UpuuazIxrv+F2Nwd33webDBuNAmHpQtsc7NddZEGk0+decstvbBQE\n\tDzYZUpZA3Jv76UvYlXan51EzpFcVyjs0Ui/tWqm9B8S0EVdDHRA7P9kAyuhLAC2417\n\t+PrJJSO/bVtTEN1Pvj/qSltmsNLv97NzJ5+4cwTGGPUPG9A5ejDDD1EPzgv6jbrdMM\n\toQwsmryD87tRcaRMGNfluvB0qA1WhNnyrtPqm0ZaLcIvgdReld2yS3aF4iNeXN3cwO\n\tovkxd82V6L9Q9DWoqVNxU8cWSgqG514Csj1xGT3Vnjxvfq8As3NQy+qjvZmFKGD1Pc\n\tvW4whloYW0Mxg==","Message-ID":"<323be476fffd83a8bb1861400bfe1070a877c819.camel@collabora.com>","Subject":"Re: [PATCH v1] gstreamer: allocator: Remove use of `g_once_init_*()`","From":"Nicolas Dufresne <nicolas.dufresne@collabora.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Cc":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Date":"Thu, 13 Nov 2025 09:48:59 -0500","In-Reply-To":"<5ca458bf-29a2-4e2f-9c92-09b1be2239d3@ideasonboard.com>","References":"<20251113135840.610653-1-barnabas.pocze@ideasonboard.com>\n\t<870359be0313b296648401743655718a899ea6b5.camel@collabora.com>\n\t<5ca458bf-29a2-4e2f-9c92-09b1be2239d3@ideasonboard.com>","Autocrypt":"addr=nicolas.dufresne@collabora.com; prefer-encrypt=mutual;\n\tkeydata=mDMEaCN2ixYJKwYBBAHaRw8BAQdAM0EHepTful3JOIzcPv6ekHOenE1u0vDG1gdHFrChD\n\t/e0J05pY29sYXMgRHVmcmVzbmUgPG5pY29sYXNAbmR1ZnJlc25lLmNhPoicBBMWCgBEAhsDBQsJCA\n\tcCAiICBhUKCQgLAgQWAgMBAh4HAheABQkJZfd1FiEE7w1SgRXEw8IaBG8S2UGUUSlgcvQFAmibrjo\n\tCGQEACgkQ2UGUUSlgcvQlQwD/RjpU1SZYcKG6pnfnQ8ivgtTkGDRUJ8gP3fK7+XUjRNIA/iXfhXMN\n\tabIWxO2oCXKf3TdD7aQ4070KO6zSxIcxgNQFtDFOaWNvbGFzIER1ZnJlc25lIDxuaWNvbGFzLmR1Z\n\tnJlc25lQGNvbGxhYm9yYS5jb20+iJkEExYKAEECGwMFCwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4\n\tAWIQTvDVKBFcTDwhoEbxLZQZRRKWBy9AUCaCyyxgUJCWX3dQAKCRDZQZRRKWBy9ARJAP96pFmLffZ\n\tsmBUpkyVBfFAf+zq6BJt769R0al3kHvUKdgD9G7KAHuioxD2v6SX7idpIazjzx8b8rfzwTWyOQWHC\n\tAAS0LU5pY29sYXMgRHVmcmVzbmUgPG5pY29sYXMuZHVmcmVzbmVAZ21haWwuY29tPoiZBBMWCgBBF\n\tiEE7w1SgRXEw8IaBG8S2UGUUSlgcvQFAmibrGYCGwMFCQll93UFCwkIBwICIgIGFQoJCAsCBBYCAw\n\tECHgcCF4AACgkQ2UGUUSlgcvRObgD/YnQjfi4+L8f4fI7p1pPMTwRTcaRdy6aqkKEmKsCArzQBAK8\n\tbRLv9QjuqsE6oQZra/RB4widZPvphs78H0P6NmpIJ","Organization":"Collabora Canada","Content-Type":"multipart/signed; micalg=\"pgp-sha512\";\n\tprotocol=\"application/pgp-signature\";\n\tboundary=\"=-ItFnP2D0l5Nwec+FOIzW\"","User-Agent":"Evolution 3.58.1 (3.58.1-1.fc43) ","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":36804,"web_url":"https://patchwork.libcamera.org/comment/36804/","msgid":"<20251113151827.GE30434@pendragon.ideasonboard.com>","date":"2025-11-13T15:18:27","subject":"Re: [PATCH v1] gstreamer: allocator: Remove use of `g_once_init_*()`","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Thu, Nov 13, 2025 at 02:58:40PM +0100, Barnabás Pőcze wrote:\n> `g_once_init_enter()` can trigger `-Wvolatile` in certain configurations,\n> so replace it by just a normal initialization since the required\n> synchronization is guaranteed since C++11. Additionally, switch to\n> using `g_quark_from_static_string()` since a string literal is used.\n\nCould you give an example of when this warning occurs ? I think you saw\nit when trying to compile with C++20, it's useful to record that\ninformation.\n\n> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  src/gstreamer/gstlibcameraallocator.cpp | 7 +------\n>  1 file changed, 1 insertion(+), 6 deletions(-)\n> \n> diff --git a/src/gstreamer/gstlibcameraallocator.cpp b/src/gstreamer/gstlibcameraallocator.cpp\n> index d4492d994b..164f16b1be 100644\n> --- a/src/gstreamer/gstlibcameraallocator.cpp\n> +++ b/src/gstreamer/gstlibcameraallocator.cpp\n> @@ -76,12 +76,7 @@ FrameWrap::~FrameWrap()\n>  \n>  GQuark FrameWrap::getQuark()\n>  {\n> -\tstatic gsize frame_quark = 0;\n> -\n> -\tif (g_once_init_enter(&frame_quark)) {\n> -\t\tGQuark quark = g_quark_from_string(\"GstLibcameraFrameWrap\");\n> -\t\tg_once_init_leave(&frame_quark, quark);\n> -\t}\n> +\tstatic const GQuark frame_quark = g_quark_from_static_string(\"GstLibcameraFrameWrap\");\n>  \n>  \treturn frame_quark;\n>  }","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 80815C3241\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 13 Nov 2025 15:18:41 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A00BD60A80;\n\tThu, 13 Nov 2025 16:18:40 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7D83660805\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 13 Nov 2025 16:18:39 +0100 (CET)","from pendragon.ideasonboard.com (unknown [213.216.211.176])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 11E97446;\n\tThu, 13 Nov 2025 16:16:39 +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=\"C+8jwqJQ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1763046999;\n\tbh=2N8xP/e/NmJ82ZaagC6dHXmIA3JAOvytimGBqa+8FQQ=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=C+8jwqJQTsz3qR8mphFIntHNNU+VbnqMS35xS5KoRp7zIPBdiEfRFOayS+qmonigP\n\tmA0uYuNiY6MIRX6tiViXwKvKrTscoD8dHT9DEu0Sz0xziQZRMxb9pwYPs2VZrdxEPl\n\tLNGdVPsYTTLlnpTRI2BTJnbQC16+4pi1stbX9zrA=","Date":"Thu, 13 Nov 2025 17:18:27 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org,\n\tNicolas Dufresne <nicolas.dufresne@collabora.com>","Subject":"Re: [PATCH v1] gstreamer: allocator: Remove use of `g_once_init_*()`","Message-ID":"<20251113151827.GE30434@pendragon.ideasonboard.com>","References":"<20251113135840.610653-1-barnabas.pocze@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20251113135840.610653-1-barnabas.pocze@ideasonboard.com>","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":36805,"web_url":"https://patchwork.libcamera.org/comment/36805/","msgid":"<6a2089b5-cf2d-4a36-8446-8b3ba8179fc3@ideasonboard.com>","date":"2025-11-13T15:21:14","subject":"Re: [PATCH v1] gstreamer: allocator: Remove use of `g_once_init_*()`","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"2025. 11. 13. 16:18 keltezéssel, Laurent Pinchart írta:\n> On Thu, Nov 13, 2025 at 02:58:40PM +0100, Barnabás Pőcze wrote:\n>> `g_once_init_enter()` can trigger `-Wvolatile` in certain configurations,\n>> so replace it by just a normal initialization since the required\n>> synchronization is guaranteed since C++11. Additionally, switch to\n>> using `g_quark_from_static_string()` since a string literal is used.\n> \n> Could you give an example of when this warning occurs ? I think you saw\n> it when trying to compile with C++20, it's useful to record that\n> information.\n\nPlease see my reply here: https://lists.libcamera.org/pipermail/libcamera-devel/2025-November/054715.html\n\nI have unfortunately misremembered the cause of the -Wvolatile warning.\nThis part cannot trigger it.\n\n\n> \n>> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> \n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n>> ---\n>>   src/gstreamer/gstlibcameraallocator.cpp | 7 +------\n>>   1 file changed, 1 insertion(+), 6 deletions(-)\n>>\n>> diff --git a/src/gstreamer/gstlibcameraallocator.cpp b/src/gstreamer/gstlibcameraallocator.cpp\n>> index d4492d994b..164f16b1be 100644\n>> --- a/src/gstreamer/gstlibcameraallocator.cpp\n>> +++ b/src/gstreamer/gstlibcameraallocator.cpp\n>> @@ -76,12 +76,7 @@ FrameWrap::~FrameWrap()\n>>   \n>>   GQuark FrameWrap::getQuark()\n>>   {\n>> -\tstatic gsize frame_quark = 0;\n>> -\n>> -\tif (g_once_init_enter(&frame_quark)) {\n>> -\t\tGQuark quark = g_quark_from_string(\"GstLibcameraFrameWrap\");\n>> -\t\tg_once_init_leave(&frame_quark, quark);\n>> -\t}\n>> +\tstatic const GQuark frame_quark = g_quark_from_static_string(\"GstLibcameraFrameWrap\");\n>>   \n>>   \treturn frame_quark;\n>>   }\n>","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 B764DC3263\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 13 Nov 2025 15:21:20 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C580F60805;\n\tThu, 13 Nov 2025 16:21:19 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EA82C60805\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 13 Nov 2025 16:21:17 +0100 (CET)","from [192.168.33.32] (185.221.140.239.nat.pool.zt.hu\n\t[185.221.140.239])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5AC6EBD2;\n\tThu, 13 Nov 2025 16:19:17 +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=\"GeXnmrdE\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1763047157;\n\tbh=6sG5x9fuLylGVHd1sxdw3uy8RTQL4B09vEiUz7KI15g=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=GeXnmrdE0vCmlEdWs20Bxe8tsHlkR/4uqlKXgnBOIzixaV4wq0YH+6RbcwasjfnBU\n\tq+cCNS5gYvdFs0Ls/T+L/QE7JKGC8CvajDICl3ouqgWvXwZ4UvauPtqC72tVSkBs3H\n\tSm+xT0H7xqMqKraKwyf9sL8GGoYEHl+9Maid1V3I=","Message-ID":"<6a2089b5-cf2d-4a36-8446-8b3ba8179fc3@ideasonboard.com>","Date":"Thu, 13 Nov 2025 16:21:14 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v1] gstreamer: allocator: Remove use of `g_once_init_*()`","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org,\n\tNicolas Dufresne <nicolas.dufresne@collabora.com>","References":"<20251113135840.610653-1-barnabas.pocze@ideasonboard.com>\n\t<20251113151827.GE30434@pendragon.ideasonboard.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20251113151827.GE30434@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","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":36806,"web_url":"https://patchwork.libcamera.org/comment/36806/","msgid":"<20251113152140.GF30434@pendragon.ideasonboard.com>","date":"2025-11-13T15:21:40","subject":"Re: [PATCH v1] gstreamer: allocator: Remove use of `g_once_init_*()`","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Thu, Nov 13, 2025 at 09:48:59AM -0500, Nicolas Dufresne wrote:\n> Le jeudi 13 novembre 2025 à 15:37 +0100, Barnabás Pőcze a écrit :\n> > 2025. 11. 13. 15:16 keltezéssel, Nicolas Dufresne írta:\n> > > Le jeudi 13 novembre 2025 à 14:58 +0100, Barnabás Pőcze a écrit :\n> > > > `g_once_init_enter()` can trigger `-Wvolatile` in certain configurations,\n> > > \n> > > Sounds like you are running an outdated glib, I don't think this is true\n> > > anymore.\n> > \n> > Ahh, sorry, the above part is wrong because I misremembered. It's not `g_once_init_enter()`,\n> > but how it was used in certain `G_DEFINE_TYPE*()` macros. This was indeed addressed\n> > in https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719. At least one build in\n> > the CI is affected by that, but that's unrelated.\n> > \n> > > > so replace it by just a normal initialization since the required\n> > > > synchronization is guaranteed since C++11. Additionally, switch to\n> > > \n> > > How is that even possible ? You can't turn all static variable into atomic\n> > > operations without a major performance hit on TLS. That makes no sense to me.\n> > > Also, GOnce is just a mutex, its fully reliable.\n> > \n> > The compiler essentially inserts a pthread_once, call_once, etc. equivalent for\n> > the initialization part. See https://en.cppreference.com/w/cpp/language/storage_duration.html#Static_block_variables\n> \n> I didn't know about that, the \"since C++11\" is not clear though, this is part of\n> a comment saying \"or thread(since C++11)\". Can we leave this code alone ? Any\n> C/GObject reviewer will trip on the new construction, which utilize implicit\n> locking. I don't think we have a justification to \"simplify\" this code. At best,\n> you could make it more \"C++\" and use an explicit std::call_once instead of the\n> GLib variant.\n\nAs far as I understand this change is meant to fix a failure in CI when\ncompiling with C++20. I'm fine with std::call_once() to make it explicit\nif you prefer.\n\n> > > > using `g_quark_from_static_string()` since a string literal is used.\n> > > \n> > > This is a different change, should be in a different patch.\n> > > \n> > > Nicolas\n> > > \n> > > > \n> > > > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> > > > ---\n> > > >   src/gstreamer/gstlibcameraallocator.cpp | 7 +------\n> > > >   1 file changed, 1 insertion(+), 6 deletions(-)\n> > > > \n> > > > diff --git a/src/gstreamer/gstlibcameraallocator.cpp b/src/gstreamer/gstlibcameraallocator.cpp\n> > > > index d4492d994b..164f16b1be 100644\n> > > > --- a/src/gstreamer/gstlibcameraallocator.cpp\n> > > > +++ b/src/gstreamer/gstlibcameraallocator.cpp\n> > > > @@ -76,12 +76,7 @@ FrameWrap::~FrameWrap()\n> > > >   \n> > > >   GQuark FrameWrap::getQuark()\n> > > >   {\n> > > > -\tstatic gsize frame_quark = 0;\n> > > > -\n> > > > -\tif (g_once_init_enter(&frame_quark)) {\n> > > > -\t\tGQuark quark = g_quark_from_string(\"GstLibcameraFrameWrap\");\n> > > > -\t\tg_once_init_leave(&frame_quark, quark);\n> > > > -\t}\n> > > > +\tstatic const GQuark frame_quark = g_quark_from_static_string(\"GstLibcameraFrameWrap\");\n> > > >   \n> > > >   \treturn frame_quark;\n> > > >   }","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 D0B8FC3263\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 13 Nov 2025 15:21:53 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 82E1D60A85;\n\tThu, 13 Nov 2025 16:21:53 +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 5DBEA60805\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 13 Nov 2025 16:21:52 +0100 (CET)","from pendragon.ideasonboard.com (unknown [213.216.211.176])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 13A7A446;\n\tThu, 13 Nov 2025 16:19:52 +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=\"AbIkjVkX\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1763047192;\n\tbh=3aHJL9VgzUkxbU3O0JUQGFQtbu6NqNf+FrYkb3ycJwg=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=AbIkjVkXzIc4vEZSBqShUPIhzrz3bxxH19iBs/VHStcvuYyuLYvZZg1Yl6UXL+cUx\n\t9L40a2VbhYSeAjhRrQn/7KxLCSwIiReIo47iZyyejiS/oiBsVDhx1ST7dEM3EDv9Fa\n\t2Nc9Wi4fNwiKa0UpMj486Kr/xXNZkmWLd235qxV4=","Date":"Thu, 13 Nov 2025 17:21:40 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Nicolas Dufresne <nicolas.dufresne@collabora.com>","Cc":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v1] gstreamer: allocator: Remove use of `g_once_init_*()`","Message-ID":"<20251113152140.GF30434@pendragon.ideasonboard.com>","References":"<20251113135840.610653-1-barnabas.pocze@ideasonboard.com>\n\t<870359be0313b296648401743655718a899ea6b5.camel@collabora.com>\n\t<5ca458bf-29a2-4e2f-9c92-09b1be2239d3@ideasonboard.com>\n\t<323be476fffd83a8bb1861400bfe1070a877c819.camel@collabora.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<323be476fffd83a8bb1861400bfe1070a877c819.camel@collabora.com>","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>"}}]