2 * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
3 * 2000 Wim Taymans <wtay@chello.be>
5 * gsttrace.h: Header for tracing functions (depracated)
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
24 #ifndef __GST_TRACE_H__
25 #define __GST_TRACE_H__
27 #ifndef GST_DISABLE_TRACE
33 typedef struct _GstTrace GstTrace;
34 typedef struct _GstTraceEntry GstTraceEntry;
37 /* where this trace is going */
41 /* current buffer, size, head offset */
47 struct _GstTraceEntry {
54 GstTrace* gst_trace_new (gchar *filename, gint size);
56 void gst_trace_destroy (GstTrace *trace);
57 void gst_trace_flush (GstTrace *trace);
58 void gst_trace_text_flush (GstTrace *trace);
59 #define gst_trace_get_size(trace) ((trace)->bufsize)
60 #define gst_trace_get_offset(trace) ((trace)->bufoffset)
61 #define gst_trace_get_remaining(trace) ((trace)->bufsize - (trace)->bufoffset)
62 void gst_trace_set_default (GstTrace *trace);
64 void _gst_trace_add_entry (GstTrace *trace, guint32 seq,
65 guint32 data, gchar *msg);
67 void gst_trace_read_tsc (guint64 *dst);
72 extern gint _gst_trace_on;
73 #define gst_trace_add_entry(trace,seq,data,msg) \
74 if (_gst_trace_on) { \
75 _gst_trace_add_entry(trace,(guint32)seq,(guint32)data,msg); \
78 #define gst_trace_add_entry(trace,seq,data,msg)
81 #else /* GST_DISABLE_TRACE */
83 #pragma GCC poison gst_trace_new
84 #pragma GCC poison gst_trace_destroy
85 #pragma GCC poison gst_trace_flush
86 #pragma GCC poison gst_trace_text_flush
87 #pragma GCC poison gst_trace_get_size
88 #pragma GCC poison gst_trace_get_offset
89 #pragma GCC poison gst_trace_get_remaining
90 #pragma GCC poison gst_trace_set_default
91 #pragma GCC poison _gst_trace_add_entry
92 #pragma GCC poison gst_trace_read_tsc
93 #pragma GCC poison gst_trace_add_entry
95 #endif /* GST_DISABLE_TRACE */
99 #endif /* __GST_TRACE_H__ */