Commit 803ce6bf authored by Benjamin Otte's avatar Benjamin Otte

GST_DEBUG reorganization containing loads of stuff:

Original commit message from CVS:
GST_DEBUG reorganization
This is a big diff (ca 450k), containing loads of stuff:
- gstinfo.[ch] complete rewrite
- changing of all GST_DEBUG messages to reflect that change
- reorganization of subsystem disabling
- addition of gstconfig.h.in so we can track the disablings
- <gst/gst.h> does not include <unistd.h> and <config.h> anymore
- documentation updated for gstinfo stuff (build the docs yourself to know what changed)
- bugfixes for making of the docs (files from CVS are not deleted anymore
- testsuite for debugging changes in testsuite/debug

expect breakage
parent 30438fd4
common @ 2a3efdc2
Subproject commit 4e379694ae9ff9843d65cf08928642eea44abdf8
Subproject commit 2a3efdc282fb1ecfd2720dea40523b3441f10fed
......@@ -255,8 +255,6 @@ AC_HELP_STRING([--enable-plugin-builddir],[allow tests/demos to use non-installe
esac],
[PLUGINS_USE_BUILDDIR=no]) dnl Default value
GST_DEBUGINFO
AC_ARG_ENABLE(profiling,
AC_HELP_STRING([--enable-profiling],[adds -pg to compiler commandline, for profiling]),
[case "${enableval}" in
......@@ -327,6 +325,18 @@ AM_CONDITIONAL(BUILD_EXAMPLES, test "x$BUILD_EXAMPLES" = "xyes")
dnl Next, check for the optional components:
dnl ========================================
dnl debugging stuff
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--disable-debug],[disable addition of -g debugging info]),
[case "${enableval}" in
yes) USE_DEBUG=yes ;;
no) USE_DEBUG=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
esac],
[USE_DEBUG=yes]) dnl Default value
translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_GST_DEBUG, true)
GST_SUBSYSTEM_DISABLE(GST_DEBUG,[debugging subsystem])
translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_LOADSAVE, true)
GST_SUBSYSTEM_DISABLE(LOADSAVE,[pipeline XML load/save])
translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_TYPEFIND, true)
......@@ -351,8 +361,6 @@ GST_SUBSYSTEM_DISABLE(PLUGIN,[plugin])
translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_URI, true)
GST_SUBSYSTEM_DISABLE(URI,[uri handlers])
GST_EXT_CFLAGS="$GST_EXT_CFLAGS $GST_SUBSYSTEM_DISABLE_DEFINES"
dnl ################################################
dnl # Set defines according to variables set above #
dnl ################################################
......@@ -514,6 +522,7 @@ AC_OUTPUT(
Makefile
include/Makefile
gst/Makefile
gst/gstconfig.h
gst/gstversion.h
gst/autoplug/Makefile
gst/indexers/Makefile
......@@ -541,6 +550,7 @@ testsuite/bytestream/Makefile
testsuite/caps/Makefile
testsuite/cleanup/Makefile
testsuite/clock/Makefile
testsuite/debug/Makefile
testsuite/dynparams/Makefile
testsuite/elements/Makefile
testsuite/indexers/Makefile
......@@ -569,7 +579,6 @@ tools/Makefile
docs/Makefile
docs/faq/Makefile
docs/gst/Makefile
docs/gst/gstreamer.types
docs/libs/Makefile
docs/manual/Makefile
docs/pwg/Makefile
......
......@@ -113,6 +113,7 @@ DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
SCANOBJ_FILES = \
$(DOC_MODULE).args \
$(DOC_MODULE).hierarchy \
$(DOC_MODULE)-scan.o \
$(DOC_MODULE).signals
if HAVE_GTK_DOC
......@@ -182,12 +183,15 @@ clean-local:
maintainer-clean-local: clean
cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
# company: don't delete .sgml and -sections.txt as they're in CVS
# FIXME : thomas added all sgml files and some other things to make
# make distcheck work
distclean-local: clean
rm -rf $(DOC_MODULE)-decl-list.txt
rm -rf $(DOC_MODULE)-*.txt
rm -rf tmpl/*.sgml
rm -rf $(DOC_MODULE)-decl.txt
rm -rf $(DOC_MODULE)-undocumented.txt
rm -rf $(DOC_MODULE)-unused.txt
rm -rf tmpl/*.sgml.bak
rm -f $(DOC_MODULE).hierarchy
rm -f *.stamp || true
......
......@@ -3,23 +3,21 @@
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY Gst SYSTEM "xml/gst.xml">
<!ENTITY GstAutoplug SYSTEM "xml/gstautoplug.xml">
<!ENTITY GstAutoplugFactory SYSTEM "xml/gstautoplugfactory.xml">
<!ENTITY GstAtomic SYSTEM "xml/gstatomic.xml">
<!ENTITY GstBin SYSTEM "xml/gstbin.xml">
<!ENTITY GstConfig SYSTEM "xml/gstconfig.xml">
<!ENTITY GstData SYSTEM "xml/gstdata.xml">
<!ENTITY GstBuffer SYSTEM "xml/gstbuffer.xml">
<!ENTITY GstEvent SYSTEM "xml/gstevent.xml">
<!ENTITY GstBufferPool SYSTEM "xml/gstbufferpool.xml">
<!ENTITY GstBufferPool SYSTEM "xml/gstbuffer.xml">
<!ENTITY GstCpu SYSTEM "xml/gstcpu.xml">
<!ENTITY GstElement SYSTEM "xml/gstelement.xml">
<!ENTITY GstElementFactory SYSTEM "xml/gstelementfactory.xml">
<!ENTITY GstFormat SYSTEM "xml/gstformat.xml">
<!ENTITY GstInfo SYSTEM "xml/gstinfo.xml">
<!ENTITY GstLog SYSTEM "xml/gstlog.xml">
<!ENTITY GstMemChunk SYSTEM "xml/gstmemchunk.xml">
<!ENTITY GstObject SYSTEM "xml/gstobject.xml">
<!ENTITY GstPad SYSTEM "xml/gstpad.xml">
<!ENTITY GstPadTemplate SYSTEM "xml/gstpadtemplate.xml">
<!ENTITY GstParse SYSTEM "xml/gstparse.xml">
<!ENTITY GstProbe SYSTEM "xml/gstprobe.xml">
<!ENTITY GstPipeline SYSTEM "xml/gstpipeline.xml">
......@@ -30,10 +28,9 @@
<!ENTITY GstRegistry SYSTEM "xml/gstregistry.xml">
<!ENTITY GstRegistryPool SYSTEM "xml/gstregistrypool.xml">
<!ENTITY GstScheduler SYSTEM "xml/gstscheduler.xml">
<!ENTITY GstSchedulerFactory SYSTEM "xml/gstschedulerfactory.xml">
<!ENTITY GstTrace SYSTEM "xml/gsttrace.xml">
<!ENTITY GstType SYSTEM "xml/gsttype.xml">
<!ENTITY GstTypeFactory SYSTEM "xml/gsttypefactory.xml">
<!ENTITY GstTypeFactory SYSTEM "xml/gsttype.xml">
<!ENTITY GstCaps SYSTEM "xml/gstcaps.xml">
<!ENTITY GstProps SYSTEM "xml/gstprops.xml">
<!ENTITY GstClock SYSTEM "xml/gstclock.xml">
......@@ -46,7 +43,6 @@
<!ENTITY GstTypeFind SYSTEM "xml/gsttypefind.xml">
-->
<!ENTITY GstIndex SYSTEM "xml/gstindex.xml">
<!ENTITY GstIndexFactory SYSTEM "xml/gstindexfactory.xml">
<!ENTITY cothreads SYSTEM "xml/cothreads.xml">
<!-- if none of the API is documented, these shouldn't go in
......@@ -67,6 +63,8 @@
<!ENTITY GstTee SYSTEM "xml/gsttee.xml">
<!ENTITY gstreamer-tree-index SYSTEM "xml/tree_index.xml">
<!ENTITY hash "#">
]>
<book>
<bookinfo>
......@@ -92,24 +90,20 @@ with some more specialized elements.</para>
&Gst;
&GstAutoplug;
&GstAutoplugFactory;
&GstBin;
&GstBuffer;
&GstBufferPool;
&GstConfig;
&GstCaps;
&GstClock;
&GstCpu;
&GstData;
&GstElement;
&GstElementFactory;
&GstEvent;
&GstFormat;
&GstIndex;
&GstIndexFactory;
&GstInfo;
&GstObject;
&GstPad;
&GstPadTemplate;
&GstParse;
&GstPipeline;
&GstPlugin;
......@@ -122,11 +116,9 @@ with some more specialized elements.</para>
&GstRegistry;
&GstRegistryPool;
&GstScheduler;
&GstSchedulerFactory;
&GstSystemClock;
&GstThread;
&GstType;
&GstTypeFactory;
<!-- no API docs
&GstTypeFind; -->
&GstUri;
......
......@@ -82,41 +82,72 @@ gst_marshal_VOID__VOID
<SECTION>
<FILE>gstinfo</FILE>
<TITLE>GstInfo</TITLE>
gst_get_category_name
gst_info_get_categories
gst_info_set_categories
gst_info_enable_category
gst_info_disable_category
gst_default_info_handler
GST_INFO_ENABLED
GST_STR_NULL
GST_DEBUG_PAD_NAME
GST_FUNCTION
<SUBSECTION>
GstDebugLevel
GST_LEVEL_DEFAULT
gst_debug_level_get_name
GstDebugColorFlags
gst_debug_construct_term_color
GstDebugCategory
GST_CAT_DEFAULT
<SUBSECTION>
GstLogFunction
gst_debug_log
gst_debug_logv
gst_debug_log_default
gst_debug_add_log_function
gst_debug_remove_log_function
gst_debug_remove_log_function_by_data
<SUBSECTION>
gst_debug_set_active
gst_debug_is_active
gst_debug_set_colored
gst_debug_is_colored
gst_debug_set_default_threshold
gst_debug_get_default_threshold
gst_debug_set_threshold_for_name
gst_debug_unset_threshold_for_name
<SUBSECTION>
GST_DEBUG_CATEGORY
GST_DEBUG_CATEGORY_EXTERN
GST_DEBUG_CATEGORY_STATIC
GST_DEBUG_CATEGORY_INIT
gst_debug_category_free
gst_debug_category_set_threshold
gst_debug_category_reset_threshold
gst_debug_category_get_threshold
gst_debug_category_get_name
gst_debug_category_get_color
gst_debug_category_get_description
gst_debug_get_all_categories
<SUBSECTION>
GST_CAT_LEVEL_LOG
GST_INFO
GST_INFO_ELEMENT
gst_debug_get_categories
gst_debug_set_categories
gst_debug_enable_category
gst_debug_disable_category
GST_DEBUG_ENTER
GST_DEBUG_LEAVE
GST_DEBUG
GST_CAT_ERROR_OBJECT
GST_CAT_WARNING_OBJECT
GST_CAT_INFO_OBJECT
GST_CAT_DEBUG_OBJECT
GST_CAT_LOG_OBJECT
GST_CAT_ERROR
GST_CAT_WARNING
GST_CAT_LOG
GST_ERROR_OBJECT
GST_WARNING_OBJECT
GST_INFO_OBJECT
GST_DEBUG_OBJECT
GST_LOG_OBJECT
GST_ERROR
GST_WARNING
GST_CAT_INFO
GST_CAT_DEBUG
GST_LOG
<SUBSECTION>
GST_DEBUG_FUNCPTR
GST_DEBUG_FUNCPTR_NAME
GST_DEBUG_PAD_NAME
GST_DEBUG_THREAD_ARGS
GST_DEBUG_THREAD_FORMAT
GST_DEBUG_ELEMENT
GST_ERROR
GST_ERROR_OBJECT
GstDebugHandler
gst_default_debug_handler
gst_default_error_handler
GstInfoHandler
GstErrorHandler
<SUBSECTION Standard>
gst_debug_print_stack_trace
GST_DEBUG_CHAR_MODE
GST_DEBUG_ENABLED
GST_DEBUG_ENABLE_CATEGORIES
</SECTION>
<SECTION>
......@@ -166,6 +197,23 @@ GST_SCHEDULER_FACTORY_GET_CLASS
GST_SCHEDULER_GET_CLASS
</SECTION>
<SECTION>
<FILE>gstconfig</FILE>
GST_DISABLE_ALLOC_TRACE
GST_DISABLE_AUTOPLUG
GST_DISABLE_ENUMTYPES
GST_DISABLE_GST_DEBUG
GST_DISABLE_INDEX
GST_DISABLE_LOADSAVE
GST_DISABLE_LOADSAVE_REGISTRY
GST_DISABLE_PARSE
GST_DISABLE_PLUGIN
GST_DISABLE_TRACE
GST_DISABLE_TYPEFIND
GST_DISABLE_URI
GST_DISABLE_REGISTRY
</SECTION>
<SECTION>
<FILE>gstschedulerfactory</FILE>
<TITLE>GstSchedulerFactory</TITLE>
......
<!-- ##### SECTION Title ##### -->
GstConfig
<!-- ##### SECTION Short_Description ##### -->
configuration options
<!-- ##### SECTION Long_Description ##### -->
<para>
This describes the configureation options for GStreamer. When building
GStreamer there are a lot of parts (known internally as "subsystems" ) that can
be disabled for various reasons. The most common reasons are speed and size,
which is important because GStreamer is designed to run on embedded systems.
</para>
<para>
If a subsystem is disabled, most of this changes are done in an API compatible
way, so you don't need to adapt your code in most cases. It is never done in an
ABI compatible way though. So if you want to disable a suybsystem, you have to
rebuild all programs depending on GStreamer, too.
</para>
<para>
If a subsystem is disabled in GStreamer, a value is defined in
&lt;gst/gst.h&gt;. You can check this if you do subsystem-specific stuff.
<example>
<title>Doing subsystem specific things</title>
<programlisting>
&hash;ifndef GST_DISABLE_GST_DEBUG
/* do stuff specific to the debugging subsystem */
&hash;endif /* GST_DISABLE_GST_DEBUG */
</programlisting>
</example>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### MACRO GST_DISABLE_LOADSAVE_REGISTRY ##### -->
<para>
</para>
<!-- ##### MACRO GST_DISABLE_GST_DEBUG ##### -->
<para>
If this is defined, the <link linkend="gstreamer-gstinfo">debugging subsystem
</link> is disabled and debugging messages are not output.
</para>
<!-- ##### MACRO GST_DISABLE_LOADSAVE ##### -->
<para>
</para>
<!-- ##### MACRO GST_DISABLE_TYPEFIND ##### -->
<para>
</para>
<!-- ##### MACRO GST_DISABLE_AUTOPLUG ##### -->
<para>
</para>
<!-- ##### MACRO GST_DISABLE_PARSE ##### -->
<para>
</para>
<!-- ##### MACRO GST_DISABLE_TRACE ##### -->
<para>
</para>
<!-- ##### MACRO GST_DISABLE_ALLOC_TRACE ##### -->
<para>
</para>
<!-- ##### MACRO GST_DISABLE_REGISTRY ##### -->
<para>
</para>
<!-- ##### MACRO GST_DISABLE_ENUMTYPES ##### -->
<para>
</para>
<!-- ##### MACRO GST_DISABLE_INDEX ##### -->
<para>
</para>
<!-- ##### MACRO GST_DISABLE_PLUGIN ##### -->
<para>
</para>
<!-- ##### MACRO GST_DISABLE_URI ##### -->
<para>
</para>
This diff is collapsed.
......@@ -185,8 +185,10 @@ maintainer-clean-local: clean
# make distcheck work
distclean-local: clean
rm -rf $(DOC_MODULE)-decl-list.txt
rm -rf $(DOC_MODULE)-*.txt
rm -rf tmpl/*.sgml
rm -rf $(DOC_MODULE)-decl.txt
rm -rf $(DOC_MODULE)-undocumented.txt
rm -rf $(DOC_MODULE)-unused.txt
rm -rf tmpl/*.sgml.bak
rm -f $(DOC_MODULE).hierarchy
rm -f *.stamp || true
......
<?xml version="1.0"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY GstGetbits SYSTEM "xml/gstgetbits.xml">
<!ENTITY GstIDCT SYSTEM "xml/gstidct.xml">
<!ENTITY GstPutbits SYSTEM "xml/gstputbits.xml">
<!ENTITY GstControl SYSTEM "xml/gstcontrol.xml">
<!ENTITY GstGetbits SYSTEM "xml/getbits.xml">
<!ENTITY GstPutbits SYSTEM "xml/putbits.xml">
<!ENTITY GstControl SYSTEM "xml/control.xml">
]>
......@@ -24,7 +23,6 @@
GStreamer provides some standard libraries you can use to create plugins.
</para>
&GstGetbits;
&GstIDCT;
&GstPutbits;
&GstControl;
......
......@@ -10,6 +10,7 @@
<!ENTITY INTRO_BASICS SYSTEM "intro_basics.xml">
<!ENTITY BUILDING_BOILER SYSTEM "building_boiler.xml">
<!ENTITY BUILDING_DEBUG SYSTEM "building_debug.xml">
<!ENTITY BUILDING_PADS SYSTEM "building_pads.xml">
<!ENTITY BUILDING_CHAINFN SYSTEM "building_chainfn.xml">
<!ENTITY BUILDING_STATE SYSTEM "building_state.xml">
......
......@@ -10,7 +10,7 @@ gst_play_have_type (GstElement *typefind, GstCaps *caps, GstElement *pipeline)
GstElement *filesrc;
GstElement *cache;
GST_DEBUG (0,"GstPipeline: play have type");
GST_DEBUG ("GstPipeline: play have type");
gst_element_set_state (pipeline, GST_STATE_PAUSED);
......
......@@ -10,7 +10,7 @@ gst_play_have_type (GstElement *typefind, GstCaps *caps, GstElement *pipeline)
GstElement *filesrc;
GstElement *cache;
GST_DEBUG (0,"GstPipeline: play have type");
GST_DEBUG ("GstPipeline: play have type");
gst_element_set_state (pipeline, GST_STATE_PAUSED);
......
......@@ -47,7 +47,7 @@ gst_play_type_find (GstBin *bin, GstElement *element)
GstElement *pipeline;
GstCaps *caps = NULL;
GST_DEBUG (0,"GstPipeline: typefind for element \"%s\"",
GST_DEBUG ("GstPipeline: typefind for element \"%s\"",
GST_ELEMENT_NAME(element));
pipeline = gst_pipeline_new ("autoplug_pipeline");
......@@ -116,9 +116,9 @@ int main(int argc,char *argv[])
main_bin = gst_pipeline_new("bin");
/* link adder and output to bin */
GST_INFO (0, "main: adding adder to bin");
GST_INFO ( "main: adding adder to bin");
gst_bin_add (GST_BIN(main_bin), adder);
GST_INFO (0, "main: adding audiosink to bin");
GST_INFO ( "main: adding audiosink to bin");
gst_bin_add (GST_BIN(main_bin), audiosink);
/* link adder and audiosink */
......@@ -139,7 +139,7 @@ int main(int argc,char *argv[])
gst_bin_add (GST_BIN(main_bin), channel_in->pipe);
/* request pads and link to adder */
GST_INFO (0, "requesting pad\n");
GST_INFO ( "requesting pad\n");
pad = gst_element_get_request_pad (adder, "sink%d");
printf ("\tGot new adder sink pad %s\n", gst_pad_get_name (pad));
sprintf (buffer, "channel%d", i);
......@@ -242,7 +242,7 @@ create_input_channel (int id, char* location)
GstElement *new_element;
GstElement *decoder;
GST_DEBUG (0, "c_i_p : creating channel with id %d for file %s",
GST_DEBUG ( "c_i_p : creating channel with id %d for file %s",
id, location);
/* allocate channel */
......@@ -256,7 +256,7 @@ create_input_channel (int id, char* location)
/* create channel */
GST_DEBUG (0, "c_i_p : creating pipeline");
GST_DEBUG ( "c_i_p : creating pipeline");
sprintf (buffer, "pipeline%d", id);
channel->pipe = gst_bin_new (buffer);
......@@ -264,13 +264,13 @@ create_input_channel (int id, char* location)
/* create elements */
GST_DEBUG(0, "c_i_p : creating filesrc");
GST_DEBUG ( "c_i_p : creating filesrc");
sprintf (buffer, "filesrc%d", id);
channel->filesrc = gst_element_factory_make ("filesrc", buffer);
g_assert(channel->filesrc != NULL);
GST_DEBUG(0, "c_i_p : setting location");
GST_DEBUG ( "c_i_p : setting location");
g_object_set(G_OBJECT(channel->filesrc),"location", location, NULL);
/* add filesrc to the bin before autoplug */
......
......@@ -30,7 +30,7 @@ static GstElementDetails example_details = {
"An example plugin",
"Example/FirstExample",
"Shows the basic structure of a plugin",
VERSION,
"0.1",
"your name <your.name@your.isp>",
"(C) 2001",
};
......
......@@ -134,7 +134,7 @@ libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
$(GST_LOADSAVE_SRC)
BUILT_SOURCES = gstmarshal.h gstmarshal.c gstenumtypes.h $(GST_ENUMTYPES_SRC)
BUILT_SOURCES = gstversion.h gstconfig.h gstmarshal.h gstmarshal.c gstenumtypes.h $(GST_ENUMTYPES_SRC)
libgstreamer_@GST_MAJORMINOR@_la_CFLAGS = -D_GNU_SOURCE \
$(GST_CFLAGS) \
......@@ -150,7 +150,6 @@ libgstreamer_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINO
gst_headers = \
gst.h \
gstatomic.h \
gstconfig.h \
gstobject.h \
gsttypes.h \
gstautoplug.h \
......@@ -195,6 +194,7 @@ gst_headers = \
gstxml.h
built_headers = \
gstconfig.h \
gstversion.h \
gstmarshal.h \