g_free (extra_info);
}
+
+static void
+print_issue (gpointer key, GstValidateIssue * issue, gpointer user_data)
+{
+ gst_validate_printf (NULL, "\n# `%s` (%" G_GUINTPTR_FORMAT ")\n\n",
+ g_quark_to_string (issue->issue_id), issue->issue_id);
+ gst_validate_printf (NULL, "%c%s\n\n", g_ascii_toupper (issue->summary[0]),
+ &issue->summary[1]);
+ if (issue->description)
+ gst_validate_printf (NULL, "%c%s\n\n",
+ g_ascii_toupper (issue->description[0]), &issue->description[1]);
+ gst_validate_printf (NULL, "Area: %s\n", issue->area);
+ gst_validate_printf (NULL, "Name: %s\n", issue->name);
+ gst_validate_printf (NULL, "Default severity: %s\n\n",
+ gst_validate_report_level_get_name (issue->default_level));
+}
+
+void
+gst_validate_print_issues (void)
+{
+ g_return_if_fail (_gst_validate_issues);
+
+ g_hash_table_foreach (_gst_validate_issues, (GHFunc) print_issue, NULL);
+}
gchar *scenario = NULL, *configs = NULL, *media_info = NULL,
*verbosity = NULL, *testfile = NULL;
gboolean list_scenarios = FALSE, monitor_handles_state,
- inspect_action_type = FALSE;
+ inspect_action_type = FALSE, print_issue_types = FALSE;
GstStateChangeReturn sret;
gchar *output_file = NULL;
BusCallbackData bus_callback_data = { 0, };
"Note that passing \"all\" as action type name, makes it output the"
" full documentation for all types.",
NULL},
+ {"print-issue-types", '\0', 0, G_OPTION_ARG_NONE, &print_issue_types,
+ "List all known issue types and their descriptions.",
+ NULL},
{"set-media-info", '\0', 0, G_OPTION_ARG_FILENAME, &media_info,
"Set a media_info XML file descriptor to share information about the"
" media file that will be reproduced.",
return 0;
}
+ if (print_issue_types) {
+ gst_validate_print_issues ();
+ return 0;
+ }
+
if (argc == 1) {
g_print ("%s", g_option_context_get_help (ctx, FALSE, NULL));
g_option_context_free (ctx);