+ factory = GST_TRACER_FACTORY (gst_plugin_feature_load (feature));
+ if (!factory) {
+ g_print ("%stracer plugin couldn't be loaded%s\n", DESC_COLOR, RESET_COLOR);
+ return -1;
+ }
+
+ tracer = (GstTracer *) g_object_new (factory->type, NULL);
+ if (!tracer) {
+ gst_object_unref (factory);
+ g_print ("%scouldn't construct tracer for some reason%s\n", DESC_COLOR,
+ RESET_COLOR);
+ return -1;
+ }
+
+ if (print_names)
+ _name =
+ g_strdup_printf ("%s%s%s: ", DATATYPE_COLOR, GST_OBJECT_NAME (factory),
+ RESET_COLOR);
+ else
+ _name = NULL;
+
+ n_print ("%sFactory Details%s:\n", HEADING_COLOR, RESET_COLOR);
+ n_print (" %s%-25s%s%s%s\n", PROP_NAME_COLOR, "Name", PROP_VALUE_COLOR,
+ GST_OBJECT_NAME (factory), RESET_COLOR);
+ n_print ("\n");
+
+ plugin = gst_plugin_feature_get_plugin (GST_PLUGIN_FEATURE (factory));
+ if (plugin) {
+ print_plugin_info (plugin);
+ gst_object_unref (plugin);
+ }
+
+ print_hierarchy (G_OBJECT_TYPE (tracer), 0, &maxlevel);
+ print_interfaces (G_OBJECT_TYPE (tracer));
+
+ /* TODO: list what hooks it registers
+ * - the data is available in gsttracerutils, we need to iterate the
+ * _priv_tracers hashtable for each probe and then check the list of hooks
+ * for each probe whether hook->tracer == tracer :/
+ */
+
+ /* TODO: list what records it emits
+ * - in class_init tracers can create GstTracerRecord instances
+ * - those only get logged right now and there is no association with the
+ * tracer that created them
+ * - we'd need to add them to GstTracerFactory
+ * gst_tracer_class_add_record (klass, record);
+ * - needs work in gstregistrychunks to (de)serialize specs
+ * - gst_tracer_register() would need to iterate the list of records and
+ * copy the record->spec into the factory
+ */
+
+ gst_object_unref (tracer);
+ gst_object_unref (factory);
+ g_free (_name);
+ return 0;
+}
+
+/* NOTE: Not coloring output from automatic install functions, as their output
+ * is meant for machines, not humans.
+ */