debugging cleanup

Original commit message from CVS:
debugging cleanup
This commit is contained in:
Benjamin Otte 2003-07-05 15:05:23 +00:00
parent 568de85efc
commit 433bea4d7d

View file

@ -26,6 +26,8 @@
#include "gstregistrypool.h"
#include "gstinfo.h"
#define GST_CAT_DEFAULT GST_CAT_ELEMENT_FACTORY
static void gst_element_factory_class_init (GstElementFactoryClass *klass);
static void gst_element_factory_init (GstElementFactory *factory);
@ -102,7 +104,7 @@ gst_element_factory_find (const gchar *name)
return GST_ELEMENT_FACTORY (feature);
/* this should be an ERROR */
GST_CAT_DEBUG (GST_CAT_ELEMENT_FACTORY,"no such elementfactory \"%s\"", name);
GST_DEBUG ("no such elementfactory \"%s\"", name);
return NULL;
}
@ -208,12 +210,13 @@ gst_element_factory_create (GstElementFactory *factory,
g_return_val_if_fail (factory != NULL, NULL);
if (!gst_plugin_feature_ensure_loaded (GST_PLUGIN_FEATURE (factory)))
if (!gst_plugin_feature_ensure_loaded (GST_PLUGIN_FEATURE (factory))) {
GST_INFO ("could not load element factory for element \"%s\"", name);
return NULL;
}
GST_CAT_DEBUG (GST_CAT_ELEMENT_FACTORY,
"creating element from factory \"%s\" (name \"%s\", type %d)",
GST_PLUGIN_FEATURE_NAME (factory), GST_STR_NULL (name), (gint) factory->type);
GST_LOG ("creating element from factory \"%s\" (name \"%s\", type %d)",
GST_PLUGIN_FEATURE_NAME (factory), GST_STR_NULL (name), (gint) factory->type);
if (factory->type == 0) {
g_critical ("Factory for `%s' has no type",
@ -224,7 +227,7 @@ gst_element_factory_create (GstElementFactory *factory,
/* attempt to set the elementfactory class pointer if necessary */
oclass = GST_ELEMENT_CLASS (g_type_class_ref (factory->type));
if (oclass->elementfactory == NULL) {
GST_CAT_DEBUG (GST_CAT_ELEMENT_FACTORY, "class %s", GST_PLUGIN_FEATURE_NAME (factory));
GST_DEBUG ("class %s", GST_PLUGIN_FEATURE_NAME (factory));
oclass->elementfactory = factory;
/* copy pad template pointers to the element class,
@ -265,20 +268,19 @@ gst_element_factory_make (const gchar *factoryname, const gchar *name)
g_return_val_if_fail (factoryname != NULL, NULL);
GST_CAT_DEBUG (GST_CAT_ELEMENT_FACTORY, "gstelementfactory: make \"%s\" \"%s\"",
factoryname, GST_STR_NULL (name));
GST_LOG ("gstelementfactory: make \"%s\" \"%s\"",
factoryname, GST_STR_NULL (name));
/* gst_plugin_load_element_factory (factoryname); */
factory = gst_element_factory_find (factoryname);
if (factory == NULL) {
GST_CAT_INFO (GST_CAT_ELEMENT_FACTORY,"no such element factory \"%s\"!",
GST_INFO ("no such element factory \"%s\"!",
factoryname);
return NULL;
}
element = gst_element_factory_create (factory, name);
if (element == NULL) {
GST_CAT_INFO (GST_CAT_ELEMENT_FACTORY,
"couldn't create instance of element factory \"%s\"!",
GST_INFO ("couldn't create instance of element factory \"%s\"!",
factoryname);
return NULL;
}