After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 797181 - gst_element_add_pad: remove inactive pad g_warning
gst_element_add_pad: remove inactive pad g_warning
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other All
: Normal normal
: 1.15.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-09-20 14:33 UTC by Mathieu Duponchelle
Modified: 2018-09-27 10:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gst_element_add_pad: remove inactive pad g_warning (1.97 KB, patch)
2018-09-20 14:33 UTC, Mathieu Duponchelle
rejected Details | Review
element: remove inactive pad g_warning in add_pad (1.97 KB, patch)
2018-09-20 14:39 UTC, Mathieu Duponchelle
committed Details | Review

Description Mathieu Duponchelle 2018-09-20 14:33:31 UTC
See commit message
Comment 1 Mathieu Duponchelle 2018-09-20 14:33:37 UTC
Created attachment 373714 [details] [review]
gst_element_add_pad: remove inactive pad g_warning

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.
Comment 2 Mathieu Duponchelle 2018-09-20 14:39:45 UTC
Created attachment 373715 [details] [review]
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.
Comment 3 Mathieu Duponchelle 2018-09-20 14:40:28 UTC
Review of attachment 373714 [details] [review]:

obsolete
Comment 4 Sebastian Dröge (slomo) 2018-09-20 16:44:23 UTC
Makes sense but I'm a bit worried about potential deadlocks caused by having gst_element_add_pad() directly activating the pad... but then it already did that before, just with a warning :)
Comment 5 Mathieu Duponchelle 2018-09-20 16:55:31 UTC
(In reply to Sebastian Dröge (slomo) from comment #4)
> Makes sense but I'm a bit worried about potential deadlocks caused by having
> gst_element_add_pad() directly activating the pad... but then it already did
> that before, just with a warning :)

Should we push it then? :)
Comment 6 Sebastian Dröge (slomo) 2018-09-21 07:12:23 UTC
I think so, if nobody complains until Monday :) I think it's the right thing to do as the requirement of the current code can't possibly be implemented in a thread-safe way
Comment 7 Mathieu Duponchelle 2018-09-27 10:47:06 UTC
Attachment 373715 [details] pushed as 2fee579 - element: remove inactive pad g_warning in add_pad