#include "gst_private.h"
#include "gstelement.h"
#include "gstpad.h"
+#include "gstscheduler.h"
+
+#if defined __sgi__
+#include <rld_interface.h>
+typedef struct DL_INFO {
+ const char * dli_fname;
+ void * dli_fbase;
+ const char * dli_sname;
+ void * dli_saddr;
+ int dli_version;
+ int dli_reserved1;
+ long dli_reserved[4];
+} Dl_info;
+#define _RLD_DLADDR 14
+int dladdr(void *address, Dl_info *dl);
+
+int dladdr(void *address, Dl_info *dl)
+{
+ void *v;
+ v = _rld_new_interface(_RLD_DLADDR,address,dl);
+ return (int)v;
+}
+#endif
extern gchar *_gst_progname;
[GST_CAT_COTHREAD_SWITCH] = "00;37;42",
[GST_CAT_AUTOPLUG] = "00;34",
[GST_CAT_AUTOPLUG_ATTEMPT] = "00;36;44",
- [GST_CAT_PARENTAGE] = "01;37;41", // !!
+ [GST_CAT_PARENTAGE] = "01;37;41", /* !! */
[GST_CAT_STATES] = "00;31",
[GST_CAT_PLANNING] = "07;35",
[GST_CAT_SCHEDULING] = "00;35",
[GST_CAT_DATAFLOW] = "00;32",
[GST_CAT_BUFFER] = "00;32",
[GST_CAT_CAPS] = "04;34",
- [GST_CAT_CLOCK] = "00;33", // !!
- [GST_CAT_ELEMENT_PADS] = "01;37;41", // !!
- [GST_CAT_ELEMENTFACTORY] = "01;37;41", // !!
- [GST_CAT_PADS] = "01;37;41", // !!
- [GST_CAT_PIPELINE] = "01;37;41", // !!
+ [GST_CAT_CLOCK] = "00;33", /* !! */
+ [GST_CAT_ELEMENT_PADS] = "01;37;41", /* !! */
+ [GST_CAT_ELEMENTFACTORY] = "01;37;41", /* !! */
+ [GST_CAT_PADS] = "01;37;41", /* !! */
+ [GST_CAT_PIPELINE] = "01;37;41", /* !! */
[GST_CAT_PLUGIN_LOADING] = "00;36",
[GST_CAT_PLUGIN_ERRORS] = "05;31",
[GST_CAT_PLUGIN_INFO] = "00;36",
- [GST_CAT_PROPERTIES] = "00;37;44", // !!
+ [GST_CAT_PROPERTIES] = "00;37;44", /* !! */
[GST_CAT_THREAD] = "00;31",
- [GST_CAT_TYPES] = "01;37;41", // !!
- [GST_CAT_XML] = "01;37;41", // !!
+ [GST_CAT_TYPES] = "01;37;41", /* !! */
+ [GST_CAT_XML] = "01;37;41", /* !! */
[GST_CAT_NEGOTIATION] = "07;34",
[GST_CAT_REFCOUNTING] = "00;34:42",
- [GST_CAT_EVENT] = "01;37;41", // !!
- [GST_CAT_PARAMS] = "00;30;43", // !!
+ [GST_CAT_EVENT] = "01;37;41", /* !! */
+ [GST_CAT_PARAMS] = "00;30;43", /* !! */
[GST_CAT_CALL_TRACE] = "",
[31] = "05;31",
gchar *empty = "";
gchar *elementname = empty,*location = empty;
int pthread_id = getpid();
- int cothread_id = cothread_getcurrent();
+ int cothread_id = 0; /*FIXME*/
#ifdef GST_DEBUG_COLOR
int pthread_color = pthread_id%6 + 31;
int cothread_color = (cothread_id < 0) ? 37 : (cothread_id%6 + 31);
#endif
if (debug_string == NULL) debug_string = "";
-// if (category != GST_CAT_GST_INIT)
+/* if (category != GST_CAT_GST_INIT) */
location = g_strdup_printf("%s:%d%s:",function,line,debug_string);
if (element && GST_IS_ELEMENT (element))
#ifdef GST_DEBUG_COLOR
#ifdef GST_DEBUG_COLOR
fprintf(stderr,"DEBUG(\033[00;%dm%5d\033[00m:\033[00;%dm%2d\033[00m)\033["
- "%s;%sm%s%s\033[00m %s",
+ "%s;%sm%s%s\033[00m %s\n",
pthread_color,pthread_id,cothread_color,cothread_id,incore?"00":"01",
_gst_category_colors[category],location,elementname,string);
#else
- fprintf(stderr,"DEBUG(%5d:%2d)%s%s %s",
+ fprintf(stderr,"DEBUG(%5d:%2d)%s%s %s\n",
pthread_id,cothread_id,location,elementname,string);
#endif /* GST_DEBUG_COLOR */
void
gst_debug_set_categories (guint32 categories) {
_gst_debug_categories = categories;
- if (categories)
- GST_INFO (0, "setting DEBUG categories to 0x%08X",categories);
}
/**
void
gst_debug_enable_category (gint category) {
_gst_debug_categories |= (1 << category);
- if (_gst_debug_categories)
- GST_INFO (0, "setting DEBUG categories to 0x%08X",_gst_debug_categories);
}
/**
void
gst_debug_disable_category (gint category) {
_gst_debug_categories &= ~ (1 << category);
- if (_gst_debug_categories)
- GST_INFO (0, "setting DEBUG categories to 0x%08X",_gst_debug_categories);
}
gchar *empty = "";
gchar *elementname = empty,*location = empty;
int pthread_id = getpid();
- int cothread_id = cothread_getcurrent();
+ int cothread_id = 0; /*FIXME*/
#ifdef GST_DEBUG_COLOR
int pthread_color = pthread_id%6 + 31;
int cothread_color = (cothread_id < 0) ? 37 : (cothread_id%6 + 31);
#else
fprintf(stderr,"INFO (%5d:%2d)%s%s %s\n",
pthread_id,cothread_id,location,elementname,string);
- #endif // GST_DEBUG_COLOR
+#endif /* GST_DEBUG_COLOR */
/*
#else
#ifdef GST_DEBUG_COLOR
#else
fprintf(stderr,"INFO:%s%s %s\n",
location,elementname,string);
- #endif // GST_DEBUG_COLOR
+ #endif * GST_DEBUG_COLOR *
+
#endif
*/
void
gst_info_set_categories (guint32 categories) {
_gst_info_categories = categories;
- if (categories)
- GST_INFO (0, "setting INFO categories to 0x%08X",categories);
}
/**
void
gst_info_enable_category (gint category) {
_gst_info_categories |= (1 << category);
- if (_gst_info_categories)
- GST_INFO (0, "setting INFO categories to 0x%08X",_gst_info_categories);
}
/**
void
gst_info_disable_category (gint category) {
_gst_info_categories &= ~ (1 << category);
- if (_gst_info_categories)
- GST_INFO (0, "setting INFO categories to 0x%08X",_gst_info_categories);
}
gchar *path;
int i;
- // if there are NULL pointers, point them to null strings to clean up output
+ /* if there are NULL pointers, point them to null strings to clean up output */
if (!debug_string) debug_string = "";
if (!string) string = "";
- // print out a preamble
+ /* print out a preamble */
fprintf(stderr,"***** GStreamer ERROR ***** in file %s at %s:%d%s\n",
file,function,line,debug_string);
- // if there's an element, print out the pertinent information
+ /* if there's an element, print out the pertinent information */
if (element) {
if (GST_IS_OBJECT(element)) {
path = gst_object_get_path_string(element);
}
}
- // if there's an object, print it out as well
+ /* if there's an object, print it out as well */
if (object) {
- // attempt to pad the line, or create a new one
+ /* attempt to pad the line, or create a new one */
if (chars < 40)
for (i=0;i<(40-chars)/8+1;i++) fprintf(stderr,"\t");
else
/***** DEBUG system *****/
GHashTable *__gst_function_pointers = NULL;
-// FIXME make this thread specific
-static GSList *stack_trace = NULL;
+/* FIXME make this thread specific */
+/* static GSList *stack_trace = NULL; */
gchar *_gst_debug_nameof_funcptr (void *ptr) __attribute__ ((no_instrument_function));
void
gst_debug_print_stack_trace (void)
{
- //nothing because it's compiled out
+ /* nothing because it's compiled out */
}
#endif /* GST_ENABLE_FUNC_INTSTRUMENTATION */