gstinfo: Parse "NONE" as a valid level name

This allows using `NONE` in `GST_DEBUG`,
`gst_debug_set_threshold_from_string`, etc. It was accessible before,
but only via the integer `0`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2734>
This commit is contained in:
Jan Alexander Steffens (heftig) 2022-07-08 16:37:51 +02:00 committed by GStreamer Marge Bot
parent 7aeb2f6711
commit dfea5070df

View file

@ -2126,6 +2126,8 @@ parse_debug_level (gchar * str, GstDebugLevel * level)
} else {
return FALSE;
}
} else if (strcmp (str, "NONE") == 0) {
*level = GST_LEVEL_NONE;
} else if (strcmp (str, "ERROR") == 0) {
*level = GST_LEVEL_ERROR;
} else if (strncmp (str, "WARN", 4) == 0) {