mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
debugging cleanup
Original commit message from CVS: debugging cleanup
This commit is contained in:
parent
568de85efc
commit
433bea4d7d
1 changed files with 13 additions and 11 deletions
|
@ -26,6 +26,8 @@
|
||||||
#include "gstregistrypool.h"
|
#include "gstregistrypool.h"
|
||||||
#include "gstinfo.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_class_init (GstElementFactoryClass *klass);
|
||||||
static void gst_element_factory_init (GstElementFactory *factory);
|
static void gst_element_factory_init (GstElementFactory *factory);
|
||||||
|
|
||||||
|
@ -102,7 +104,7 @@ gst_element_factory_find (const gchar *name)
|
||||||
return GST_ELEMENT_FACTORY (feature);
|
return GST_ELEMENT_FACTORY (feature);
|
||||||
|
|
||||||
/* this should be an ERROR */
|
/* 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;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,11 +210,12 @@ gst_element_factory_create (GstElementFactory *factory,
|
||||||
|
|
||||||
g_return_val_if_fail (factory != NULL, NULL);
|
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;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
GST_CAT_DEBUG (GST_CAT_ELEMENT_FACTORY,
|
GST_LOG ("creating element from factory \"%s\" (name \"%s\", type %d)",
|
||||||
"creating element from factory \"%s\" (name \"%s\", type %d)",
|
|
||||||
GST_PLUGIN_FEATURE_NAME (factory), GST_STR_NULL (name), (gint) factory->type);
|
GST_PLUGIN_FEATURE_NAME (factory), GST_STR_NULL (name), (gint) factory->type);
|
||||||
|
|
||||||
if (factory->type == 0) {
|
if (factory->type == 0) {
|
||||||
|
@ -224,7 +227,7 @@ gst_element_factory_create (GstElementFactory *factory,
|
||||||
/* attempt to set the elementfactory class pointer if necessary */
|
/* attempt to set the elementfactory class pointer if necessary */
|
||||||
oclass = GST_ELEMENT_CLASS (g_type_class_ref (factory->type));
|
oclass = GST_ELEMENT_CLASS (g_type_class_ref (factory->type));
|
||||||
if (oclass->elementfactory == NULL) {
|
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;
|
oclass->elementfactory = factory;
|
||||||
|
|
||||||
/* copy pad template pointers to the element class,
|
/* 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);
|
g_return_val_if_fail (factoryname != NULL, NULL);
|
||||||
|
|
||||||
GST_CAT_DEBUG (GST_CAT_ELEMENT_FACTORY, "gstelementfactory: make \"%s\" \"%s\"",
|
GST_LOG ("gstelementfactory: make \"%s\" \"%s\"",
|
||||||
factoryname, GST_STR_NULL (name));
|
factoryname, GST_STR_NULL (name));
|
||||||
|
|
||||||
/* gst_plugin_load_element_factory (factoryname); */
|
/* gst_plugin_load_element_factory (factoryname); */
|
||||||
factory = gst_element_factory_find (factoryname);
|
factory = gst_element_factory_find (factoryname);
|
||||||
if (factory == NULL) {
|
if (factory == NULL) {
|
||||||
GST_CAT_INFO (GST_CAT_ELEMENT_FACTORY,"no such element factory \"%s\"!",
|
GST_INFO ("no such element factory \"%s\"!",
|
||||||
factoryname);
|
factoryname);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
element = gst_element_factory_create (factory, name);
|
element = gst_element_factory_create (factory, name);
|
||||||
if (element == NULL) {
|
if (element == NULL) {
|
||||||
GST_CAT_INFO (GST_CAT_ELEMENT_FACTORY,
|
GST_INFO ("couldn't create instance of element factory \"%s\"!",
|
||||||
"couldn't create instance of element factory \"%s\"!",
|
|
||||||
factoryname);
|
factoryname);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue