From fe7cb2e5b16dd91626729c68b5fcb6a81f85aa1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 18 Apr 2025 12:27:10 +0300 Subject: [PATCH] appsrc: Only notify drop property and not in/out This mirrors the behaviour of audiorate / videorate better and observing in/out buffers can be achieved more cheaply via other means. Part-of: --- .../docs/plugins/gst_plugins_cache.json | 2 +- .../gst-libs/gst/app/gstappsrc.c | 16 +--------------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/subprojects/gst-plugins-base/docs/plugins/gst_plugins_cache.json b/subprojects/gst-plugins-base/docs/plugins/gst_plugins_cache.json index 7a9ac68c58..5909ccad01 100644 --- a/subprojects/gst-plugins-base/docs/plugins/gst_plugins_cache.json +++ b/subprojects/gst-plugins-base/docs/plugins/gst_plugins_cache.json @@ -857,7 +857,7 @@ "writable": false }, "silent": { - "blurb": "Don't emit notify for input, output and dropped buffers", + "blurb": "Don't emit notify for dropped buffers", "conditionally-available": false, "construct": false, "construct-only": false, diff --git a/subprojects/gst-plugins-base/gst-libs/gst/app/gstappsrc.c b/subprojects/gst-plugins-base/gst-libs/gst/app/gstappsrc.c index c55226c821..23a2ead3d7 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/app/gstappsrc.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/app/gstappsrc.c @@ -624,7 +624,7 @@ gst_app_src_class_init (GstAppSrcClass * klass) */ g_object_class_install_property (gobject_class, PROP_SILENT, g_param_spec_boolean ("silent", "silent", - "Don't emit notify for input, output and dropped buffers", + "Don't emit notify for dropped buffers", DEFAULT_SILENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** @@ -1104,8 +1104,6 @@ gst_app_src_send_event (GstElement * element, GstEvent * event) g_mutex_unlock (&priv->mutex); if (!priv->silent) { - g_object_notify (G_OBJECT (appsrc), "in"); - g_object_notify (G_OBJECT (appsrc), "out"); g_object_notify (G_OBJECT (appsrc), "dropped"); } break; @@ -1201,8 +1199,6 @@ gst_app_src_stop (GstBaseSrc * bsrc) g_mutex_unlock (&priv->mutex); if (!priv->silent) { - g_object_notify (G_OBJECT (appsrc), "in"); - g_object_notify (G_OBJECT (appsrc), "out"); g_object_notify (G_OBJECT (appsrc), "dropped"); } @@ -1355,8 +1351,6 @@ gst_app_src_do_seek (GstBaseSrc * src, GstSegment * segment) g_mutex_unlock (&priv->mutex); if (!priv->silent) { - g_object_notify (G_OBJECT (appsrc), "in"); - g_object_notify (G_OBJECT (appsrc), "out"); g_object_notify (G_OBJECT (appsrc), "dropped"); } } else { @@ -1809,10 +1803,6 @@ gst_app_src_create (GstBaseSrc * bsrc, guint64 offset, guint size, } g_mutex_unlock (&priv->mutex); - if (ret == GST_FLOW_OK && !priv->silent) { - g_object_notify (G_OBJECT (appsrc), "out"); - } - return ret; /* ERRORS */ @@ -2692,10 +2682,6 @@ gst_app_src_push_internal (GstAppSrc * appsrc, GstBuffer * buffer, g_mutex_unlock (&priv->mutex); - if (!appsrc->priv->silent) { - g_object_notify (G_OBJECT (appsrc), "in"); - } - return GST_FLOW_OK; /* ERRORS */