Commit graph

179 commits

Author SHA1 Message Date
Sebastian Dröge fd68dbc08f gst: Use GSlice instead of normal g_malloc in more places 2010-03-28 19:48:45 +02:00
Stefan Kost 0765d4b812 debug: add pretty printer for events
Adder is using GST_PTR_FORMAT for events already, so we might actualy
implement this and print out some useful info.
2010-03-15 09:10:05 +02:00
Leo Singer 3f86f8cee1 gstinfo: fix compilation error if HAVE_REGISTER_PRINTF_SPECIFIER is undefined
Use #if HAVE_FOO instead of #ifdef HAVE_FOO.

Fixes #612733.
2010-03-12 19:05:16 +00:00
Benjamin Otte a9d1a493a7 Fixes for -Wwrite-strings
This changes some APIs in compatible ways:
- Some functions now take "const char *" arguments, not "char *"
- Some structs now have "conts char *" members, not "char *"
The changes may cause warnings when compiling with the right warning
flags. You've been warned.

Also adds -Wwrite-strings as a warning flag in configure.ac.

https://bugzilla.gnome.org/show_bug.cgi?id=611692
2010-03-10 20:50:10 +01:00
Benjamin Otte e8f65e8bff Make code safe for -Wredundant-decls
Adds that warning to configure.ac

Includes a tiny change of the GST_BOILERPLATE_FULL() macro:
The get_type() function is no longer declared before being defined.

https://bugzilla.gnome.org/show_bug.cgi?id=611692
2010-03-10 20:45:33 +01:00
Stefan Kost 23da3639f0 docs: fix xrefs in docs
Fix typos in xrefs, links to non existing functions and rework plural forms.
2009-11-25 16:59:50 +02:00
Jan Schmidt 2ddf028503 gstpoll: Make the new GST_POLL debug completely private
Make the GST_POLL debug category symbol private to libgstreamer, as
there should be no external users of it.
2009-10-12 14:24:53 +01:00
Edward Hervey 0fc16a8e74 gst: Add debugging category GST_POLL for gstpoll 2009-10-12 09:50:00 +02:00
Tim-Philipp Müller 8b8d8bb112 gstinfo: add back fix that shouldn't have been reverted 2009-10-08 09:36:38 +01:00
Stefan Kost cb7a8e8b61 info: revert two of the changes
It only needed for the non constant string.
2009-10-08 00:08:47 +03:00
Stefan Kost 084bbe3921 info: use a "%s" format string when printing the memory dump line
We know that the content is save, but the compiler does not.
2009-10-07 23:36:45 +03:00
Tim-Philipp Müller 6049559201 gstinfo: maintain ABI compatibility even if debugging is disabled 2009-07-14 00:04:22 +01:00
Stefan Kost 2cb16ad7aa info: allow getting other log categories. Fixes #587417
Add a new macro GST_DEBUG_CATEGORY_GET to get a log category by name. This
allows plugins to use e.g. core categories like PERFORMANCE or CLOCK.
API: GST_DEBUG_CATEGORY_GET
2009-07-06 19:54:30 +01:00
Stefan Kost 3e21ddf81f logging: add a performace log category
This category can be used to log slow code path and help auditing the
performance. Add FIXME-0.11 to some questionable categories.
2009-06-29 11:28:01 +03:00
Tim-Philipp Müller 4fdf54f1c5 gstinfo: fix export of GST_CAT_BUFFER_LIST when --gst-disable-debug is used
Move all the categories to export to one single place, so we don't
accidentally update or add vars in one place but not the other.
2009-06-19 13:40:13 +01:00
René Stadler c403e4b7f0 Fix remaining --disable-gst-debug ABI breakage.
Fixes #579177.
2009-06-12 18:19:23 +03:00
Tim-Philipp Müller a33de081b2 logging: when logging taglists, shorten long buffer dumps
Don't dump hundreds of kB of hexdata into debug logs when converting
taglists containing huge images into a string. Instead, shorten the
buffer data so that the string is still readable and debug logs
stay managable. Can be turned off with GST_DEBUG_OPTIONS=full-tags.
See #584988.
2009-06-10 09:39:11 +01:00
Tim-Philipp Müller 51f50a5c67 info: widen log level strings to take into account the new MEMDUMP 2009-06-01 20:28:30 +01:00
Jonas Holmberg d99cf4db1b bufferlist: add docs/build/debug/unittest
See #572285
2009-05-12 15:18:52 +02:00
Jan Schmidt bd07633cc2 info: Support new printf extensions in glibc 2.10
The printf extension mechanism changed in glibc 2.10, and the older
register_printf_function is deprecated. Detect and use the new
mechanism where available.
2009-05-11 21:30:14 +01:00
Stefan Kost 581ccbb581 gstdebug: compete stubs. Fixes #579177.
Avoid defines when including gstinfo.h ourself and complete stubs. Sync stub
returns with the defines.
2009-04-17 15:01:46 +03:00
Stefan Kost 659102e04a gstdebug: show enabled/disabled in configure and fix build for disabled
When its disabled, we poison some symbols to force a build error if they are
used. Dunno how useful this acually is, but we need to disable the poisoning
when we include this ourself. Also don't define some of the dummies, as they
are getting replaced with defines and that creates code that does not compile.
2009-04-15 23:35:35 +03:00
LRN 7e0bdbf208 info: use mutex to do console colors on windows
Use a static mutex to keep the console colors and context together when
debugging with colors on Windows.
Fixes #517231.
2009-04-14 10:32:07 +02:00
Wim Taymans b4e9c87fcc info: fix compilation, %08x needs an unsigned int
%08x needs an unsigned int, so give it that.
2009-04-09 11:42:48 +02:00
Tim-Philipp Müller 116c8be6bf API: add FIXME and DUMPMEM log levels and convenience macros
Two new log levels to dump FIXMEs into the log and to log data
in form of a hex dump (#578114).

API: GST_CAT_FIXME_OBJECT
API: GST_CAT_MEMDUMP_OBJECT
API: GST_CAT_FIXME
API: GST_CAT_MEMDUMP
API: GST_FIXME_OBJECT
API: GST_MEMDUMP_OBJECT
API: GST_FIXME
API: GST_MEMDUMP
2009-04-08 21:32:05 +01:00
Stefan Kost c04e3f9a03 build: define stubs when disabling gst-debug subsystem. Fixes #575922
Running configure with e.g. --disable-dst-debug was compiling out the debug
system (ABI break). Now stubs are added and only if one does e.g.
make CFLAGS="-DGST_REMOVE_DISABLED" the symbols are ommitted.
2009-03-23 16:21:58 +02:00
Tim-Philipp Müller b62bfc573a debugging: make GST_PTR_FORMAT work for queries as well 2009-03-20 00:42:51 +00:00
Wim Taymans 3857d902c3 info: simply some more 2009-03-18 18:57:16 +01:00
Wim Taymans ca33a78881 info: refactor debug colors for win32 and other
Refactor the debug line code to use as much code as possible for the win32 and
other color codings.
Update docs with new symbol.
2009-03-18 18:45:41 +01:00
Wim Taymans 0c059ad2de windows: initial commit for terminal colors 2009-03-18 17:30:12 +01:00
Thomas Vander Stichele def24f00ef Don't assume that <valgrind/valgrind.h> exists just because the binary is there.
Original commit message from CVS:
* configure.ac:
* gst/gstinfo.c:
Don't assume that <valgrind/valgrind.h> exists just because
the binary is there.
2008-06-20 15:54:43 +00:00
Stefan Kost f6b8cf77d9 gst/gstinfo.c: Explain why we copy the list.
Original commit message from CVS:
* gst/gstinfo.c:
Explain why we copy the list.
* gst/gstpipeline.c:
Improve docs.
* gst/gstutils.c:
Add one debug-log statement to help tracing probelms with linking pads.
2008-05-14 18:17:34 +00:00
Ole André Vadla Ravnås f1bcc9c8a7 gst/gstinfo.c (gst_debug_log_valist): Improved the __FILE__ part of debug output for MSVC.
Original commit message from CVS:
* gst/gstinfo.c (gst_debug_log_valist):
Improved the __FILE__ part of debug output for MSVC.
2008-05-07 19:24:44 +00:00
Tim-Philipp Müller 31c5f8a6ce gst/gstinfo.c: Fix alignment of debug log columns on 64-bit.
Original commit message from CVS:
* gst/gstinfo.c: (gst_debug_log_default):
Fix alignment of debug log columns on 64-bit.
2008-05-03 19:08:50 +00:00
Sebastian Dröge 3e914a83b3 gst/gstutils.*: API: Deprecate gst_atomic_int_set(), g_atomic_int_set() should be used now that we depend on new enou...
Original commit message from CVS:
* gst/gstutils.c:
* gst/gstutils.h:
API: Deprecate gst_atomic_int_set(), g_atomic_int_set() should be used
now that we depend on new enough GLib.
* gst/gstcaps.c: (gst_static_caps_get):
* gst/gstclock.c: (gst_clock_entry_new):
* gst/gstinfo.c: (_gst_debug_init), (gst_debug_set_colored),
(gst_debug_set_default_threshold), (_gst_debug_category_new),
(gst_debug_category_set_threshold):
* libs/gst/base/gstbasesink.c: (gst_base_sink_init),
(gst_base_sink_set_qos_enabled):
* libs/gst/net/gstnettimeprovider.c:
(gst_net_time_provider_set_property):
Use g_atomic_int_set() instead of gst_atomic_int_set().
2008-04-17 07:14:46 +00:00
Tim-Philipp Müller 5cb869bfdf gst/: Bunch of gratuitous nano-optimisations.
Original commit message from CVS:
* gst/gstcaps.c: (gst_caps_to_string):
* gst/gstinfo.c: (gst_debug_construct_term_color):
* gst/gstparse.c: (gst_parse_launchv):
* gst/gstutils.c: (gst_util_dump_mem):
* gst/gstvalue.c: (gst_value_serialize_any_list),
(gst_value_transform_any_list_string):
Bunch of gratuitous nano-optimisations.
2007-12-28 14:15:53 +00:00
Tim-Philipp Müller 0ef9a5f5b1 Makefile.am: Add check-exports target and run it as part of 'make check' (see #499140 and #493983).
Original commit message from CVS:
* Makefile.am:
Add check-exports target and run it as part of 'make check'
(see #499140 and #493983).
* gst/gst_private.h:
* gst/gstelementfactory.h:
* gst/gstghostpad.c: (gst_proxy_pad_class_init):
* gst/gstinfo.c: (_priv_gst_in_valgrind), (_gst_debug_init),
(_priv_gst_in_valgrind):
* gst/gstinfo.h: (GstLogFunction):
* gst/gsttypefind.c: (type_find_debug), (GST_CAT_DEFAULT),
(gst_type_find_register):
* gst/gsttypefindfactory.c: (type_find_debug), (GST_CAT_DEFAULT),
(gst_type_find_factory_get_type):
* libs/gst/controller/gstcontroller.c: (GST_CAT_DEFAULT),
(GST_CAT_DEFAULT), (parent_class), (priv_gst_controller_key),
(gst_controller_new_valist), (gst_controller_new_list),
(_gst_controller_dispose), (_gst_controller_class_init):
* libs/gst/controller/gstcontrolsource.c: (GST_CAT_DEFAULT):
* libs/gst/controller/gsthelper.c: (GST_CAT_DEFAULT),
(GST_CAT_DEFAULT), (gst_object_uncontrol_properties),
(gst_object_get_controller), (gst_object_set_controller),
(gst_object_suggest_next_sync), (gst_object_sync_values),
(gst_object_set_control_source), (gst_object_get_control_source),
(gst_object_get_value_arrays), (gst_object_get_value_array),
(gst_object_get_control_rate), (gst_object_set_control_rate):
* libs/gst/controller/gstinterpolation.c: (GST_CAT_DEFAULT):
* libs/gst/controller/lib.c: (GST_CAT_DEFAULT):
Make some functions that should be static static; rename some
private symbols so that they don't get exported; add some FIXME
comments so we can move accidentally exported functions into
our private section in 0.11.
* win32/common/libgstreamer.def:
Add gst_utils_get_timestamp().
2007-12-12 23:20:00 +00:00
Stefan Kost 428a4e9669 Change GST_GET_TIMESTAMP into gst_util_get_timestamp and replace all uses as we don't have HAVE_POSIX_TIMERS in publi...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstclock.h:
* gst/gstdebugutils.c:
* gst/gstinfo.c:
* gst/gstutils.c:
* gst/gstutils.h:
* libs/gst/base/gstbasesink.c:
* tools/gst-launch.c:
Change GST_GET_TIMESTAMP into gst_util_get_timestamp and replace all
uses as we don't have HAVE_POSIX_TIMERS in public headers.
Thanks Tim for spotting.
2007-12-11 20:23:58 +00:00
Stefan Kost c437e3b4e2 gst/: Fix wrong order of args in GST_CLOCK_DIFF() usage.
Original commit message from CVS:
* gst/gstdebugutils.c:
* gst/gstinfo.c:
Fix wrong order of args in GST_CLOCK_DIFF() usage.
* tools/gst-launch.c:
Use new API to get elapsed time.
2007-11-28 12:52:42 +00:00
Stefan Kost ddb7cc2763 Rename new API + ChangeLog surgery to remove old name from last entry..
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstclock.h:
* gst/gstdebugutils.c:
* gst/gstinfo.c:
Rename new API + ChangeLog surgery to remove old name from last entry..
API: GST_GET_TIMESTAMP
2007-11-28 12:35:14 +00:00
Stefan Kost fbf7086287 Now hide the different clock stuff behind a macro.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstclock.h:
* gst/gstdebugutils.c:
* gst/gstinfo.c:
Now hide the different clock stuff behind a macro.
API: GST_GET_CURRENT_TIME
2007-11-28 12:11:59 +00:00
Stefan Kost ec080cd61b Apply the posix-timer check from #361155. Conditionally use the posix timer for logging. This gives better timestamp ...
Original commit message from CVS:
* configure.ac:
* gst/gstdebugutils.c:
* gst/gstinfo.c:
Apply the posix-timer check from #361155. Conditionally use the posix
timer for logging. This gives better timestamp precission, less
overhead and no ntp jitter.
2007-11-28 11:39:35 +00:00
Tim-Philipp Müller efaea50c48 gst/gst.c: Make _gst_disable_segtrap static, it's only used in gstplugin.c and we can use gst_segtrap_is_enabled() t...
Original commit message from CVS:
* gst/gst.c: (_gst_disable_segtrap):
Make  _gst_disable_segtrap static, it's only used in gstplugin.c and
we can use gst_segtrap_is_enabled() there now that we have that API.
Move _gst_debug_dump_dot_dir into gstdebugutils.c, there's no reason
to do the getenv here (and export the variable).
* gst/gstdebugutils.c: (debug_dump_element),
(_gst_debug_bin_to_dot_file), (_gst_debug_bin_to_dot_file_with_ts):
Don't use VLAs which is a C99ism and throws off MSVC (#493983).
* gst/gstinfo.c: (_priv_gst_info_start_time), (_gst_debug_init),
(gst_debug_log_default):
Rename _gst_info_start_time to priv_gst_info_start_time so it
doesn't get exported (was never in any header).
* gst/gstplugin.c: (_gst_plugin_fault_handler_setup),
(gst_plugin_loading_mutex):
Make static mutex gst_plugin_loading_mutex really static (was never
in any header), and use gst_segtrap_is_enabled() instead of
_gst_disable_segtrap.
* gst/gsttrace.c: (_gst_trace_default):
Make local _gst_trace_default static (was never in any header).
2007-11-06 15:10:36 +00:00
Stefan Kost 58a155347b Allow dumping pipelines as dot graphs. Fixes #456573.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/Makefile.am:
* gst/gst.c:
* gst/gst.h:
* gst/gstdebugutils.c:
* gst/gstdebugutils.h:
* gst/gstinfo.c:
* gst/gstinfo.h:
* tools/gst-launch.c:
Allow dumping pipelines as dot graphs. Fixes #456573.
2007-10-17 12:58:23 +00:00
Stefan Kost ca048215eb gst/gstinfo.c: Fix some spelling errors.
Original commit message from CVS:
* gst/gstinfo.c:
Fix some spelling errors.
2007-10-15 06:52:01 +00:00
Tim-Philipp Müller 65637313b0 gst/gstbin.c: Don't shadow local variable.
Original commit message from CVS:
* gst/gstbin.c:
Don't shadow local variable.
* gst/gstinfo.c:
Don't shadow global function name.
2007-10-13 17:43:27 +00:00
Tim-Philipp Müller 134da6c28e gst/gstinfo.*: Make some internal API take const gchar * instead of just gchar * to avoid compiler warnings with g++-...
Original commit message from CVS:
* gst/gstinfo.c:
* gst/gstinfo.h:
Make some internal API take const gchar * instead of just
gchar * to avoid compiler warnings with g++-4.2.2 when
passing string constants (partially fixes #478092).
2007-09-18 22:13:57 +00:00
David Schleef bc18910072 gst/gstinfo.c: g_hash_table_insert() needs a cast to a non-const pointer duh.
Original commit message from CVS:
* gst/gstinfo.c:
g_hash_table_insert() needs a cast to a non-const pointer duh.
2006-10-26 00:00:34 +00:00
David Schleef 504274019d gst/gstinfo.*: Change name parameter of _gst_debug_register_funcptr to const to reflect the constness of its use in t...
Original commit message from CVS:
* gst/gstinfo.c:
* gst/gstinfo.h:
Change name parameter of _gst_debug_register_funcptr to const
to reflect the constness of its use in the function as well
as to quiet a gcc warning.
2006-10-25 23:47:40 +00:00
Josep Torre Valles fcb5023fa4 gst/gst.c: Fix empty declaration and type mismatch.
Original commit message from CVS:
2006-10-06  Zaheer Abbas Merali  <zaheerabbas at merali dot org>

Patch by: Josep Torre Valles <josep@fluendo.com>

* gst/gst.c: (gst_init_get_option_group):
Fix empty declaration and type mismatch.
* gst/gstbin.c: (gst_bin_change_state_func):
Fix type mismatch.
* gst/gstelement.c: (gst_element_continue_state),
(gst_element_set_state_func), (gst_element_change_state),
(gst_element_change_state_func):
Fix type mismatches.
* gst/gstinfo.c: (gst_debug_compare_log_function_by_func),
(gst_debug_remove_log_function), (_gst_debug_nameof_funcptr):
Cast as appropriate.
* gst/gstobject.c: (gst_class_signal_connect):
Cast as appropriate.  The function pointer parameter really
has the wrong type but would break API if we change it.
* gst/gstquery.c:
Fix redefinition of _FILE_OFFSET_BITS caused on Solaris wrt
order of including string.h.
* gst/gstutils.c: (gst_element_state_get_name):
Remove unreachable line.
* gst/gstxml.c: (gst_xml_parse_doc):
Fix type mismatch.
All these caught by Forte.
2006-10-06 14:46:04 +00:00