mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-19 22:05:58 +00:00
validate: Add a 'smart' reporting details mode
Making sure to show all informations for critical issues, but be synthetic for others
This commit is contained in:
parent
01f010b15d
commit
87fbaf966c
2 changed files with 11 additions and 1 deletions
|
@ -26,6 +26,8 @@
|
|||
* GstValidateReportingDetails:
|
||||
* @GST_VALIDATE_SHOW_NONE: No debugging level specified or desired. Used to deactivate
|
||||
* debugging output.
|
||||
* @GST_VALIDATE_SHOW_SMART: Sythetic for not fatal issues and detailed for
|
||||
* others
|
||||
* @GST_VALIDATE_SHOW_SYNTHETIC: Summary of the issues found, with no
|
||||
* details.
|
||||
* @GST_VALIDATE_SHOW_SUBCHAIN: If set as the default level, similar
|
||||
|
@ -62,6 +64,7 @@ typedef enum {
|
|||
GST_VALIDATE_SHOW_SUBCHAIN = 3,
|
||||
GST_VALIDATE_SHOW_MONITOR = 4,
|
||||
GST_VALIDATE_SHOW_ALL = 5,
|
||||
GST_VALIDATE_SHOW_SMART = 6,
|
||||
GST_VALIDATE_SHOW_COUNT
|
||||
} GstValidateReportingDetails;
|
||||
|
||||
|
@ -75,7 +78,7 @@ typedef enum {
|
|||
* override that though.
|
||||
*/
|
||||
#ifndef GST_VALIDATE_SHOW_DEFAULT
|
||||
#define GST_VALIDATE_SHOW_DEFAULT GST_VALIDATE_SHOW_SYNTHETIC
|
||||
#define GST_VALIDATE_SHOW_DEFAULT GST_VALIDATE_SHOW_SMART
|
||||
#endif
|
||||
|
||||
#endif /* __GST_VALIDATE_RUNNER_H__ */
|
||||
|
|
|
@ -123,6 +123,8 @@ _parse_reporting_level (gchar * str, GstValidateReportingDetails * level)
|
|||
} else {
|
||||
return FALSE;
|
||||
}
|
||||
} else if (g_ascii_strcasecmp (str, "smart") == 0) {
|
||||
*level = GST_VALIDATE_SHOW_SMART;
|
||||
} else if (g_ascii_strcasecmp (str, "none") == 0) {
|
||||
*level = GST_VALIDATE_SHOW_NONE;
|
||||
} else if (g_ascii_strcasecmp (str, "synthetic") == 0) {
|
||||
|
@ -362,6 +364,11 @@ gst_validate_runner_add_report (GstValidateRunner * runner,
|
|||
switch (runner->priv->default_level) {
|
||||
case GST_VALIDATE_SHOW_NONE:
|
||||
return;
|
||||
case GST_VALIDATE_SHOW_SMART:
|
||||
if (!gst_validate_report_check_abort (report) &&
|
||||
report->level != GST_VALIDATE_REPORT_LEVEL_CRITICAL)
|
||||
synthesize_reports (runner, report);
|
||||
return;
|
||||
case GST_VALIDATE_SHOW_SYNTHETIC:
|
||||
synthesize_reports (runner, report);
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue