{"id":19228,"url":"https://patchwork.libcamera.org/api/patches/19228/?format=json","web_url":"https://patchwork.libcamera.org/patch/19228/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20231123044811.70703-2-umang.jain@ideasonboard.com>","date":"2023-11-23T04:48:10","name":"[libcamera-devel,1/2] Revert \"gstreamer: Implement element EOS handling\"","commit_ref":null,"pull_url":null,"state":"rejected","archived":false,"hash":"54f985607925f49134d7650695dc330e429b0e0f","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/?format=json","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/19228/mbox/","series":[{"id":4081,"url":"https://patchwork.libcamera.org/api/series/4081/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4081","date":"2023-11-23T04:48:09","name":"gstreamer: Fix EOS clang build breakage","version":1,"mbox":"https://patchwork.libcamera.org/series/4081/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/19228/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/19228/checks/","tags":{},"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 4B984C328F\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 23 Nov 2023 04:48:23 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E6EAE629BF;\n\tThu, 23 Nov 2023 05:48:22 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CA762629BE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 23 Nov 2023 05:48:21 +0100 (CET)","from umang.jainideasonboard.com (unknown [103.251.226.72])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D9C2E844;\n\tThu, 23 Nov 2023 05:47:48 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1700714902;\n\tbh=4VQNN77+PZAOJ+ByXN3t319pN0JTqaD2nDp/NJoEkQ8=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=g74IwlmQLgZOXXhIJzeFvQKN0kRxPQlw4nmMkQ2+yAqeytboqoOb7Xeg1VuPsTTVe\n\twkXvaI3aUNbxN+FgBVP1as1G9k+X3RYAhx/8LB9Hmw5yZSPVekz2n715ZiNopSvm65\n\t+wBx78I99uYz2ihlZgnKSQbd8kAfWsaRkteQGPqnUI+rzMzZjT9HWpC/i/ZOQELi7M\n\tPG2u1gl9CXJceCUFIIZKSwvLdGkUomZh/w+Ap2C2SOUfv+RUEZqfeECbF+HFKxduy+\n\t5b0Pq+oJv+c7u7dtzISrgw5xnsWHEX9JYNY5RhRsiWboir5Q7jhgeL7WzKRmOJM5+8\n\tyuO/aQ4hWWXEA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1700714870;\n\tbh=4VQNN77+PZAOJ+ByXN3t319pN0JTqaD2nDp/NJoEkQ8=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=jbYJJkSavGIzWQ19LXAuCBbE4RFtEIixfFCQyRzWCMbmu3NeVmykRfC3/olmLiyVR\n\tVf9sA/Pt7VUv0TzRJaW47a0KKSYMjO4pIohBeCFUtwQUtzZ2PVKJ2/4CRLoZFJbwMg\n\trSUAGsU2ml1DmCuJU/TMTEy4cd3Y/tkMANoXeYW0="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"jbYJJkSa\"; dkim-atps=neutral","To":"libcamera-devel@lists.libcamera.org","Date":"Thu, 23 Nov 2023 10:18:10 +0530","Message-Id":"<20231123044811.70703-2-umang.jain@ideasonboard.com>","X-Mailer":"git-send-email 2.40.1","In-Reply-To":"<20231123044811.70703-1-umang.jain@ideasonboard.com>","References":"<20231123044811.70703-1-umang.jain@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 1/2] Revert \"gstreamer: Implement element\n\tEOS handling\"","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>","From":"Umang Jain via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Umang Jain <umang.jain@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"This reverts commit fd84180d7a09eb9f4891f740735b28af68c201af.\n\nThe commit fd84180d7a09(\"gstreamer: Implement element EOS handling\")\nintroduced a compile breakage on clang:\n\n../../src/gstreamer/gstlibcamerasrc.cpp:768:23: error: unused variable 'oldEvent' [-Werror,-Wunused-variable]\n                g_autoptr(GstEvent) oldEvent = self->pending_eos.exchange(event);\n                                    ^\n\nAlthough it is a false-positive build warning, revert this until\na proper solution is implemented.\n\nSigned-off-by: Umang Jain <umang.jain@ideasonboard.com>\n---\n src/gstreamer/gstlibcamerasrc.cpp | 36 +------------------------------\n 1 file changed, 1 insertion(+), 35 deletions(-)","diff":"diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp\nindex 767017db..63d99571 100644\n--- a/src/gstreamer/gstlibcamerasrc.cpp\n+++ b/src/gstreamer/gstlibcamerasrc.cpp\n@@ -9,6 +9,7 @@\n /**\n  * \\todo The following is a list of items that needs implementation in the GStreamer plugin\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@@ -28,7 +29,6 @@\n \n #include \"gstlibcamerasrc.h\"\n \n-#include <atomic>\n #include <queue>\n #include <vector>\n \n@@ -144,8 +144,6 @@ struct _GstLibcameraSrc {\n \tgchar *camera_name;\n \tcontrols::AfModeEnum auto_focus_mode = controls::AfModeManual;\n \n-\tstd::atomic<GstEvent *> pending_eos;\n-\n \tGstLibcameraSrcState *state;\n \tGstLibcameraAllocator *allocator;\n \tGstFlowCombiner *flow_combiner;\n@@ -399,14 +397,6 @@ gst_libcamera_src_task_run(gpointer user_data)\n \n \tbool doResume = false;\n \n-\tg_autoptr(GstEvent) event = self->pending_eos.exchange(nullptr);\n-\tif (event) {\n-\t\tfor (GstPad *srcpad : state->srcpads_)\n-\t\t\tgst_pad_push_event(srcpad, gst_event_ref(event));\n-\n-\t\treturn;\n-\t}\n-\n \t/*\n \t * Create and queue one request. If no buffers are available the\n \t * function returns -ENOBUFS, which we ignore here as that's not a\n@@ -757,27 +747,6 @@ gst_libcamera_src_change_state(GstElement *element, GstStateChange transition)\n \treturn ret;\n }\n \n-static gboolean\n-gst_libcamera_src_send_event(GstElement *element, GstEvent *event)\n-{\n-\tGstLibcameraSrc *self = GST_LIBCAMERA_SRC(element);\n-\tgboolean ret = FALSE;\n-\n-\tswitch (GST_EVENT_TYPE(event)) {\n-\tcase GST_EVENT_EOS: {\n-\t\tg_autoptr(GstEvent) oldEvent = self->pending_eos.exchange(event);\n-\n-\t\tret = TRUE;\n-\t\tbreak;\n-\t}\n-\tdefault:\n-\t\tgst_event_unref(event);\n-\t\tbreak;\n-\t}\n-\n-\treturn ret;\n-}\n-\n static void\n gst_libcamera_src_finalize(GObject *object)\n {\n@@ -810,8 +779,6 @@ gst_libcamera_src_init(GstLibcameraSrc *self)\n \tstate->srcpads_.push_back(gst_pad_new_from_template(templ, \"src\"));\n \tgst_element_add_pad(GST_ELEMENT(self), state->srcpads_.back());\n \n-\tGST_OBJECT_FLAG_SET(self, GST_ELEMENT_FLAG_SOURCE);\n-\n \t/* C-style friend. */\n \tstate->src_ = self;\n \tself->state = state;\n@@ -877,7 +844,6 @@ gst_libcamera_src_class_init(GstLibcameraSrcClass *klass)\n \telement_class->request_new_pad = gst_libcamera_src_request_new_pad;\n \telement_class->release_pad = gst_libcamera_src_release_pad;\n \telement_class->change_state = gst_libcamera_src_change_state;\n-\telement_class->send_event = gst_libcamera_src_send_event;\n \n \tgst_element_class_set_metadata(element_class,\n \t\t\t\t       \"libcamera Source\", \"Source/Video\",\n","prefixes":["libcamera-devel","1/2"]}