Added API to control DEBUG level, updated cmdline code

Original commit message from CVS:
Added API to control DEBUG level, updated cmdline code
This commit is contained in:
Erik Walthinsen 2001-01-01 04:53:26 +00:00
parent 1bf936db6d
commit db7243a77b
3 changed files with 36 additions and 19 deletions

View file

@ -120,8 +120,7 @@ gst_init_check (int *argc,
sscanf ((*argv)[i]+16, "%d", &val);
}
//FIXME
//gst_info_set_categories (val);
gst_debug_set_categories (val);
(*argv)[i] = NULL;
}

View file

@ -97,14 +97,6 @@ gst_info_get_categories () {
return _gst_info_categories;
}
const gchar *
gst_get_category_name (gint category) {
if ((category >= 0) && (category < GST_CAT_MAX_CATEGORY))
return _gst_info_category_strings[category];
else
return NULL;
}
void
gst_info_enable_category (gint category) {
_gst_info_categories |= (1 << category);
@ -115,6 +107,34 @@ gst_info_disable_category (gint category) {
_gst_info_categories &= ~ (1 << category);
}
void
gst_debug_set_categories (guint32 categories) {
_gst_debug_categories = categories;
}
guint32
gst_debug_get_categories () {
return _gst_debug_categories;
}
void
gst_debug_enable_category (gint category) {
_gst_debug_categories |= (1 << category);
}
void
gst_debug_disable_category (gint category) {
_gst_debug_categories &= ~ (1 << category);
}
const gchar *
gst_get_category_name (gint category) {
if ((category >= 0) && (category < GST_CAT_MAX_CATEGORY))
return _gst_info_category_strings[category];
else
return NULL;
}
/***** ERROR system *****/
@ -178,12 +198,3 @@ gst_default_error_handler (gchar *file, gchar *function,
exit(1);
}
gst_info_init (int *argc,
char ***argv)
{
if (argc && argv) {
}
}

View file

@ -237,8 +237,15 @@ void gst_info_set_categories (guint32 categories);
guint32 gst_info_get_categories (void);
void gst_info_enable_category (gint category);
void gst_info_disable_category (gint category);
void gst_debug_set_categories (guint32 categories);
guint32 gst_debug_get_categories (void);
void gst_debug_enable_category (gint category);
void gst_debug_disable_category (gint category);
const gchar * gst_get_category_name (gint category);
enum {
GST_CAT_GST_INIT = 0, // Library initialization
GST_CAT_COTHREADS, // Cothread creation, etc.