mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
gst/autoplug/gstspider.c: improve debugging messages
Original commit message from CVS: * gst/autoplug/gstspider.c: (gst_spider_link_sometimes), (gst_spider_identity_plug): improve debugging messages * gst/gstbin.c: (gst_bin_remove_func): make sure the state_change function is only called with simple state transitions
This commit is contained in:
parent
bf291b3f72
commit
d138a1b78e
3 changed files with 22 additions and 3 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2004-04-20 Benjamin Otte <in7y118@public.uni-hamburg.de>
|
||||||
|
|
||||||
|
* gst/autoplug/gstspider.c: (gst_spider_link_sometimes),
|
||||||
|
(gst_spider_identity_plug):
|
||||||
|
improve debugging messages
|
||||||
|
* gst/gstbin.c: (gst_bin_remove_func):
|
||||||
|
make sure the state_change function is only called with simple state
|
||||||
|
transitions
|
||||||
|
|
||||||
2004-04-20 Thomas Vander Stichele <thomas at apestaart dot org>
|
2004-04-20 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
* Makefile.am:
|
* Makefile.am:
|
||||||
|
|
|
@ -307,6 +307,7 @@ gst_spider_link_sometimes (GstElement * src, GstPad * pad,
|
||||||
{
|
{
|
||||||
gulong signal_id = conn->signal_id;
|
gulong signal_id = conn->signal_id;
|
||||||
|
|
||||||
|
GST_INFO ("plugging from new sometimes pad %s:%s", GST_DEBUG_PAD_NAME (pad));
|
||||||
/* try to autoplug the elements */
|
/* try to autoplug the elements */
|
||||||
if (gst_spider_plug_from_srcpad (conn, pad) != GST_PAD_LINK_REFUSED) {
|
if (gst_spider_plug_from_srcpad (conn, pad) != GST_PAD_LINK_REFUSED) {
|
||||||
GST_DEBUG ("%s:%s was autoplugged to %s:%s, removing callback",
|
GST_DEBUG ("%s:%s was autoplugged to %s:%s, removing callback",
|
||||||
|
@ -430,7 +431,8 @@ gst_spider_identity_plug (GstSpiderIdentity * ident)
|
||||||
while (factories) {
|
while (factories) {
|
||||||
if ((padtemp =
|
if ((padtemp =
|
||||||
gst_autoplug_can_connect_src (factories->data, src_caps))) {
|
gst_autoplug_can_connect_src (factories->data, src_caps))) {
|
||||||
GST_DEBUG ("can connect src to pad template: %" GST_PTR_FORMAT,
|
GST_DEBUG ("can connect src to %s pad template: %" GST_PTR_FORMAT,
|
||||||
|
GST_PLUGIN_FEATURE_NAME (factories->data),
|
||||||
gst_pad_template_get_caps (padtemp));
|
gst_pad_template_get_caps (padtemp));
|
||||||
found = TRUE;
|
found = TRUE;
|
||||||
}
|
}
|
||||||
|
|
12
gst/gstbin.c
12
gst/gstbin.c
|
@ -548,9 +548,17 @@ gst_bin_remove_func (GstBin * bin, GstElement * element)
|
||||||
gst_object_unparent (GST_OBJECT (element));
|
gst_object_unparent (GST_OBJECT (element));
|
||||||
|
|
||||||
/* if we're down to zero children, force state to NULL */
|
/* if we're down to zero children, force state to NULL */
|
||||||
if (bin->numchildren == 0 && GST_ELEMENT_SCHED (bin) != NULL) {
|
while (bin->numchildren == 0 && GST_ELEMENT_SCHED (bin) != NULL &&
|
||||||
GST_STATE_PENDING (bin) = GST_STATE_NULL;
|
GST_STATE (bin) > GST_STATE_NULL) {
|
||||||
|
GstElementState next = GST_STATE (bin) >> 1;
|
||||||
|
|
||||||
|
GST_STATE_PENDING (bin) = next;
|
||||||
gst_bin_change_state_norecurse (bin);
|
gst_bin_change_state_norecurse (bin);
|
||||||
|
if (!GST_STATE (bin) == next) {
|
||||||
|
g_warning ("bin %s failed state change to %d", GST_ELEMENT_NAME (bin),
|
||||||
|
next);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
g_signal_emit (G_OBJECT (bin), gst_bin_signals[ELEMENT_REMOVED], 0, element);
|
g_signal_emit (G_OBJECT (bin), gst_bin_signals[ELEMENT_REMOVED], 0, element);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue