GStreamer Daemon - Enabling the Debug Subsystem

From RidgeRun Developer Connection
Revision as of 17:22, 21 July 2020 by Tfischer (talk | contribs) (Added description of GStreamer debug levels - taken from https://developer.ridgerun.com/wiki/index.php?title=GStreamer_Debugging#The_GStreamer_debugging_levels_include:)
Jump to: navigation, search


Previous: Receiving Signals Index Next: Low-level Implementation for Applications




This wiki shows how to enable the debug to a given pipeline. Sometimes the errors in a pipeline can be hard to debug, however that tool can enable and modify the level of the debug as your needed and debug a pipeline easier.

Enable Debug

Enable debug using the command shown below. The Debug takes the argument true or false.

debug_enable true/false 
       Enable debug of the pipeline.

Debug Level

Once the Enable debug is on true, the debug level can be set, that more level shows more debug. The Debug Level takes a keyword and the debug level in the argument.

debug_threshold threshold 
       Debug Level of the pipeline.

The GStreamer debugging levels include:

0 none No debug information is output.
1 ERROR Logs all fatal errors. These are errors that do not allow the core or elements to perform the requested action. The application can still recover if programmed to handle the conditions that triggered the error.
2 WARNING Logs all warnings. Typically these are non-fatal, but user-visible problems are expected to happen.
3 INFO Logs all informational messages. These are typically used for events in the system that only happen once, or are important and rare enough to be logged at this level.
4 DEBUG Logs all debug messages. These are general debug messages for events that happen only a limited number of times during an object's lifetime; these include setup, teardown, change of parameters, ...
5 LOG Logs all log messages. These are messages for events that happen repeatedly during an object's lifetime; these include streaming and steady-state conditions.
9 buffer
dump
Hex dump of buffer contents.

Enable Debug Colors

Sometimes analyze a log can be heavy or maybe bored, the debug color can be that task easier to search and found the error. Debug color takes true/false in the argument.

debug_color true/false 
       Debug Color of the pipeline.

For example:
Gstd Commands:

1 pipeline_create p1 videotestsrc ! autovideosink
2 pipeline_play p1
3 debug_enable true 
4 debug_threshold *sink*:6
5 debug_color true

will respectively

  1. Create a pipeline p1
  2. Put it to playing
  3. Enable debug
  4. Set the debug level on 6
  5. Enable the debug color

The debug command will typically fail for any of the following:

  • No pipeline was given
  • Wrong debug property

Alternatively, the debug can be enable using the low level CRUD syntax:
Gstd Commands:

1 update /debug/enable <true/false>
2 update /debug/threshold/ <value>
3 update /debug/color/ <true/false>

API Summary

High Level Command Low Level CRUD Description
debug_enable <true/false> update /debug/enable <true/false> Enable debug of the pipeline
debug_threshold <threshold> update /debug/threshold <threshold> Set the level of debug
debug_color <true/false> update /debug/color <true/false> Enable the color in debug


Previous: Receiving Signals Index Next: Low-level Implementation for Applications