[vlc-devel] [PATCH] core: Move quiet variable to core

Marvin Scholz epirat07 at gmail.com
Sat Dec 21 04:36:32 CET 2019


This option is set or loaded in other places like the cachegen,
avcommon and the input test.

And it makes a lot more sense to have a core option for the quiet
mode instead of a module-specific one.
---
 modules/logger/console.c | 7 -------
 src/libvlc-module.c      | 7 +++++++
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/modules/logger/console.c b/modules/logger/console.c
index 8266906a4d..a27f036c16 100644
--- a/modules/logger/console.c
+++ b/modules/logger/console.c
@@ -161,9 +161,6 @@ static const struct vlc_logger_operations *Open(vlc_object_t *obj,
     return &gray_ops;
 }
 
-#define QUIET_TEXT N_("Be quiet")
-#define QUIET_LONGTEXT N_("Turn off all messages on the console.")
-
 vlc_module_begin()
     set_shortname(N_("Console log"))
     set_description(N_("Console logger"))
@@ -171,8 +168,4 @@ vlc_module_begin()
     set_subcategory(SUBCAT_ADVANCED_MISC)
     set_capability("logger", 10)
     set_callback(Open)
-
-    add_bool("quiet", false, QUIET_TEXT, QUIET_LONGTEXT, false)
-        change_short('q')
-        change_volatile()
 vlc_module_end ()
diff --git a/src/libvlc-module.c b/src/libvlc-module.c
index 1b85e8702b..0e51d3dd84 100644
--- a/src/libvlc-module.c
+++ b/src/libvlc-module.c
@@ -88,6 +88,10 @@ static const char *const ppsz_snap_formats[] =
     "This is the verbosity level (0=only errors and " \
     "standard messages, 1=warnings, 2=debug).")
 
+#define QUIET_TEXT N_("Be quiet")
+#define QUIET_LONGTEXT N_( \
+    "Turn off all messages on the console.")
+
 #define OPEN_TEXT N_("Default stream")
 #define OPEN_LONGTEXT N_( \
     "This stream will always be opened at VLC startup." )
@@ -2254,6 +2258,9 @@ vlc_module_begin ()
         change_short('v')
         change_volatile ()
     add_obsolete_string( "verbose-objects" ) /* since 2.1.0 */
+    add_bool("quiet", false, QUIET_TEXT, QUIET_LONGTEXT, false)
+        change_short('q')
+        change_volatile()
 #if !defined(_WIN32) && !defined(__OS2__)
     add_bool( "daemon", 0, DAEMON_TEXT, DAEMON_LONGTEXT, true )
         change_short('d')
-- 
2.20.1 (Apple Git-117)



More information about the vlc-devel mailing list