gstinfo: Parse "NONE" as a valid level name
authorJan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
Fri, 8 Jul 2022 14:37:51 +0000 (16:37 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 8 Jul 2022 17:07:36 +0000 (17:07 +0000)
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>

subprojects/gstreamer/gst/gstinfo.c

index 248d49d..0ed428d 100644 (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) {