mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
output-selector: Notify when the active-pad property is changing
This commit is contained in:
parent
10b78d872b
commit
0e132260a3
1 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue