]> git.sesse.net Git - vlc/blobdiff - src/libvlc-module.c
Use var_Inherit* instead of var_CreateGet*.
[vlc] / src / libvlc-module.c
index 97861eadcbca3dcfbd386d03c6af790a39fe0b61..bc34f8741e5641e43d7ec7a4a846cb343f765e59 100644 (file)
@@ -66,6 +66,7 @@ static const char *const ppsz_language[] =
     "he",
     "hr",
     "hu",
+    "hy",
     "id",
     "it",
     "ja",
@@ -73,6 +74,7 @@ static const char *const ppsz_language[] =
     "lt",
     "mn",
     "ms",
+    "nn",
     "kk",
     "km",
     "oc",
@@ -83,6 +85,7 @@ static const char *const ppsz_language[] =
     "ro",
     "ru",
     "zh_CN",
+    "si",
     "sr",
     "sk",
     "sl",
@@ -92,6 +95,7 @@ static const char *const ppsz_language[] =
     "tr",
     "uk",
     "vi",
+    "wa",
 };
 
 static const char *const ppsz_language_text[] =
@@ -116,6 +120,7 @@ static const char *const ppsz_language_text[] =
     "עברית",
     "hrvatski",
     "Magyar",
+    "հայերեն",
     "Bahasa Indonesia",
     "Italiano",
     "日本語",
@@ -123,6 +128,7 @@ static const char *const ppsz_language_text[] =
     "lietuvių",
     "Монгол хэл",
     "Melayu",
+    "Nynorsk",
     "Қазақ тілі",
     "ភាសាខ្មែរ",
     "Occitan",
@@ -133,6 +139,7 @@ static const char *const ppsz_language_text[] =
     "Română",
     "Русский",
     "简体中文",
+    "සිංහල",
     "српски",
     "Slovensky",
     "slovenščina",
@@ -142,6 +149,7 @@ static const char *const ppsz_language_text[] =
     "Türkçe",
     "украї́нська мо́ва",
     "tiếng Việt",
+    "Walon",
 };
 #endif
 
@@ -175,7 +183,7 @@ static const char *const ppsz_snap_formats[] =
 #define EXTRAINTF_LONGTEXT N_( \
     "You can select \"additional interfaces\" for VLC. " \
     "They will be launched in the background in addition to the default " \
-    "interface. Use a comma separated list of interface modules. (common " \
+    "interface. Use a colon separated list of interface modules. (common " \
     "values are \"rc\" (remote control), \"http\", \"gestures\" ...)")
 
 #define CONTROL_TEXT N_("Control interfaces")
@@ -193,7 +201,7 @@ static const char *const ppsz_snap_formats[] =
     "This is a ',' separated string, each objects should be prefixed by " \
     "a '+' or a '-' to respectively enable or disable it. The keyword " \
     "'all' refers to all objects. Objects can be refered to by their " \
-    "type or module name. Rules applying to named objects take precendence " \
+    "type or module name. Rules applying to named objects take precedence " \
     "over rules applying to object types. Note that you still need to " \
     "use -vvv to actually display debug message.")
 
@@ -278,14 +286,14 @@ static const char *const ppsz_snap_formats[] =
 #if !defined( __APPLE__ )
 #define AOUT_RESAMP_TEXT N_("High quality audio resampling")
 #define AOUT_RESAMP_LONGTEXT N_( \
-    "This uses a high quality audio resampling algorithm. High quality "\
+    "This uses a high quality audio resampling algorithm. High quality " \
     "audio resampling can be processor intensive so you can " \
     "disable it and a cheaper resampling algorithm will be used instead.")
 #endif
 
 #define DESYNC_TEXT N_("Audio desynchronization compensation")
 #define DESYNC_LONGTEXT N_( \
-    "This delays the audio output. The delay must be given in milliseconds." \
+    "This delays the audio output. The delay must be given in milliseconds. " \
     "This can be handy if you notice a lag between the video and the audio.")
 
 #define MULTICHA_TEXT N_("Audio output channels mode")
@@ -340,9 +348,9 @@ static const char *const ppsz_force_dolby_descriptions[] = {
     "Protect against sound clipping" )
 
 #define AUDIO_TIME_STRETCH_TEXT N_( \
-    "Enable time streching audio" )
+    "Enable time stretching audio" )
 #define AUDIO_TIME_STRETCH_LONGTEXT N_( \
-    "This allows to play audio at lower or higher speed without" \
+    "This allows to play audio at lower or higher speed without " \
     "affecting the audio pitch" )
 
 
@@ -508,7 +516,7 @@ static const char *const ppsz_pos_descriptions[] =
 #define VIDEO_FILTER_TEXT N_("Video filter module")
 #define VIDEO_FILTER_LONGTEXT N_( \
     "This adds post-processing filters to enhance the " \
-    "picture quality, for instance deinterlacing, or distort" \
+    "picture quality, for instance deinterlacing, or distort " \
     "the video.")
 
 #define SNAP_PATH_TEXT N_("Video snapshot directory (or filename)")
@@ -609,7 +617,7 @@ static const char *const ppsz_pos_descriptions[] =
 #define KEYBOARD_EVENTS_LONGTEXT N_( \
     "This enables VLC hotkeys from the (non-embedded) video window." )
 
-#define MOUSE_EVENTS_TEXT N_("Key press events")
+#define MOUSE_EVENTS_TEXT N_("Mouse events")
 #define MOUSE_EVENTS_LONGTEXT N_( \
     "This enables handling of mouse clicks on the video." )
 
@@ -634,6 +642,11 @@ static const char *const ppsz_pos_descriptions[] =
     "real-time sources. Use this if you experience jerky playback of " \
     "network streams.")
 
+#define CLOCK_JITTER_TEXT N_("Clock jitter")
+#define CLOCK_JITTER_LONGTEXT N_( \
+    "This defines the maximum input delay jitter that the synchronization " \
+    "algorithms should try to compensate (in milliseconds)." )
+
 #define NETSYNC_TEXT N_("Network synchronisation" )
 #define NETSYNC_LONGTEXT N_( "This allows you to remotely " \
         "synchronise clocks for server and client. The detailed settings " \
@@ -701,12 +714,12 @@ static const char *const ppsz_clock_descriptions[] =
 #define INPUT_AUDIOTRACK_LANG_TEXT N_("Audio language")
 #define INPUT_AUDIOTRACK_LANG_LONGTEXT N_( \
     "Language of the audio track you want to use " \
-    "(comma separated, two or three letter country code).")
+    "(comma separated, two or three letter country code, you may use 'none' to avoid a fallback to another language).")
 
 #define INPUT_SUBTRACK_LANG_TEXT N_("Subtitle language")
 #define INPUT_SUBTRACK_LANG_LONGTEXT N_( \
     "Language of the subtitle track you want to use " \
-    "(comma separated, two or three letters country code).")
+    "(comma separated, two or three letters country code, you may use 'any' as a fallback).")
 
 /// \todo Document how to find it
 #define INPUT_AUDIOTRACK_ID_TEXT N_("Audio track ID")
@@ -764,7 +777,7 @@ static const char *const ppsz_clock_descriptions[] =
 
 #define INPUT_RECORD_NATIVE_TEXT N_("Prefer native stream recording")
 #define INPUT_RECORD_NATIVE_LONGTEXT N_( \
-    "When possible, the input stream will be recorded instead of using" \
+    "When possible, the input stream will be recorded instead of using " \
     "the stream output module" )
 
 #define INPUT_TIMESHIFT_PATH_TEXT N_("Timeshift directory")
@@ -832,36 +845,44 @@ static const char *const ppsz_clock_descriptions[] =
     "Load this subtitle file. To be used when autodetect cannot detect " \
     "your subtitle file.")
 
+/* DVD and VCD devices */
 #define DVD_DEV_TEXT N_("DVD device")
+#define VCD_DEV_TEXT N_("VCD device")
+#define CDAUDIO_DEV_TEXT N_("Audio CD device")
+
 #ifdef WIN32
-#define DVD_DEV_LONGTEXT N_( \
+# define DVD_DEV_LONGTEXT N_( \
     "This is the default DVD drive (or file) to use. Don't forget the colon " \
-    "after the drive letter (eg. D:)")
-#else
-#define DVD_DEV_LONGTEXT N_( \
-    "This is the default DVD device to use.")
-#endif
+    "after the drive letter (e.g. D:)")
+# define VCD_DEV_LONGTEXT N_( \
+    "This is the default VCD drive (or file) to use. Don't forget the colon " \
+    "after the drive letter (e.g. D:)")
+# define CDAUDIO_DEV_LONGTEXT N_( \
+    "This is the default Audio CD drive (or file) to use. Don't forget the " \
+    "colon after the drive letter (e.g. D:)")
+# define DVD_DEVICE     NULL
+# define CD_DEVICE      "D:"
 
-#define VCD_DEV_TEXT N_("VCD device")
-#ifdef HAVE_VCDX
-#define VCD_DEV_LONGTEXT N_( \
-    "This is the default VCD device to use. " \
-    "If you don't specify anything, we'll scan for a suitable CD-ROM device." )
 #else
-#define VCD_DEV_LONGTEXT N_( \
+# define DVD_DEV_LONGTEXT N_( \
+    "This is the default DVD device to use.")
+# define VCD_DEV_LONGTEXT N_( \
     "This is the default VCD device to use." )
-#endif
-
-#define CDAUDIO_DEV_TEXT N_("Audio CD device")
-#ifdef HAVE_CDDAX
-#define CDAUDIO_DEV_LONGTEXT N_( \
-    "This is the default Audio CD device to use. " \
-    "If you don't specify anything, we'll scan for a suitable CD-ROM device." )
-#else
-#define CDAUDIO_DEV_LONGTEXT N_( \
+# define CDAUDIO_DEV_LONGTEXT N_( \
     "This is the default Audio CD device to use." )
+
+# if defined(__OpenBSD__)
+#  define DVD_DEVICE     "/dev/cd0c"
+#  define CD_DEVICE      "/dev/cd0c"
+# else
+#  define DVD_DEVICE     "/dev/dvd"
+#  define CD_DEVICE      "/dev/cdrom"
+# endif
 #endif
 
+#define VCD_DEVICE       CD_DEVICE
+#define CDAUDIO_DEVICE   CD_DEVICE
+
 #define IPV6_TEXT N_("Force IPv6")
 #define IPV6_LONGTEXT N_( \
     "IPv6 will be used by default for all connections.")
@@ -954,7 +975,7 @@ static const char *const ppsz_clock_descriptions[] =
 #define SOUT_TEXT N_("Default stream output chain")
 #define SOUT_LONGTEXT N_( \
     "You can enter here a default stream output chain. Refer to "\
-    "the documentation to learn how to build such chains." \
+    "the documentation to learn how to build such chains. " \
     "Warning: this chain will be enabled for all streams." )
 
 #define SOUT_ALL_TEXT N_("Enable streaming of all ES")
@@ -1229,7 +1250,7 @@ static const char *const ppsz_albumart_descriptions[] =
 #define SD_TEXT N_( "Services discovery modules")
 #define SD_LONGTEXT N_( \
      "Specifies the services discovery modules to load, separated by " \
-     "semi-colons. Typical values are sap, hal, ..." )
+     "colons. Typical values are sap, hal, ..." )
 
 #define RANDOM_TEXT N_("Play files randomly forever")
 #define RANDOM_LONGTEXT N_( \
@@ -1260,6 +1281,10 @@ static const char *const ppsz_albumart_descriptions[] =
     "The media library is automatically saved and reloaded each time you " \
     "start VLC." )
 
+#define LOAD_ML_TEXT N_( "Load Media Library" )
+#define LOAD_ML_LONGTEXT N_( \
+    "Enable this option to load the SQL-based Media Library at VLC startup" )
+
 #define PLTREE_TEXT N_("Display playlist tree")
 #define PLTREE_LONGTEXT N_( \
     "The playlist can use a tree to categorize some items, like the " \
@@ -1614,7 +1639,7 @@ vlc_module_begin ()
                          NULL, AUDIO_FILTER_TEXT,
                          AUDIO_FILTER_LONGTEXT, false )
     set_subcategory( SUBCAT_AUDIO_VISUAL )
-    add_module( "audio-visual", "visualization",NULL, NULL,AUDIO_VISUAL_TEXT,
+    add_module( "audio-visual", "visualization2",NULL, NULL,AUDIO_VISUAL_TEXT,
                 AUDIO_VISUAL_LONGTEXT, false )
 
 /* Video options */
@@ -1643,6 +1668,9 @@ vlc_module_begin ()
     add_string( "x11-display", NULL, NULL,
                 DISPLAY_TEXT, DISPLAY_LONGTEXT, true )
         add_deprecated_alias( "xvideo-display" ) /* deprecated since 1.1.0 */
+        add_deprecated_alias( "glx-display" )
+    add_bool( "xlib", true, NULL, "", "", true )
+        change_private ()
     add_bool( "drop-late-frames", 1, NULL, DROP_LATE_FRAMES_TEXT,
               DROP_LATE_FRAMES_LONGTEXT, true )
     /* Used in vout_synchro */
@@ -1658,6 +1686,7 @@ vlc_module_begin ()
     add_obsolete_integer( "x11-event" ) /* renamed since 1.0.0 */
 #ifndef __APPLE__
     add_bool( "overlay", 1, NULL, OVERLAY_TEXT, OVERLAY_LONGTEXT, false )
+        change_safe()
 #endif
     add_bool( "video-on-top", 0, NULL, VIDEO_ON_TOP_TEXT,
               VIDEO_ON_TOP_LONGTEXT, false )
@@ -1704,9 +1733,9 @@ vlc_module_begin ()
         change_safe ()
     add_integer( "height", -1, NULL, HEIGHT_TEXT, HEIGHT_LONGTEXT, true )
         change_safe ()
-    add_integer( "video-x", -1, NULL, VIDEOX_TEXT, VIDEOX_LONGTEXT, true )
+    add_integer( "video-x", 0, NULL, VIDEOX_TEXT, VIDEOX_LONGTEXT, true )
         change_safe ()
-    add_integer( "video-y", -1, NULL, VIDEOY_TEXT, VIDEOY_LONGTEXT, true )
+    add_integer( "video-y", 0, NULL, VIDEOY_TEXT, VIDEOY_LONGTEXT, true )
         change_safe ()
     add_string( "crop", NULL, NULL, CROP_TEXT, CROP_LONGTEXT, false )
         change_safe ()
@@ -1748,7 +1777,6 @@ vlc_module_begin ()
     set_subcategory( SUBCAT_VIDEO_VFILTER )
     add_module_list_cat( "video-filter", SUBCAT_VIDEO_VFILTER, NULL, NULL,
                 VIDEO_FILTER_TEXT, VIDEO_FILTER_LONGTEXT, false )
-        add_deprecated_alias( "filter" ) /*deprecated since 0.8.2 */
     add_module_list_cat( "vout-filter", SUBCAT_VIDEO_VFILTER, NULL, NULL,
                         VOUT_FILTER_TEXT, VOUT_FILTER_LONGTEXT, false )
 #if 0
@@ -1783,7 +1811,6 @@ vlc_module_begin ()
                  SUB_PATH_TEXT, SUB_PATH_LONGTEXT, true )
     add_integer( "sub-margin", 0, NULL, SUB_MARGIN_TEXT,
                  SUB_MARGIN_LONGTEXT, true )
-        add_deprecated_alias( "spu-margin" ) /*Deprecated since 0.8.2 */
     set_section( N_( "Overlays" ) , NULL )
     add_module_list_cat( "sub-filter", SUBCAT_VIDEO_SUBPIC, NULL, NULL,
                 SUB_FILTER_TEXT, SUB_FILTER_LONGTEXT, false )
@@ -1802,11 +1829,9 @@ vlc_module_begin ()
     add_integer( "audio-track", -1, NULL,
                  INPUT_AUDIOTRACK_TEXT, INPUT_AUDIOTRACK_LONGTEXT, true )
         change_safe ()
-        add_deprecated_alias( "audio-channel" ) /*deprecated since 0.8.2 */
     add_integer( "sub-track", -1, NULL,
                  INPUT_SUBTRACK_TEXT, INPUT_SUBTRACK_LONGTEXT, true )
         change_safe ()
-        add_deprecated_alias("spu-channel" ) /*deprecated since 0.8.2*/
     add_string( "audio-language", "", NULL,
                  INPUT_AUDIOTRACK_LANG_TEXT, INPUT_AUDIOTRACK_LANG_LONGTEXT,
                   false )
@@ -1848,6 +1873,7 @@ vlc_module_begin ()
 
     add_string( "bookmarks", NULL, NULL,
                  BOOKMARKS_TEXT, BOOKMARKS_LONGTEXT, true )
+        change_safe ()
 
     set_section( N_( "Default devices") , NULL )
 
@@ -1912,6 +1938,9 @@ vlc_module_begin ()
     add_integer( "clock-synchro", -1, NULL, CLOCK_SYNCHRO_TEXT,
                  CLOCK_SYNCHRO_LONGTEXT, true )
         change_integer_list( pi_clock_values, ppsz_clock_descriptions, NULL )
+    add_integer( "clock-jitter", 5 * CLOCK_FREQ/1000, NULL, CLOCK_JITTER_TEXT,
+              CLOCK_JITTER_LONGTEXT, true )
+        change_safe()
 
     add_bool( "network-synchronisation", false, NULL, NETSYNC_TEXT,
               NETSYNC_LONGTEXT, true )
@@ -2080,8 +2109,7 @@ vlc_module_begin ()
               ONEINSTANCE_LONGTEXT, true )
     add_bool( "started-from-file", 0, NULL, STARTEDFROMFILE_TEXT,
               STARTEDFROMFILE_LONGTEXT, true )
-        change_internal ()
-        change_unsaveable ()
+        change_volatile ()
     add_bool( "one-instance-when-started-from-file", 1, NULL,
               ONEINSTANCEWHENSTARTEDFROMFILE_TEXT,
               ONEINSTANCEWHENSTARTEDFROMFILE_LONGTEXT, true )
@@ -2114,6 +2142,10 @@ vlc_module_begin ()
     add_bool( "play-and-pause", 0, NULL, PAP_TEXT, PAP_LONGTEXT, true )
         change_safe()
     add_bool( "media-library", 1, NULL, ML_TEXT, ML_LONGTEXT, false )
+#if defined( MEDIA_LIBRARY )
+    add_bool( "load-media-library-on-startup", 1, NULL, LOAD_ML_TEXT,
+            LOAD_ML_LONGTEXT, false )
+#endif
     add_bool( "playlist-tree", 0, NULL, PLTREE_TEXT, PLTREE_LONGTEXT, false )
 
     add_string( "open", "", NULL, OPEN_TEXT, OPEN_LONGTEXT, false )
@@ -2432,10 +2464,10 @@ vlc_module_begin ()
 #   define KEY_UNCROP_RIGHT       KEY_MODIFIER_ALT|KEY_MODIFIER_SHIFT|'f'
 
 /* Zooming */
-#   define KEY_ZOOM_QUARTER       KEY_MODIFIER_CTRL|'1'
-#   define KEY_ZOOM_HALF          KEY_MODIFIER_CTRL|'2'
-#   define KEY_ZOOM_ORIGINAL      KEY_MODIFIER_CTRL|'3'
-#   define KEY_ZOOM_DOUBLE        KEY_MODIFIER_CTRL|'4'
+#   define KEY_ZOOM_QUARTER       KEY_MODIFIER_ALT|'1'
+#   define KEY_ZOOM_HALF          KEY_MODIFIER_ALT|'2'
+#   define KEY_ZOOM_ORIGINAL      KEY_MODIFIER_ALT|'3'
+#   define KEY_ZOOM_DOUBLE        KEY_MODIFIER_ALT|'4'
 
 /* Bookmarks */
 #   define KEY_SET_BOOKMARK1      KEY_MODIFIER_CTRL|KEY_F1
@@ -2734,12 +2766,10 @@ vlc_module_begin ()
     N_("print a list of available modules with extra detail")
 #define MODULE_TEXT \
     N_("print help on a specific module (can be combined with --advanced " \
-       "and --help-verbose). Prefix the module name with = for strict" \
+       "and --help-verbose). Prefix the module name with = for strict " \
        "matches.")
 #define IGNORE_CONFIG_TEXT \
     N_("no configuration option will be loaded nor saved to config file")
-#define SAVE_CONFIG_TEXT \
-    N_("save the current command line options in the config")
 #define RESET_CONFIG_TEXT \
     N_("reset the current config to the default values")
 #define CONFIG_TEXT \
@@ -2751,54 +2781,36 @@ vlc_module_begin ()
 
     add_bool( "help", false, NULL, HELP_TEXT, "", false )
         change_short( 'h' )
-        change_internal ()
-        change_unsaveable ()
+        change_volatile ()
     add_bool( "full-help", false, NULL, FULL_HELP_TEXT, "", false )
         change_short( 'H' )
-        change_internal ()
-        change_unsaveable ()
+        change_volatile ()
     add_bool( "longhelp", false, NULL, LONGHELP_TEXT, "", false )
-        change_internal ()
-        change_unsaveable ()
+        change_volatile ()
     add_bool( "help-verbose", false, NULL, HELP_VERBOSE_TEXT, "",
               false )
-        change_internal ()
-        change_unsaveable ()
+        change_volatile ()
     add_bool( "list", false, NULL, LIST_TEXT, "", false )
         change_short( 'l' )
-        change_internal ()
-        change_unsaveable ()
+        change_volatile ()
     add_bool( "list-verbose", false, NULL, LIST_VERBOSE_TEXT, "",
               false )
-        change_internal ()
-        change_unsaveable ()
+        change_volatile ()
     add_string( "module", NULL, NULL, MODULE_TEXT, "", false )
         change_short( 'p' )
-        change_internal ()
-        change_unsaveable ()
+        change_volatile ()
     add_bool( "ignore-config", true, NULL, IGNORE_CONFIG_TEXT, "", false )
-        change_internal ()
-        change_unsaveable ()
-    add_bool( "save-config", false, NULL, SAVE_CONFIG_TEXT, "",
-              false )
-        change_internal ()
-        change_unsaveable ()
+        change_volatile ()
+    add_obsolete_bool( "save-config" )
     add_bool( "reset-config", false, NULL, RESET_CONFIG_TEXT, "", false )
-        change_internal ()
-        change_unsaveable ()
+        change_volatile ()
     add_bool( "reset-plugins-cache", false, NULL,
               RESET_PLUGINS_CACHE_TEXT, "", false )
-        change_internal ()
-        change_unsaveable ()
+        change_volatile ()
     add_bool( "version", false, NULL, VERSION_TEXT, "", false )
-        change_internal ()
-        change_unsaveable ()
+        change_volatile ()
     add_string( "config", NULL, NULL, CONFIG_TEXT, "", false )
-        change_internal ()
-        change_unsaveable ()
-    add_bool( "version", false, NULL, VERSION_TEXT, "", false )
-        change_internal ()
-        change_unsaveable ()
+        change_volatile ()
 
    /* Usage (mainly useful for cmd line stuff) */
     /* add_usage_hint( PLAYLIST_USAGE ) */