Commit c25849f9 authored by Alicia Boya García's avatar Alicia Boya García Committed by Thibault Saunier

Use automatic pad activation in elements that can take advantage of it

Pads are activated automatically when they are added if the element
state is >=PAUSED, so it's not necessary to activate them manually
anymore.

This patch removes manual pad activation from gstaggregator, gstconcat,
gstfunnel, and gstinputselector.
parent 08530995
Pipeline #58266 failed with stages
in 75 minutes and 41 seconds
......@@ -1870,7 +1870,6 @@ gst_aggregator_request_new_pad (GstElement * element,
GstAggregator *self;
GstAggregatorPad *agg_pad;
GstAggregatorClass *klass = GST_AGGREGATOR_GET_CLASS (element);
GstAggregatorPrivate *priv = GST_AGGREGATOR (element)->priv;
self = GST_AGGREGATOR (element);
......@@ -1882,9 +1881,6 @@ gst_aggregator_request_new_pad (GstElement * element,
GST_DEBUG_OBJECT (element, "Adding pad %s", GST_PAD_NAME (agg_pad));
if (priv->running)
gst_pad_set_active (GST_PAD (agg_pad), TRUE);
/* add the pad to the element */
gst_element_add_pad (element, GST_PAD (agg_pad));
......
......@@ -309,8 +309,6 @@ gst_concat_request_new_pad (GstElement * element, GstPadTemplate * templ,
GST_OBJECT_FLAG_SET (sinkpad, GST_PAD_FLAG_PROXY_CAPS);
GST_OBJECT_FLAG_SET (sinkpad, GST_PAD_FLAG_PROXY_ALLOCATION);
gst_pad_set_active (sinkpad, TRUE);
g_mutex_lock (&self->lock);
self->sinkpads = g_list_prepend (self->sinkpads, gst_object_ref (sinkpad));
if (!self->current_sinkpad) {
......
......@@ -236,8 +236,6 @@ gst_funnel_request_new_pad (GstElement * element, GstPadTemplate * templ,
GST_OBJECT_FLAG_SET (sinkpad, GST_PAD_FLAG_PROXY_CAPS);
GST_OBJECT_FLAG_SET (sinkpad, GST_PAD_FLAG_PROXY_ALLOCATION);
gst_pad_set_active (sinkpad, TRUE);
gst_element_add_pad (element, sinkpad);
GST_DEBUG_OBJECT (element, "requested pad %s:%s",
......
......@@ -1793,7 +1793,6 @@ gst_input_selector_request_new_pad (GstElement * element,
GST_OBJECT_FLAG_SET (sinkpad, GST_PAD_FLAG_PROXY_CAPS);
GST_OBJECT_FLAG_SET (sinkpad, GST_PAD_FLAG_PROXY_ALLOCATION);
gst_pad_set_active (sinkpad, TRUE);
gst_element_add_pad (GST_ELEMENT (sel), sinkpad);
GST_INPUT_SELECTOR_UNLOCK (sel);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment