Commit graph

301 commits

Author SHA1 Message Date
Stefan Sauer c068b225fe docs: convert the examples to use gtk-doc markup, instead of docbook
The gtk-doc markup is less intrusive and better handled when creating docs for
language bindings. The titles (where used) where not adding much.
2014-02-27 18:11:35 +01:00
Stefan Sauer 0264bbdb46 info: move some env-var checks from gst to gstinfo as well
We were doing some log related initialisation in gst.c after calling
_priv_gst_debug_init(). Just move it there for consistency.
2014-01-16 20:47:53 +01:00
Wim Taymans 42d36b9495 info: debug segment offset field as well 2014-01-08 15:04:00 +01:00
Víctor Manuel Jáquez Leal 24a766a13b info: return existing category if a debug category is registered twice
If a category with the same name is found when creating a new
one, the found category is returned instead of an invalid pointer.
Fixes issue with gst-vaapi (which uses an internal copy of the
codec parsers) caused by commit ccba9130.

https://bugzilla.gnome.org/show_bug.cgi?id=720036
2013-12-07 19:03:23 +00:00
Olivier Crête ccba91308d info: Make sure the same category is not added twice 2013-12-04 17:35:18 -05:00
Olivier Crête e0317288ba info: Protect __categories list in get_category with lock too 2013-12-04 17:35:02 -05:00
Tim-Philipp Müller 4afa63a8ba gst: g_memmove() is deprecated
Just use plain memmove(), g_memmove() is deprecated in
recent GLib versions.

https://bugzilla.gnome.org/show_bug.cgi?id=712811
2013-11-21 15:04:04 +00:00
Tim-Philipp Müller 9f669e5ea5 docs: cosmetic since marker fixes 2013-11-16 16:09:40 +00:00
Sebastian Dröge 4d367dc1b0 context: Change GstContext to contain only a single context
It was unintuitive that GstContext was actually a list of different
contexts. GstContext now is only a type string and a structure to
contain the actual context.
2013-09-17 13:28:42 +02:00
Edward Hervey 29353c1b59 gst: minor docstring fixups to make g-i happy
note: the #ifndef move is actually a move of the "SECTION" docstring
2013-08-14 07:05:04 +02:00
David Schleef f599019a99 info: parse debug levels > 9 2013-07-24 10:30:09 -07:00
Sebastian Dröge b9841335ed info: Add some Since: 1.2 2013-07-18 14:34:31 +02:00
Руслан Ижбулатов 797fcd1d49 info: Add debug color mode option
This allows to explicitely set the debug output color
mode to UNIX on every platform, enable it (use platform
default color mode) or enable it.

https://bugzilla.gnome.org/show_bug.cgi?id=674320
2013-07-18 14:30:44 +02:00
Руслан Ижбулатов 46106ebe8f info: Fix black and underline coloring on W32
Fixes #674320
2013-07-18 14:21:22 +02:00
Руслан Ижбулатов 143f30bfcb info: Cut down src file names for MinGW too
Fixes #674320
2013-07-18 14:21:06 +02:00
Tim-Philipp Müller 0e1dd050a5 printf: don't build if debugging subsystem was disabled 2013-04-13 01:19:41 +01:00
Tim-Philipp Müller fe7f7135e0 printf: add infrastructure for pointer extensions hook
Does not do anything yet. On a sidenote, we can't just use
%p\001 or so to signal the extension because g-i complains
about an invalid ascii character then, so have to resort to
something more elaborate, such as %p\aA etc.

https://bugzilla.gnome.org/show_bug.cgi?id=613081
2013-04-12 23:05:57 +01:00
Tim-Philipp Müller 7b19944280 info: use new internal printf for debug message printing
and remove all the printf extension/specifier stuff for
the system printf. Next we need to add back the custom
specifiers to our own printf implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=613081
2013-04-12 23:05:57 +01:00
Tim-Philipp Müller 0dd761101c info: minor cosmetic changes
Let's not use ugly leading underscores for
static functions.
2013-04-01 22:17:20 +01:00
Tim-Philipp Müller cef9018eaf info: fix object printing of caps features in debug log 2013-04-01 21:23:21 +01:00
Stefan Sauer 6465dbd647 info: refactor pretty printing objects
Extract formatters into local functions. Change the structure filtering so that
it works for taglists too.
2013-04-01 16:39:18 +02:00
Sebastian Dröge 7477b25df5 caps: Add new data type for handling caps features to the caps
These are meant to specify features in caps that are required
for a specific structure, for example a specific memory type
or meta.

Semantically they could be though of as an extension of the media
type name of the structures and are handled exactly like that.
2013-03-31 18:15:52 +02:00
Sebastian Dröge b909061031 gst: Add new GstContext miniobject for sharing contexts in a pipeline 2013-03-29 16:40:21 +01:00
Sebastian Rasmussen 7691a82f3a info: fix compiler warning when debugging disabled
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=688130
2012-11-12 09:29:58 +01:00
Tim-Philipp Müller 666c8c11c6 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 20:44:48 +00:00
Tim-Philipp Müller 3d5f6202af info: allow setting of GST_DEBUG levels by name
e.g. GST_DEBUG=*:INFO,*src:LOG
2012-10-27 14:40:14 +01:00
Thibault Saunier e513ed1810 info: add a function to set debug threshold from a GST_DEBUG-style string
Use the same format as with the GST_DEBUG environment variable.

API: gst_debug_set_threshold_from_string()

https://bugzilla.gnome.org/show_bug.cgi?id=679152
2012-10-27 13:42:51 +01:00
Sebastian Dröge 32d7d5923b info: Don't use GST_DEBUG() in gst_debug_add_log_function() and related functions unconditionally
If GStreamer was not initialized yet this will cause g_warnings().
2012-10-22 10:26:49 +02:00
Olivier Blin 4710b36bda info: do not register printf extension for %p
This happened when glib was not using system printf, and caused the
internal gstreamer printf extensions to be used for all %p printfs,
causing crashes.

https://bugzilla.gnome.org/show_bug.cgi?id=684970
2012-09-27 23:58:32 +01:00
Tim-Philipp Müller 379c3cd184 info: make taglists and datetime loggable via GST_PTR_FORMAT 2012-07-14 18:52:50 +01:00
Edward Hervey d3ffa82639 Remove 0.10-related documentation and "Since" markers 2012-07-10 12:03:27 +02:00
Sebastian Rasmussen 73ab9d17e3 gstinfo: Add destroy notify arguments to debug stubs
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=679535
2012-07-07 13:39:25 +01:00
Wim Taymans afd5db3c6b info: add new locking debug category 2012-07-05 11:19:16 +02:00
Wim Taymans 7da1d23a9b info: add destroy notify to gst_debug_add_log_function() 2012-06-20 13:28:08 +02:00
Wim Taymans 391b4309f9 meta: improve debugging
Add category for metadata debug
2012-03-01 17:41:57 +01:00
Wim Taymans 3eeb6e6c05 info: debug segment duration as well 2012-02-20 14:28:57 +01:00
Wim Taymans 7fc783f723 info: also debug position of segment 2012-02-18 00:03:13 +01:00
Wim Taymans e60b67f907 Update debug categories
Remove some categories marked for deletion.
Add a category for GstMemory.
2012-02-02 15:54:28 +01:00
Tim-Philipp Müller 2c8c44976f Replace deprecated GStaticMutex with GMutex
https://bugzilla.gnome.org/show_bug.cgi?id=662207
2012-01-22 22:44:59 +00:00
Wim Taymans 80fc568747 buffer: add pts/dts to buffers 2011-10-28 12:15:44 +02:00
Tim-Philipp Müller ac40ab45b3 info: make _gst_debug_init() private for now
This was a FIXME for 0.11. I guess a case could be made to keep it around
separately for apps or libraries that only want to use GStreamer's debugging
system, but it seems more likely they'd just copy the two source files into
their own tree if the case. Also, things like types wouldn't be initialised
without gst_init(). We can still make it public again if anyone needs it,
but then we should make it a proper function and not hide it behind
underscores.
2011-10-08 20:15:46 +01:00
Tim-Philipp Müller 5df82c88c9 info: rename __gst_debug_* to _gst_debug_* and fix symbol export regexp
Only export GStreamer symbols with one leading underscore, not two
or more leading underscores.

Requires a rebuild of the entire stack, sorry.
2011-10-08 14:27:12 +01:00
Wim Taymans c57c1e9b59 info: port to 0.11 2011-10-08 09:41:54 +02:00
Wim Taymans ee1f861ec1 Merge branch 'master' into 0.11
Conflicts:
	gst/gstpad.c
2011-10-08 09:28:02 +02:00
Robert Swain 138bb17bf9 GST_PTR_FORMAT: Add GstBuffer ptr format and use in GST_SCHEDULING
GstBuffer pointers can now be printed using GST_PTR_FORMAT. This is used
in the very useful GST_SCHEDULING debug logs in gstpad.c and allows for
easier and more information tracking of buffer progress through a
pipeline with just debug logging.
2011-10-07 16:38:52 +02:00
Wim Taymans 5cf8e68944 Merge branch 'master' into 0.11
Conflicts:
	gst/gstmessage.c
	gst/gstquery.c
	gst/gstregistrychunks.c
	gst/gstsegment.c
	libs/gst/base/gstbasetransform.c
	libs/gst/base/gstbasetransform.h
	libs/gst/base/gsttypefindhelper.c
	plugins/elements/gsttypefindelement.c
2011-08-26 14:37:54 +02:00
Josep Torra 2a6ba0b29d info: explicitly cast to the enum type
Fixes warning #188: enumerated type mixed with another type reported by ICC.
2011-08-26 14:11:13 +02:00
Wim Taymans 2d28891528 Merge branch 'master' into 0.11
Conflicts:
	gst/gstelementfactory.c
	gst/gstelementfactory.h
	gst/gstpad.h
	gst/gstpluginfeature.c
	gst/gstpluginfeature.h
2011-06-10 12:09:49 +02:00
Javier Jardón 5d25e4a204 Use "const" instead G_CONST_RETURN
G_CONST_RETURN will be deprecated soon.

https://bugzilla.gnome.org/show_bug.cgi?id=652211
2011-06-09 17:54:27 +01:00
Tim-Philipp Müller bc69efa7cc info: remove GST_XML debug category as well 2011-06-04 15:23:56 +01:00
Wim Taymans bdbc069348 Rework GstSegment handling
Improve GstSegment, rename some fields. The idea is to have the GstSegment
structure represent the timing structure of the buffers as they are generated by
the source or demuxer element.
gst_segment_set_seek() -> gst_segment_do_seek()
Rename the NEWSEGMENT event to SEGMENT.
Make parsing of the SEGMENT event into a GstSegment structure.
Pass a GstSegment structure when making a new SEGMENT event. This allows us to
pass the timing info directly to the next element. No accumulation is needed in
the receiving element, all the info is inside the element.
Remove gst_segment_set_newsegment(): This function as used to accumulate
segments received from upstream, which is now not needed anymore because the
segment event contains the complete timing information.
2011-05-16 11:37:52 +02:00
Wim Taymans 933446ec44 query: Hide GstStructure in queries
Hide the GstStructure from the query API.
Rename some methods to match the more common names in GObject libraries.
Add some more useful query API.
2011-05-10 15:33:53 +02:00
Wim Taymans 108dff2210 message: hide the message structure field
Make a private structure to hold the GstStructure bits of the message.
Add some more useful macros like we have for events.
2011-05-10 13:34:10 +02:00
Wim Taymans bd540bfb66 event: Hide the GstStructure
Hide the GstStructure of the event in the implementation specific part so that
we can change it.
Add methods to check and make the event writable.
Add a new method to get a writable GstStructure of the element.
Avoid directly accising the event structure.
2011-05-10 11:50:16 +02:00
Wim Taymans 2243adffa1 event: add sticky flags to events
Add the sticky flag to events and a sticky index.
Keep sticky events in an array on each pad.
Remove GST_EVENT_SRC(), it is causing refcycles with sticky events, was not used
and is not very interesting anyway.
2011-05-02 18:34:18 +02:00
Tim-Philipp Müller 609a75eae2 info: make adding/removing of gst_debug_log_default() work properly
Make adding/removing gst_debug_log_default() work reliably in all
circumstances. The problem was that depending on platform and linker
flags the function argument might resolve to different addresses,
which made it impossible to remove the default log function added
in gst_init() from application code (because the pointer values
didn't match). The new approach should keep things simple by passing
NULL for the default function, which the code in libgstreamer can
then handle.

https://bugzilla.gnome.org/show_bug.cgi?id=625396
https://bugzilla.gnome.org/show_bug.cgi?id=640771
2011-02-03 10:53:27 +00:00
Tim-Philipp Müller 74ff936752 Revert "info: use the publicly visible address to fix the tests"
This reverts commit eb56687a6d.

While this commit may have fixed a problem on one of the build bots,
it didn't actually fix the original bug reported for win32.

Also, it causes other problems, such as the lookup failing when
called from C++ code (gst-phonon, amarok).

This needs to be fixed differently.

https://bugzilla.gnome.org/show_bug.cgi?id=640771
https://bugzilla.gnome.org/show_bug.cgi?id=625396
2011-02-03 10:28:01 +00:00
Tim-Philipp Müller 8a9931f0a9 info: avoid unnecessary malloc/free for each log function call on MSVC
Avoid unnecessary malloc/free to get the file basename on MSVC to avoid
unnecessary overhead when doing GST_DEBUG=foo:5 or so (since it would be
done before the category log level filtering).
2011-01-06 17:35:13 +00:00
Stefan Kost eb56687a6d info: use the publicly visible address to fix the tests
The -Bsymbolic change causes us to get a different address when internaly
looking up the function than what application would get when the use the symbol
that they see. This made removing the default loghandler to fail, as it is set
internally and removed externaly.
2010-12-15 23:19:54 +02:00
Tim-Philipp Müller 3256c708be docs: gst: more gobject introspection annotations
Many of these are superfluous, added for clarity.
2010-12-07 18:37:04 +00:00
Edward Hervey 3a9396d259 gstinfo: remove useless ternary operator usage. 2010-12-03 11:33:37 +01:00
Edward Hervey b0b8fb9b31 info: Re-instate the default for color usage
This was accidently removed in 7a722091b6
2010-08-30 16:03:38 +02:00
David Schleef 3ef2688658 Valgrind define is HAVE_VALGRIND_VALGRIND_H 2010-08-23 18:21:25 -07:00
David Schleef 7a722091b6 Allow gst_debug_set_default_threshold() before gst_init()
Calling gst_debug_set_default_threshold() before initialization
seems like the "obvious" order.
2010-08-23 18:21:25 -07:00
Stefan Kost 72c0474936 info: xrefs glib symbol in docs 2010-08-12 23:25:03 +03:00
Stefan Kost f547482e7c info: take the timestamp a tick later
The logging is not an atomic operation and because of the multi-threading we end
up with out-of-order log lines. Tools that present the log-file should probably
resort the lines. This change just takes the timestamp a bit closer to the
actual logging.
2010-08-05 10:35:46 +03:00
Tim-Philipp Müller 6f0da67002 info: fix compilation on windows
Fix mismatched brackets (#625295).
2010-07-27 14:32:31 +02:00
Tim-Philipp Müller 4cecd73c93 info: flush again after every line of debug output
g_printerr() used to do this for us. Also use libc's fprintf() functions,
to make sure the stderr pointer we use is actually compatible with the
libc linked against by GStreamer (which apparently may not always be the
same as what GLib is linked against on windows), and we don't need the
functionality ensured by g_fprintf().

Fixes #625295.
2010-07-26 19:14:51 +02:00
Tim-Philipp Müller 9d4caf8d8c info: write debugging output to file if GST_DEBUG_FILE environment variable is set
This changes behaviour slightly in that we no longer output things
via g_printerr(), so any non-standard glib printerr handlers are no
longer called when GST_DEBUG is enabled. However, this seems not
really desirable in most cases anyway, and the GLib docs also say
that libraries should not use g_printerr() for logging.

Other stderr output (e.g. warnings, or application messages) will
of course not be captured in the log file this way.

GST_DEBUG_FILE=- will redirect debug output to stdout.
2010-07-21 15:54:07 +01:00
Tim-Philipp Müller 66fc4c8ba2 info: add new TRACE log level and move refcounting there from LOG level
This makes it possible to easily get a *:5 debug log without all
the refcounting noise, and drastically reduces the number of lines
output for a normal log (46m to 28m for a 20min video). The full log
including refcounting information can still be gotten using *:7.

Fixes #620460.
2010-06-05 12:53:15 +01:00
Stefan Kost 04bf54c58f info: readd the use of GstDebugFuncPtr typedef and tell why
This reverts the related changes from 3f4954e42d
and ffb0a4e190.
2010-03-29 16:36:15 +03:00
Sebastian Dröge ffb0a4e190 info: Fix build at least until the correct fix is found
See bug #614167.
2010-03-28 21:02:41 +02:00
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