Commit 2fee5797 authored by Mathieu Duponchelle's avatar Mathieu Duponchelle 🐸

element: remove inactive pad g_warning in add_pad

The documentation incorrectly used to state that the pads were
not automatically activated when added, whereas we actually do
that when appropriate.

Callers of gst_element_add_pad must not hold the object lock,
which implies that they cannot perform the same checks as
add_pad in a non-racy manner.

This updates the documentation, and removes the g_warning
that was output before performing automatic activation.

https://bugzilla.gnome.org/show_bug.cgi?id=797181
parent 50c32da9
......@@ -640,9 +640,8 @@ gst_element_get_index (GstElement * element)
* Adds a pad (link point) to @element. @pad's parent will be set to @element;
* see gst_object_set_parent() for refcounting information.
*
* Pads are not automatically activated so elements should perform the needed
* steps to activate the pad in case this pad is added in the PAUSED or PLAYING
* state. See gst_pad_set_active() for more information about activating pads.
* Pads are automatically activated when added in the PAUSED or PLAYING
* state.
*
* The pad and the element should be unlocked when calling this function.
*
......@@ -685,9 +684,6 @@ gst_element_add_pad (GstElement * element, GstPad * pad)
/* check for active pads */
if (!active && (GST_STATE (element) > GST_STATE_READY ||
GST_STATE_NEXT (element) == GST_STATE_PAUSED)) {
g_warning ("adding inactive pad '%s' to running element '%s', you need to "
"use gst_pad_set_active(pad,TRUE) before adding it.",
GST_STR_NULL (pad_name), GST_ELEMENT_NAME (element));
gst_pad_set_active (pad, TRUE);
}
......
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