mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 11:11:08 +00:00
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
This commit is contained in:
parent
50c32da91f
commit
2fee579747
1 changed files with 2 additions and 6 deletions
|
@ -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;
|
* Adds a pad (link point) to @element. @pad's parent will be set to @element;
|
||||||
* see gst_object_set_parent() for refcounting information.
|
* see gst_object_set_parent() for refcounting information.
|
||||||
*
|
*
|
||||||
* Pads are not automatically activated so elements should perform the needed
|
* Pads are automatically activated when added in the PAUSED or PLAYING
|
||||||
* steps to activate the pad in case this pad is added in the PAUSED or PLAYING
|
* state.
|
||||||
* state. See gst_pad_set_active() for more information about activating pads.
|
|
||||||
*
|
*
|
||||||
* The pad and the element should be unlocked when calling this function.
|
* 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 */
|
/* check for active pads */
|
||||||
if (!active && (GST_STATE (element) > GST_STATE_READY ||
|
if (!active && (GST_STATE (element) > GST_STATE_READY ||
|
||||||
GST_STATE_NEXT (element) == GST_STATE_PAUSED)) {
|
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);
|
gst_pad_set_active (pad, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue