*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/**
- * SECTION:gsttrace
- * @short_description: Tracing functionality
- *
- * Traces allows to track object allocation. They provide a instance counter per
- * #GType. The counter is incremented for each object allocated and decremented
- * it when it's freed.
- *
- * <example>
- * <title>Tracing object instances</title>
- * <programlisting>
- * // trace un-freed object instances
- * gst_alloc_trace_set_flags_all (GST_ALLOC_TRACE_LIVE);
- * if (!gst_alloc_trace_available ()) {
- * g_warning ("Trace not available (recompile with trace enabled).");
- * }
- * gst_alloc_trace_print_live ();
- * // do something here
- * gst_alloc_trace_print_live ();
- * </programlisting>
- * </example>
- *
- * Last reviewed on 2005-11-21 (0.9.5)
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
*/
#ifdef HAVE_CONFIG_H
trace = g_getenv ("GST_TRACE");
if (trace != NULL) {
- _gst_trace_flags = atoi (trace);
+ const GDebugKey keys[] = {
+ {"live", GST_ALLOC_TRACE_LIVE},
+ {"mem-live", GST_ALLOC_TRACE_MEM_LIVE},
+ };
+ _gst_trace_flags = g_parse_debug_string (trace, keys, G_N_ELEMENTS (keys));
atexit (_at_exit);
}
if (type == GST_TYPE_CAPS) {
extra = gst_caps_to_string (data);
- refcount = GST_MINI_OBJECT_REFCOUNT_VALUE (data);
}
+ refcount = GST_MINI_OBJECT_REFCOUNT_VALUE (data);
}
if (extra) {