gst/: widen the debug category in output to fit the biggest one we have add a bus category and use it play with the c...

Original commit message from CVS:

* gst/gst_private.h:
* gst/gstbus.c:
* gst/gstelement.c:
* gst/gstinfo.c:
* gst/gstpluginfeature.c:
widen the debug category in output to fit the biggest one we have
add a bus category and use it
play with the colors
fix up some categories
This commit is contained in:
Thomas Vander Stichele 2005-10-06 09:49:42 +00:00
parent d4421be810
commit 93c6b88036
6 changed files with 42 additions and 15 deletions

View file

@ -1,3 +1,15 @@
2005-10-06 Thomas Vander Stichele <thomas at apestaart dot org>
* gst/gst_private.h:
* gst/gstbus.c:
* gst/gstelement.c:
* gst/gstinfo.c:
* gst/gstpluginfeature.c:
widen the debug category in output to fit the biggest one we have
add a bus category and use it
play with the colors
fix up some categories
2005-10-06 Thomas Vander Stichele <thomas at apestaart dot org>
* gst/gstghostpad.c: (gst_ghost_pad_internal_do_activate_push):

View file

@ -52,6 +52,7 @@ extern GstDebugCategory *GST_CAT_PARENTAGE;
extern GstDebugCategory *GST_CAT_STATES;
extern GstDebugCategory *GST_CAT_SCHEDULING;
extern GstDebugCategory *GST_CAT_BUFFER;
extern GstDebugCategory *GST_CAT_BUS;
extern GstDebugCategory *GST_CAT_CAPS;
extern GstDebugCategory *GST_CAT_CLOCK;
extern GstDebugCategory *GST_CAT_ELEMENT_PADS;
@ -83,6 +84,7 @@ extern GstDebugCategory *GST_CAT_REGISTRY;
#define GST_CAT_SCHEDULING NULL
#define GST_CAT_DATAFLOW NULL
#define GST_CAT_BUFFER NULL
#define GST_CAT_BUS NULL
#define GST_CAT_CAPS NULL
#define GST_CAT_CLOCK NULL
#define GST_CAT_ELEMENT_PADS NULL

View file

@ -67,6 +67,7 @@
#include "gstbus.h"
#define GST_CAT_DEFAULT GST_CAT_BUS
/* bus signals */
enum
{

View file

@ -1837,7 +1837,7 @@ gst_element_set_state (GstElement * element, GstState state)
g_return_val_if_fail (GST_IS_ELEMENT (element), GST_STATE_CHANGE_FAILURE);
GST_DEBUG_OBJECT (element, "set_state to %s",
GST_CAT_DEBUG_OBJECT (GST_CAT_STATES, element, "set_state to %s",
gst_element_state_get_name (state));
/* get current element state, need to call the method so that
* we call the virtual method and subclasses can implement their

View file

@ -28,16 +28,17 @@
*
* GStreamer's debugging subsystem is an easy way to get information about what
* the application is doing.
* It is not meant for programming errors. Use GLibs methods (g_warning and so
* on for that.
* It is not meant for programming errors. Use GLib methods (g_warning and
* friends) for that.
*
* The debugging subsystem works only after GStreamer has been initilized
* The debugging subsystem works only after GStreamer has been initialized
* - for example by calling gst_init().
*
* The debugging subsystem is used to log informational messages while the
* application runs.
* Each messages has some properties attached to it. Among these properties
* are the debugging category, the severity (called "level" here) and an obtional
* are the debugging category, the severity (called "level" here) and an
* optional
* #GObject it belongs to. Each of these messages is sent to all registered
* debugging handlers, which then handle the messages. GStreamer attaches a
* default handler on startup, which outputs requested messages to stderr.
@ -46,7 +47,8 @@
* #GST_CAT_ERROR_OBJECT or similar. These all expand to calling gst_debug_log()
* with the right parameters.
* The only thing a developer will probably want to do is define his own
* categories. This is easily done with 3 lines. At the top of your code, declare
* categories. This is easily done with 3 lines. At the top of your code,
* declare
* the variables and set the default category.
* <informalexample>
* <programlisting>
@ -57,19 +59,25 @@
* After that you only need to initialize the category.
* <informalexample>
* <programlisting>
* GST_DEBUG_CATEGORY_INIT (my_category, "my category", 0, "This is my very own");
* GST_DEBUG_CATEGORY_INIT (my_category, "my category",
* 0, "This is my very own");
* </programlisting>
* </informalexample>
* Initialization must be done before the category is used first. Plugins do this
* Initialization must be done before the category is used first.
* Plugins do this
* in their plugin_init function, libraries and applications should do that
* during their initialization.
*
* The whole debugging subsystem can be disabled at build time with passing the
* --disable-gst-debug switch to configure. If this is done, every function, macro
* and even structs described in this file evaluate to default values or nothing
* --disable-gst-debug switch to configure. If this is done, every function,
* macro
* and even structs described in this file evaluate to default values or
* nothing
* at all. So don't take addresses of these functions or use other tricks.
* If you must do that for some reason, there is still an option. If the debugging
* subsystem was compiled out, #GST_DISABLE_GST_DEBUG is defined in &lt;gst/gst.h&gt;,
* If you must do that for some reason, there is still an option.
* If the debugging
* subsystem was compiled out, #GST_DISABLE_GST_DEBUG is defined in
* &lt;gst/gst.h&gt;,
* so you can check that before doing your trick.
* Disabling the debugging subsystem will give you a slight (read: unnoticable)
* speed increase and will reduce the size of your compiled code. The GStreamer
@ -192,6 +200,7 @@ GstDebugCategory *GST_CAT_STATES = NULL;
GstDebugCategory *GST_CAT_SCHEDULING = NULL;
GstDebugCategory *GST_CAT_BUFFER = NULL;
GstDebugCategory *GST_CAT_BUS = NULL;
GstDebugCategory *GST_CAT_CAPS = NULL;
GstDebugCategory *GST_CAT_CLOCK = NULL;
GstDebugCategory *GST_CAT_ELEMENT_PADS = NULL;
@ -294,7 +303,8 @@ _gst_debug_init (void)
GST_CAT_SCHEDULING = _gst_debug_category_new ("GST_SCHEDULING",
GST_DEBUG_BOLD | GST_DEBUG_FG_MAGENTA, NULL);
GST_CAT_BUFFER = _gst_debug_category_new ("GST_BUFFER",
GST_DEBUG_BOLD | GST_DEBUG_FG_GREEN, NULL);
GST_DEBUG_BOLD | GST_DEBUG_BG_GREEN, NULL);
GST_CAT_BUS = _gst_debug_category_new ("GST_BUS", GST_DEBUG_BG_YELLOW, NULL);
GST_CAT_CAPS = _gst_debug_category_new ("GST_CAPS",
GST_DEBUG_BOLD | GST_DEBUG_FG_BLUE, NULL);
GST_CAT_CLOCK = _gst_debug_category_new ("GST_CLOCK",
@ -578,7 +588,7 @@ gst_debug_log_default (GstDebugCategory * category, GstDebugLevel level,
g_get_current_time (&now);
elapsed = GST_TIMEVAL_TO_TIME (now) - start_time;
g_printerr ("%s (%p - %" GST_TIME_FORMAT
") %s%15s%s(%s%5d%s) %s%s(%d):%s:%s%s %s\n",
") %s%20s%s(%s%5d%s) %s%s(%d):%s:%s%s %s\n",
gst_debug_level_get_name (level), g_thread_self (),
GST_TIME_ARGS (elapsed), color,
gst_debug_category_get_name (category), clear, pidcolor, pid, clear,

View file

@ -36,6 +36,8 @@
#include <string.h>
#define GST_CAT_DEFAULT GST_CAT_PLUGIN_LOADING
static void gst_plugin_feature_class_init (GstPluginFeatureClass * klass);
static void gst_plugin_feature_init (GstPluginFeature * feature);
static void gst_plugin_feature_finalize (GObject * object);