From 927ab4d2579ae492841c9296792b578c5afbc5a4 Mon Sep 17 00:00:00 2001 From: Miguel Date: Wed, 15 Jan 2020 17:13:56 -0600 Subject: [PATCH 1/2] Add property to track the number of sources listening to a sink --- gst/interpipe/gstinterpipesink.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/gst/interpipe/gstinterpipesink.c b/gst/interpipe/gstinterpipesink.c index 32f881c..8fbec1d 100644 --- a/gst/interpipe/gstinterpipesink.c +++ b/gst/interpipe/gstinterpipesink.c @@ -54,7 +54,8 @@ enum { PROP_0, PROP_FORWARD_EOS, - PROP_FORWARD_EVENTS + PROP_FORWARD_EVENTS, + PROP_NUM_LISTENERS }; static void gst_inter_pipe_sink_update_node_name (GstInterPipeSink * sink, @@ -165,6 +166,11 @@ gst_inter_pipe_sink_class_init (GstInterPipeSinkClass * klass) "Forward downstream events to all the listeners (except for EOS)", FALSE, G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS)); + g_object_class_install_property (gobject_class, PROP_NUM_LISTENERS, + g_param_spec_uint ("num-listeners", "Number of listeners", + "Number of interpipe sources listening to this specific sink", + 0, G_MAXUINT, 0, G_PARAM_READABLE)); + basesink_class->get_caps = GST_DEBUG_FUNCPTR (gst_inter_pipe_sink_get_caps); basesink_class->set_caps = GST_DEBUG_FUNCPTR (gst_inter_pipe_sink_set_caps); basesink_class->event = GST_DEBUG_FUNCPTR (gst_inter_pipe_sink_event); @@ -250,9 +256,20 @@ static void gst_inter_pipe_sink_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { + GstInterPipeSink *sink; + GHashTable *listeners; + g_return_if_fail (GST_IS_INTER_PIPE_SINK (object)); + sink = GST_INTER_PIPE_SINK (object); + listeners = GST_INTER_PIPE_SINK_LISTENERS (sink); + switch (prop_id) { + case PROP_NUM_LISTENERS: + g_mutex_lock (&sink->listeners_mutex); + g_value_set_uint (value, g_hash_table_size (listeners)); + g_mutex_unlock (&sink->listeners_mutex); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; From 8f72d2bf5cdea675d2dbf7432a60f36d6f26ffe8 Mon Sep 17 00:00:00 2001 From: Miguel Taylor Date: Wed, 5 Feb 2020 16:56:08 -0600 Subject: [PATCH 2/2] Update version number --- configure.ac | 2 +- gst-interpipe.doap | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 48e0fb6..7166a7f 100644 --- a/configure.ac +++ b/configure.ac @@ -6,7 +6,7 @@ dnl please read gstreamer/docs/random/autotools before changing this file dnl initialize autoconf dnl releases only do -Wall, git and prerelease does -Werror too dnl use a three digit version number for releases, and four for git/pre -AC_INIT([GstInterpipe],[1.0.7], +AC_INIT([GstInterpipe],[1.1.0], [http://www.github.com/RidgeRun/gst-interpipe-1.0], [gst-interpipe], [http://developer.ridgerun.com/wiki/index.php?title=GstInterpipe]) diff --git a/gst-interpipe.doap b/gst-interpipe.doap index 8b0f12e..8d94da3 100644 --- a/gst-interpipe.doap +++ b/gst-interpipe.doap @@ -30,6 +30,16 @@ GstInterpipe is a plug-in with two elements which allow the communication betwee + + + 1.1.0 + master + + 2020-02-05 + + + + 1.0.7