From 9574c7851f2bd5c45eaf16ffd92473c44ed29011 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Thu, 22 Jul 2004 16:14:56 +0000 Subject: [PATCH] gst/gstelementfactory.c: set the factory in the class struct, so gst_element_get_factory actually works Original commit message from CVS: * gst/gstelementfactory.c: (gst_element_register): set the factory in the class struct, so gst_element_get_factory actually works * gst/parse/grammar.y: set element to playing when it gets unlocked as we can't rely on the bin state - all elements in the bin state might still be locked in NULL) --- ChangeLog | 10 ++++++++++ gst/gstelementfactory.c | 1 + gst/parse/grammar.y | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c126213ddd..d959e79b7b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2004-07-22 Benjamin Otte + + * gst/gstelementfactory.c: (gst_element_register): + set the factory in the class struct, so gst_element_get_factory + actually works + * gst/parse/grammar.y: + set element to playing when it gets unlocked as we can't rely on the + bin state - all elements in the bin state might still be locked in + NULL) + 2004-07-22 Benjamin Otte * gst/gstelement.c: (gst_element_set_state_func): diff --git a/gst/gstelementfactory.c b/gst/gstelementfactory.c index d6b0725608..7e7a547b3b 100644 --- a/gst/gstelementfactory.c +++ b/gst/gstelementfactory.c @@ -233,6 +233,7 @@ gst_element_register (GstPlugin * plugin, const gchar * name, guint rank, factory->padtemplates = g_list_copy (klass->padtemplates); g_list_foreach (factory->padtemplates, (GFunc) gst_object_ref, NULL); factory->numpadtemplates = klass->numpadtemplates; + klass->elementfactory = factory; /* special stuff for URI handling */ if (g_type_is_a (type, GST_TYPE_URI_HANDLER)) { diff --git a/gst/parse/grammar.y b/gst/parse/grammar.y index ec857307f5..9c8a6b5661 100644 --- a/gst/parse/grammar.y +++ b/gst/parse/grammar.y @@ -316,7 +316,7 @@ gst_parse_element_lock (GstElement *element, gboolean lock) GST_CAT_DEBUG (GST_CAT_PIPELINE, "trying to sync state of element with parent"); /* FIXME: it would be nice if we can figure out why it failed (e.g. caps nego) and give an error about that instead. */ - if (!gst_element_sync_state_with_parent (element)) + if (gst_element_set_state (element, GST_STATE_PLAYING) == GST_STATE_FAILURE) GST_ELEMENT_ERROR (element, CORE, STATE_CHANGE, (NULL), (NULL)); } } else {