gsttrace.h   gsttrace.h 
skipping to change at line 90 skipping to change at line 90
gint bufoffset; gint bufoffset;
}; };
struct _GstTraceEntry { struct _GstTraceEntry {
gint64 timestamp; gint64 timestamp;
guint32 sequence; guint32 sequence;
guint32 data; guint32 data;
gchar message[112]; gchar message[112];
}; };
GstTrace* gst_trace_new (gchar *filename, gint size) ; GstTrace* gst_trace_new (const gchar *filename, gint size);
void gst_trace_destroy (GstTrace *trace); void gst_trace_destroy (GstTrace *trace);
void gst_trace_flush (GstTrace *trace); void gst_trace_flush (GstTrace *trace);
void gst_trace_text_flush (GstTrace *trace); void gst_trace_text_flush (GstTrace *trace);
/** /**
* gst_trace_get_size: * gst_trace_get_size:
* @trace: a #GstTrace * @trace: a #GstTrace
* *
* Retrieve the buffer size of @trace. * Retrieve the buffer size of @trace.
*/ */
skipping to change at line 123 skipping to change at line 123
* Retrieve the remaining size in the @trace buffer. * Retrieve the remaining size in the @trace buffer.
*/ */
#define gst_trace_get_remaining(trace) ((trace)->bufsize - (trace)- >bufoffset) #define gst_trace_get_remaining(trace) ((trace)->bufsize - (trace)- >bufoffset)
void gst_trace_set_default (GstTrace *trace); void gst_trace_set_default (GstTrace *trace);
void _gst_trace_add_entry (GstTrace *trace, guint32 se q, void _gst_trace_add_entry (GstTrace *trace, guint32 se q,
guint32 data, gchar *msg); guint32 data, gchar *msg);
void gst_trace_read_tsc (gint64 *dst); void gst_trace_read_tsc (gint64 *dst);
extern GStaticMutex _gst_trace_mutex;
gboolean gst_alloc_trace_available (void); gboolean gst_alloc_trace_available (void);
G_CONST_RETURN GList* gst_alloc_trace_list (void); G_CONST_RETURN GList* gst_alloc_trace_list (void);
GstAllocTrace* _gst_alloc_trace_register (const gchar *name); GstAllocTrace* _gst_alloc_trace_register (const gchar *name);
int gst_alloc_trace_live_all (void); int gst_alloc_trace_live_all (void);
void gst_alloc_trace_print_all (void); void gst_alloc_trace_print_all (void);
void gst_alloc_trace_print_live (void); void gst_alloc_trace_print_live (void);
void gst_alloc_trace_set_flags_all (GstAllocTraceFlags flags); void gst_alloc_trace_set_flags_all (GstAllocTraceFlags flags);
GstAllocTrace* gst_alloc_trace_get (const gchar *name); GstAllocTrace* gst_alloc_trace_get (const gchar *name);
skipping to change at line 154 skipping to change at line 156
/** /**
* gst_alloc_trace_new: * gst_alloc_trace_new:
* @trace: The tracer to use * @trace: The tracer to use
* @mem: The memory allocated * @mem: The memory allocated
* *
* Use the tracer to trace a new memory allocation * Use the tracer to trace a new memory allocation
*/ */
#define gst_alloc_trace_new(trace, mem) \ #define gst_alloc_trace_new(trace, mem) \
G_STMT_START { \ G_STMT_START { \
if ((trace)->flags & GST_ALLOC_TRACE_LIVE) \ if (G_UNLIKELY ((trace)->flags)) { \
(trace)->live++; \ g_static_mutex_lock (&_gst_trace_mutex); \
if ((trace)->flags & GST_ALLOC_TRACE_MEM_LIVE) \ if ((trace)->flags & GST_ALLOC_TRACE_LIVE) \
(trace)->mem_live = \ (trace)->live++; \
g_slist_prepend ((trace)->mem_live, mem); \ if ((trace)->flags & GST_ALLOC_TRACE_MEM_LIVE) \
(trace)->mem_live = \
g_slist_prepend ((trace)->mem_live, mem); \
g_static_mutex_unlock (&_gst_trace_mutex); \
} \
} G_STMT_END } G_STMT_END
/** /**
* gst_alloc_trace_free: * gst_alloc_trace_free:
* @trace: The tracer to use * @trace: The tracer to use
* @mem: The memory that is freed * @mem: The memory that is freed
* *
* Trace a memory free operation * Trace a memory free operation
*/ */
#define gst_alloc_trace_free(trace, mem) \ #define gst_alloc_trace_free(trace, mem) \
G_STMT_START { \ G_STMT_START { \
if ((trace)->flags & GST_ALLOC_TRACE_LIVE) \ if (G_UNLIKELY ((trace)->flags)) { \
(trace)->live--; \ g_static_mutex_lock (&_gst_trace_mutex); \
if ((trace)->flags & GST_ALLOC_TRACE_MEM_LIVE) \ if ((trace)->flags & GST_ALLOC_TRACE_LIVE) \
(trace)->mem_live = \ (trace)->live--; \
g_slist_remove ((trace)->mem_live, mem); \ if ((trace)->flags & GST_ALLOC_TRACE_MEM_LIVE) \
(trace)->mem_live = \
g_slist_remove ((trace)->mem_live, mem); \
g_static_mutex_unlock (&_gst_trace_mutex); \
} \
} G_STMT_END } G_STMT_END
#else #else
#define gst_alloc_trace_register(name) (NULL) #define gst_alloc_trace_register(name) (NULL)
#define gst_alloc_trace_new(trace, mem) #define gst_alloc_trace_new(trace, mem)
#define gst_alloc_trace_free(trace, mem) #define gst_alloc_trace_free(trace, mem)
#endif #endif
extern gint _gst_trace_on; extern gint _gst_trace_on;
/** /**
skipping to change at line 201 skipping to change at line 211
* Add an entry to @trace with sequence number @seq, @data and @msg. * Add an entry to @trace with sequence number @seq, @data and @msg.
* If @trace is NULL, the entry will be added to the default #GstTrace. * If @trace is NULL, the entry will be added to the default #GstTrace.
*/ */
#define gst_trace_add_entry(trace,seq,data,msg) \ #define gst_trace_add_entry(trace,seq,data,msg) \
if (_gst_trace_on) { \ if (_gst_trace_on) { \
_gst_trace_add_entry(trace,(guint32)seq,(guint32)data,msg); \ _gst_trace_add_entry(trace,(guint32)seq,(guint32)data,msg); \
} }
#else /* GST_DISABLE_TRACE */ #else /* GST_DISABLE_TRACE */
#if defined _GNUC_ && _GNUC_ >= 3 #if defined __GNUC__ && __GNUC__ >= 3
#pragma GCC poison gst_trace_new #pragma GCC poison gst_trace_new
#pragma GCC poison gst_trace_destroy #pragma GCC poison gst_trace_destroy
#pragma GCC poison gst_trace_flush #pragma GCC poison gst_trace_flush
#pragma GCC poison gst_trace_text_flush #pragma GCC poison gst_trace_text_flush
#pragma GCC poison gst_trace_get_size #pragma GCC poison gst_trace_get_size
#pragma GCC poison gst_trace_get_offset #pragma GCC poison gst_trace_get_offset
#pragma GCC poison gst_trace_get_remaining #pragma GCC poison gst_trace_get_remaining
#pragma GCC poison gst_trace_set_default #pragma GCC poison gst_trace_set_default
#pragma GCC poison _gst_trace_add_entry #pragma GCC poison _gst_trace_add_entry
#pragma GCC poison gst_trace_read_tsc #pragma GCC poison gst_trace_read_tsc
#pragma GCC poison gst_trace_add_entry
#endif #endif
#define gst_alloc_trace_register(name) (NULL) #define gst_alloc_trace_register(name) (NULL)
#define gst_alloc_trace_new(trace, mem) #define gst_alloc_trace_new(trace, mem)
#define gst_alloc_trace_free(trace, mem) #define gst_alloc_trace_free(trace, mem)
#define gst_alloc_trace_available() (FALSE) #define gst_alloc_trace_available() (FALSE)
#define gst_alloc_trace_list() (NULL) #define gst_alloc_trace_list() (NULL)
#define _gst_alloc_trace_register(name) (NULL) #define _gst_alloc_trace_register(name) (NULL)
 End of changes. 6 change blocks. 
13 lines changed or deleted 22 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/