diff --git a/validate/gst/validate/gst-validate-report.c b/validate/gst/validate/gst-validate-report.c index 1becf6b41f..5befb6d9c2 100644 --- a/validate/gst/validate/gst-validate-report.c +++ b/validate/gst/validate/gst-validate-report.c @@ -504,6 +504,19 @@ gst_validate_printf (gpointer source, const gchar * format, ...) va_end (var_args); } +/** + * gst_validate_print_action: + * @action: (allow-none): The source object to log + * @message: The message to print out in the GstValidate logging system + * + * Print @message to the GstValidate logging system + */ +void +gst_validate_print_action (GstValidateAction * action, const gchar * message) +{ + gst_validate_printf_valist (action, message, NULL); +} + static void print_action_parametter (GString * string, GstValidateActionType * type, GstValidateActionParameter * param) @@ -637,7 +650,10 @@ gst_validate_printf_valist (gpointer source, const gchar * format, va_list args) } } - g_string_append_vprintf (string, format, args); + if (args) + g_string_append_vprintf (string, format, args); + else + g_string_append (string, format); if (!newline_regex) newline_regex = diff --git a/validate/gst/validate/gst-validate-report.h b/validate/gst/validate/gst-validate-report.h index dc6d184b02..48a3607dee 100644 --- a/validate/gst/validate/gst-validate-report.h +++ b/validate/gst/validate/gst-validate-report.h @@ -32,6 +32,8 @@ typedef guintptr GstValidateIssueId; G_BEGIN_DECLS +typedef struct _GstValidateAction GstValidateAction; + GType gst_validate_report_get_type (void); #define GST_TYPE_VALIDATE_REPORT (gst_validate_report_get_type ()) @@ -213,6 +215,7 @@ const gchar * gst_validate_report_level_get_name (GstValidateReportLevel le void gst_validate_printf (gpointer source, const gchar * format, ...) G_GNUC_PRINTF (2, 3) G_GNUC_NO_INSTRUMENT; +void gst_validate_print_action (GstValidateAction *action, const gchar * message); void gst_validate_printf_valist (gpointer source, const gchar * format, va_list args) G_GNUC_NO_INSTRUMENT; diff --git a/validate/gst/validate/gst-validate-reporter.c b/validate/gst/validate/gst-validate-reporter.c index 912b1e8c29..c899420968 100644 --- a/validate/gst/validate/gst-validate-reporter.c +++ b/validate/gst/validate/gst-validate-reporter.c @@ -268,6 +268,13 @@ gst_validate_report (GstValidateReporter * reporter, va_end (var_args); } +void +gst_validate_reporter_report_simple (GstValidateReporter * reporter, + GstValidateIssueId issue_id, const gchar * message) +{ + gst_validate_report (reporter, issue_id, message); +} + void gst_validate_reporter_set_name (GstValidateReporter * reporter, gchar * name) { diff --git a/validate/gst/validate/gst-validate-reporter.h b/validate/gst/validate/gst-validate-reporter.h index 46fc608d56..79875706c8 100644 --- a/validate/gst/validate/gst-validate-reporter.h +++ b/validate/gst/validate/gst-validate-reporter.h @@ -103,6 +103,9 @@ void gst_validate_report (GstValidateReporter * reporter, const gchar * format, ...); void gst_validate_report_valist (GstValidateReporter * reporter, GstValidateIssueId issue_id, const gchar * format, va_list var_args); +void +gst_validate_reporter_report_simple (GstValidateReporter * reporter, GstValidateIssueId issue_id, + const gchar * message); void gst_validate_reporter_set_runner (GstValidateReporter * reporter, GstValidateRunner *runner); void gst_validate_reporter_set_handle_g_logs (GstValidateReporter * reporter); diff --git a/validate/gst/validate/gst-validate-runner.c b/validate/gst/validate/gst-validate-runner.c index 3229474988..023f971d35 100644 --- a/validate/gst/validate/gst-validate-runner.c +++ b/validate/gst/validate/gst-validate-runner.c @@ -166,7 +166,7 @@ _set_reporting_level_for_name (GstValidateRunner * runner, } static void -_replace_double_colons (gchar *word) +_replace_double_colons (gchar * word) { while (word) { word = strstr (word, "::"); @@ -461,7 +461,7 @@ _do_report_synthesis (GstValidateRunner * runner) * Returns: 0 if no critical error has been found and 18 if a critical * error has been detected. That return value is usually to be used as * exit code of the application. - * */ + */ int gst_validate_runner_printf (GstValidateRunner * runner) {