mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-16 19:25:18 +00:00
gst/autoplug/gstspideridentity.c: don't delay links on the sink elements, it causes unnegotiated links.
Original commit message from CVS: * gst/autoplug/gstspideridentity.c: (gst_spider_identity_link): don't delay links on the sink elements, it causes unnegotiated links. * gst/elements/gsttypefindelement.c: (gst_type_find_element_base_init): add our padtemplates, we indeed do have some. * gst/elements/gsttypefindelement.c: (gst_type_find_element_handle_event), (gst_type_find_element_chain): don't push data when typefinding failed. * gst/gstpad.c: (gst_pad_link_fixate): check that no fixate function returns empty caps. * gst/gstpad.c: (gst_pad_push): check that the link is negotiated before data gets pushed. * tools/gst-register.c: (main): don't assert (fixes #148283)
This commit is contained in:
parent
3330b4665b
commit
1a8f31e577
6 changed files with 61 additions and 9 deletions
19
ChangeLog
19
ChangeLog
|
@ -1,3 +1,22 @@
|
||||||
|
2004-07-25 Benjamin Otte <otte@gnome.org>
|
||||||
|
|
||||||
|
* gst/autoplug/gstspideridentity.c: (gst_spider_identity_link):
|
||||||
|
don't delay links on the sink elements, it causes unnegotiated
|
||||||
|
links.
|
||||||
|
* gst/elements/gsttypefindelement.c:
|
||||||
|
(gst_type_find_element_base_init):
|
||||||
|
add our padtemplates, we indeed do have some.
|
||||||
|
* gst/elements/gsttypefindelement.c:
|
||||||
|
(gst_type_find_element_handle_event),
|
||||||
|
(gst_type_find_element_chain):
|
||||||
|
don't push data when typefinding failed.
|
||||||
|
* gst/gstpad.c: (gst_pad_link_fixate):
|
||||||
|
check that no fixate function returns empty caps.
|
||||||
|
* gst/gstpad.c: (gst_pad_push):
|
||||||
|
check that the link is negotiated before data gets pushed.
|
||||||
|
* tools/gst-register.c: (main):
|
||||||
|
don't assert (fixes #148283)
|
||||||
|
|
||||||
2004-07-25 Steve Lhomme <steve.lhomme@free.fr>
|
2004-07-25 Steve Lhomme <steve.lhomme@free.fr>
|
||||||
|
|
||||||
* docs/gst/gstreamer-sections.txt:
|
* docs/gst/gstreamer-sections.txt:
|
||||||
|
|
|
@ -257,14 +257,15 @@ gst_spider_identity_link (GstPad * pad, const GstCaps * caps)
|
||||||
GST_SPIDER_IDENTITY (gst_pad_get_parent (pad));
|
GST_SPIDER_IDENTITY (gst_pad_get_parent (pad));
|
||||||
GstPad *otherpad;
|
GstPad *otherpad;
|
||||||
|
|
||||||
if (pad == spider_identity->src)
|
if (pad == spider_identity->src) {
|
||||||
otherpad = spider_identity->sink;
|
otherpad = spider_identity->sink;
|
||||||
else
|
if (GST_PAD_PEER (otherpad) == NULL)
|
||||||
|
return GST_PAD_LINK_DELAYED;
|
||||||
|
} else {
|
||||||
otherpad = spider_identity->src;
|
otherpad = spider_identity->src;
|
||||||
|
}
|
||||||
|
|
||||||
g_return_val_if_fail (otherpad != NULL, GST_PAD_LINK_REFUSED);
|
g_return_val_if_fail (otherpad != NULL, GST_PAD_LINK_REFUSED);
|
||||||
if (GST_PAD_PEER (otherpad) == NULL)
|
|
||||||
return GST_PAD_LINK_DELAYED;
|
|
||||||
|
|
||||||
return gst_pad_try_set_caps (otherpad, caps);
|
return gst_pad_try_set_caps (otherpad, caps);
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,6 +127,10 @@ gst_type_find_element_base_init (gpointer g_class)
|
||||||
{
|
{
|
||||||
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
|
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
|
||||||
|
|
||||||
|
gst_element_class_add_pad_template (gstelement_class,
|
||||||
|
gst_static_pad_template_get (&type_find_element_src_template));
|
||||||
|
gst_element_class_add_pad_template (gstelement_class,
|
||||||
|
gst_static_pad_template_get (&type_find_element_sink_template));
|
||||||
gst_element_class_set_details (gstelement_class,
|
gst_element_class_set_details (gstelement_class,
|
||||||
&gst_type_find_element_details);
|
&gst_type_find_element_details);
|
||||||
}
|
}
|
||||||
|
@ -426,9 +430,13 @@ gst_type_find_element_handle_event (GstPad * pad, GstEvent * event)
|
||||||
GST_PLUGIN_FEATURE_NAME (entry->factory), entry->probability);
|
GST_PLUGIN_FEATURE_NAME (entry->factory), entry->probability);
|
||||||
g_signal_emit (typefind, gst_type_find_element_signals[HAVE_TYPE], 0,
|
g_signal_emit (typefind, gst_type_find_element_signals[HAVE_TYPE], 0,
|
||||||
entry->probability, entry->caps);
|
entry->probability, entry->caps);
|
||||||
|
stop_typefinding (typefind);
|
||||||
|
gst_pad_event_default (pad, event);
|
||||||
|
} else {
|
||||||
|
gst_pad_event_default (pad, event);
|
||||||
|
GST_ELEMENT_ERROR (typefind, STREAM, TYPE_NOT_FOUND, (NULL), (NULL));
|
||||||
|
stop_typefinding (typefind);
|
||||||
}
|
}
|
||||||
stop_typefinding (typefind);
|
|
||||||
gst_pad_event_default (pad, event);
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
gst_data_unref (GST_DATA (event));
|
gst_data_unref (GST_DATA (event));
|
||||||
|
@ -610,6 +618,7 @@ gst_type_find_element_chain (GstPad * pad, GstData * data)
|
||||||
stop_typefinding (typefind);
|
stop_typefinding (typefind);
|
||||||
} else if (typefind->possibilities == NULL) {
|
} else if (typefind->possibilities == NULL) {
|
||||||
GST_ELEMENT_ERROR (typefind, STREAM, TYPE_NOT_FOUND, (NULL), (NULL));
|
GST_ELEMENT_ERROR (typefind, STREAM, TYPE_NOT_FOUND, (NULL), (NULL));
|
||||||
|
stop_typefinding (typefind);
|
||||||
} else {
|
} else {
|
||||||
/* set up typefind element for next iteration */
|
/* set up typefind element for next iteration */
|
||||||
typefind->possibilities =
|
typefind->possibilities =
|
||||||
|
|
12
gst/gstpad.c
12
gst/gstpad.c
|
@ -1217,6 +1217,11 @@ gst_pad_link_fixate (GstPadLink * link)
|
||||||
if (i == 4) {
|
if (i == 4) {
|
||||||
/* we trust the default fixation function unconditionally */
|
/* we trust the default fixation function unconditionally */
|
||||||
bad = FALSE;
|
bad = FALSE;
|
||||||
|
} else if (gst_caps_is_empty (newcaps)) {
|
||||||
|
g_warning
|
||||||
|
("a fixation function did not fixate correctly, it returned empty caps");
|
||||||
|
gst_caps_free (newcaps);
|
||||||
|
continue;
|
||||||
} else if (gst_caps_is_any (caps)) {
|
} else if (gst_caps_is_any (caps)) {
|
||||||
bad = gst_caps_is_any (newcaps);
|
bad = gst_caps_is_any (newcaps);
|
||||||
} else {
|
} else {
|
||||||
|
@ -3176,6 +3181,13 @@ gst_pad_push (GstPad * pad, GstData * data)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (GST_IS_BUFFER (data) && !gst_pad_is_negotiated (pad)) {
|
||||||
|
g_warning ("pushing data on non-negotiated pad %s:%s, not allowed.",
|
||||||
|
GST_DEBUG_PAD_NAME (pad));
|
||||||
|
gst_data_unref (data);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad, "pushing");
|
GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad, "pushing");
|
||||||
peer = GST_RPAD_PEER (pad);
|
peer = GST_RPAD_PEER (pad);
|
||||||
|
|
||||||
|
|
|
@ -127,6 +127,10 @@ gst_type_find_element_base_init (gpointer g_class)
|
||||||
{
|
{
|
||||||
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
|
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
|
||||||
|
|
||||||
|
gst_element_class_add_pad_template (gstelement_class,
|
||||||
|
gst_static_pad_template_get (&type_find_element_src_template));
|
||||||
|
gst_element_class_add_pad_template (gstelement_class,
|
||||||
|
gst_static_pad_template_get (&type_find_element_sink_template));
|
||||||
gst_element_class_set_details (gstelement_class,
|
gst_element_class_set_details (gstelement_class,
|
||||||
&gst_type_find_element_details);
|
&gst_type_find_element_details);
|
||||||
}
|
}
|
||||||
|
@ -426,9 +430,13 @@ gst_type_find_element_handle_event (GstPad * pad, GstEvent * event)
|
||||||
GST_PLUGIN_FEATURE_NAME (entry->factory), entry->probability);
|
GST_PLUGIN_FEATURE_NAME (entry->factory), entry->probability);
|
||||||
g_signal_emit (typefind, gst_type_find_element_signals[HAVE_TYPE], 0,
|
g_signal_emit (typefind, gst_type_find_element_signals[HAVE_TYPE], 0,
|
||||||
entry->probability, entry->caps);
|
entry->probability, entry->caps);
|
||||||
|
stop_typefinding (typefind);
|
||||||
|
gst_pad_event_default (pad, event);
|
||||||
|
} else {
|
||||||
|
gst_pad_event_default (pad, event);
|
||||||
|
GST_ELEMENT_ERROR (typefind, STREAM, TYPE_NOT_FOUND, (NULL), (NULL));
|
||||||
|
stop_typefinding (typefind);
|
||||||
}
|
}
|
||||||
stop_typefinding (typefind);
|
|
||||||
gst_pad_event_default (pad, event);
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
gst_data_unref (GST_DATA (event));
|
gst_data_unref (GST_DATA (event));
|
||||||
|
@ -610,6 +618,7 @@ gst_type_find_element_chain (GstPad * pad, GstData * data)
|
||||||
stop_typefinding (typefind);
|
stop_typefinding (typefind);
|
||||||
} else if (typefind->possibilities == NULL) {
|
} else if (typefind->possibilities == NULL) {
|
||||||
GST_ELEMENT_ERROR (typefind, STREAM, TYPE_NOT_FOUND, (NULL), (NULL));
|
GST_ELEMENT_ERROR (typefind, STREAM, TYPE_NOT_FOUND, (NULL), (NULL));
|
||||||
|
stop_typefinding (typefind);
|
||||||
} else {
|
} else {
|
||||||
/* set up typefind element for next iteration */
|
/* set up typefind element for next iteration */
|
||||||
typefind->possibilities =
|
typefind->possibilities =
|
||||||
|
|
|
@ -135,7 +135,9 @@ main (int argc, char *argv[])
|
||||||
/* move over paths from this registry to the next one */
|
/* move over paths from this registry to the next one */
|
||||||
path_spill = g_list_concat (path_spill,
|
path_spill = g_list_concat (path_spill,
|
||||||
gst_registry_get_path_list (registry));
|
gst_registry_get_path_list (registry));
|
||||||
g_assert (path_spill != NULL);
|
/* this assertion triggers for a non-readable/writable user registry,
|
||||||
|
* see #148283 */
|
||||||
|
/* g_assert (path_spill != NULL); */
|
||||||
}
|
}
|
||||||
/* also move over paths if the registry wasn't writable
|
/* also move over paths if the registry wasn't writable
|
||||||
* FIXME: we should check if the paths that were loaded from this
|
* FIXME: we should check if the paths that were loaded from this
|
||||||
|
|
Loading…
Reference in a new issue