mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-07 23:12:42 +00:00
validate: Print the report when aborting because of an issue
Letting a chance to the user to know what bug he faced!
This commit is contained in:
parent
5c50219fae
commit
d682bd29a9
3 changed files with 14 additions and 6 deletions
|
@ -341,7 +341,7 @@ gst_validate_report_area_get_name (GstValidateReportArea area)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
gboolean
|
||||||
gst_validate_report_check_abort (GstValidateReport * report)
|
gst_validate_report_check_abort (GstValidateReport * report)
|
||||||
{
|
{
|
||||||
if ((report->level <= GST_VALIDATE_REPORT_LEVEL_ISSUE &&
|
if ((report->level <= GST_VALIDATE_REPORT_LEVEL_ISSUE &&
|
||||||
|
@ -350,9 +350,11 @@ gst_validate_report_check_abort (GstValidateReport * report)
|
||||||
_gst_validate_flags & GST_VALIDATE_FATAL_WARNINGS) ||
|
_gst_validate_flags & GST_VALIDATE_FATAL_WARNINGS) ||
|
||||||
(report->level <= GST_VALIDATE_REPORT_LEVEL_CRITICAL &&
|
(report->level <= GST_VALIDATE_REPORT_LEVEL_CRITICAL &&
|
||||||
_gst_validate_flags & GST_VALIDATE_FATAL_CRITICALS)) {
|
_gst_validate_flags & GST_VALIDATE_FATAL_CRITICALS)) {
|
||||||
g_error ("Fatal report received: %" GST_VALIDATE_ERROR_REPORT_PRINT_FORMAT,
|
|
||||||
GST_VALIDATE_REPORT_PRINT_ARGS (report));
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
GstValidateIssueId
|
GstValidateIssueId
|
||||||
|
|
|
@ -195,7 +195,7 @@ GstValidateReport *gst_validate_report_ref (GstValidateReport * report);
|
||||||
|
|
||||||
GstValidateIssueId gst_validate_report_get_issue_id (GstValidateReport * report);
|
GstValidateIssueId gst_validate_report_get_issue_id (GstValidateReport * report);
|
||||||
|
|
||||||
void gst_validate_report_check_abort (GstValidateReport * report);
|
gboolean gst_validate_report_check_abort (GstValidateReport * report);
|
||||||
void gst_validate_report_printf (GstValidateReport * report);
|
void gst_validate_report_printf (GstValidateReport * report);
|
||||||
|
|
||||||
const gchar * gst_validate_report_level_get_name (GstValidateReportLevel level);
|
const gchar * gst_validate_report_level_get_name (GstValidateReportLevel level);
|
||||||
|
|
|
@ -150,14 +150,20 @@ gst_validate_report_valist (GstValidateReporter * reporter,
|
||||||
g_free (combo);
|
g_free (combo);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
gst_validate_report_check_abort (report);
|
|
||||||
|
|
||||||
if (priv->runner) {
|
if (priv->runner) {
|
||||||
gst_validate_runner_add_report (priv->runner, report);
|
gst_validate_runner_add_report (priv->runner, report);
|
||||||
} else {
|
} else {
|
||||||
gst_validate_report_unref (report);
|
gst_validate_report_unref (report);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (gst_validate_report_check_abort (report)) {
|
||||||
|
if (priv->runner)
|
||||||
|
gst_validate_runner_printf (priv->runner);
|
||||||
|
|
||||||
|
g_error ("Fatal report received: %" GST_VALIDATE_ERROR_REPORT_PRINT_FORMAT,
|
||||||
|
GST_VALIDATE_REPORT_PRINT_ARGS (report));
|
||||||
|
}
|
||||||
|
|
||||||
g_free (message);
|
g_free (message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue