diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2016-01-16 10:47:36 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2016-01-16 10:47:36 +0100 |
commit | 0e132260a334a179d89f623aaa2414f8ecde7f19 (patch) | |
tree | f83b88254366ccb235a0599ba432aee3d79d11d8 /plugins | |
parent | 10b78d872b5a0050c8a4572267879b0adbb578f8 (diff) |
output-selector: Notify when the active-pad property is changing
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/elements/gstoutputselector.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/elements/gstoutputselector.c b/plugins/elements/gstoutputselector.c index beb4c7078b..c2b810b91a 100644 --- a/plugins/elements/gstoutputselector.c +++ b/plugins/elements/gstoutputselector.c @@ -337,6 +337,7 @@ gst_output_selector_request_new_pad (GstElement * element, /* Set the first requested src pad as active by default */ if (osel->active_srcpad == NULL) { osel->active_srcpad = srcpad; + g_object_notify (G_OBJECT (osel), "active-pad"); } g_free (padname); @@ -352,6 +353,12 @@ gst_output_selector_release_pad (GstElement * element, GstPad * pad) GST_DEBUG_OBJECT (osel, "releasing pad"); + /* Disable active pad if it's the to be removed pad */ + if (osel->active_srcpad == pad) { + osel->active_srcpad = NULL; + g_object_notify (G_OBJECT (osel), "active-pad"); + } + gst_pad_set_active (pad, FALSE); gst_element_remove_pad (GST_ELEMENT_CAST (osel), pad); @@ -379,6 +386,7 @@ gst_output_selector_switch (GstOutputSelector * osel) /* Send SEGMENT event and latest buffer if switching succeeded * and we already have a valid segment configured */ if (res) { + g_object_notify (G_OBJECT (osel), "active-pad"); gst_pad_sticky_events_foreach (osel->sinkpad, forward_sticky_events, osel->active_srcpad); |