]> git.sesse.net Git - vlc/blobdiff - src/libvlc-module.c
Lua: remove non-working menu object
[vlc] / src / libvlc-module.c
index 374627473abd9e1e469c3ab90428244cd6919600..3835ccb7469a37eec9244908089ee68af7df916b 100644 (file)
 #include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_cpu.h>
-#include <vlc_aout_intf.h>
+#include <vlc_playlist.h>
 #include "libvlc.h"
 #include "modules/modules.h"
 
 //#define Nothing here, this is just to prevent update-po from being stupid
 #include "vlc_keys.h"
 #include "vlc_meta.h"
+#include <vlc_aout.h>
 
 static const char *const ppsz_snap_formats[] =
 { "png", "jpg", "tiff" };
@@ -86,16 +87,6 @@ static const char *const ppsz_snap_formats[] =
     "This is the verbosity level (0=only errors and " \
     "standard messages, 1=warnings, 2=debug).")
 
-#define VERBOSE_OBJECTS_TEXT N_("Choose which objects should print debug " \
-    "message")
-#define VERBOSE_OBJECTS_LONGTEXT N_( \
-    "This is a ',' separated string, each object should be prefixed by " \
-    "a '+' or a '-' to respectively enable or disable it. The keyword " \
-    "'all' refers to all objects. Objects can be referred to by their " \
-    "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.")
-
 #define QUIET_TEXT N_("Be quiet")
 #define QUIET_LONGTEXT N_( \
     "Turn off all warning and information messages.")
@@ -202,6 +193,15 @@ static const int pi_force_dolby_values[] = { 0, 1, 2 };
 static const char *const ppsz_force_dolby_descriptions[] = {
     N_("Auto"), N_("On"), N_("Off") };
 
+#define STEREO_MODE_TEXT N_("Stereo audio output mode")
+static const int pi_stereo_mode_values[] = { AOUT_VAR_CHAN_UNSET,
+    AOUT_VAR_CHAN_STEREO, AOUT_VAR_CHAN_RSTEREO,
+    AOUT_VAR_CHAN_LEFT, AOUT_VAR_CHAN_RIGHT, AOUT_VAR_CHAN_DOLBYS
+};
+static const char *const ppsz_stereo_mode_texts[] = { N_("Unset"),
+    N_("Stereo"), N_("Reverse stereo"),
+    N_("Left"), N_("Right"), N_("Dolby Surround")
+};
 
 #define AUDIO_FILTER_TEXT N_("Audio filters")
 #define AUDIO_FILTER_LONGTEXT N_( \
@@ -993,21 +993,11 @@ static const char *const ppsz_prefres[] = {
  * Advanced
  ****************************************************************************/
 
-// DEPRECATED
-#define CPU_CAT_LONGTEXT N_( \
-    "These options allow you to enable special CPU optimizations. " \
-    "You should always leave all these enabled." )
-
 // DEPRECATED
 #define MISC_CAT_LONGTEXT N_( \
     "These options allow you to select default modules. Leave these " \
     "alone unless you really know what you are doing." )
 
-#define MEMCPY_TEXT N_("Memory copy module")
-#define MEMCPY_LONGTEXT N_( \
-    "You can select which memory copy module you want to use. By default " \
-    "VLC will select the fastest one supported by your hardware.")
-
 #define ACCESS_TEXT N_("Access module")
 #define ACCESS_LONGTEXT N_( \
     "This allows you to force an access module. You can use it if " \
@@ -1083,12 +1073,12 @@ static const char *const ppsz_prefres[] = {
     "Log all VLC messages to syslog (UNIX systems)." )
 
 #define ONEINSTANCE_TEXT N_("Allow only one running instance")
-#if defined( WIN32 )
+#if defined( WIN32 ) || defined( __OS2__ )
 #define ONEINSTANCE_LONGTEXT N_( \
     "Allowing only one running instance of VLC can sometimes be useful, " \
     "for example if you associated VLC with some media types and you " \
     "don't want a new instance of VLC to be opened each time you " \
-    "double-click on a file in the explorer. This option will allow you " \
+    "open a file in your file manager. This option will allow you " \
     "to play the file with the already running instance or enqueue it.")
 #elif defined( HAVE_DBUS )
 #define ONEINSTANCE_LONGTEXT N_( \
@@ -1379,6 +1369,8 @@ static const char *const ppsz_albumart_descriptions[] =
 #define SCALE_DOWN_KEY_LONGTEXT N_("Decrease scale factor.")
 #define DEINTERLACE_KEY_TEXT N_("Toggle deinterlacing")
 #define DEINTERLACE_KEY_LONGTEXT N_("Activate or deactivate deinterlacing.")
+#define DEINTERLACE_MODE_KEY_TEXT N_("Cycle deinterlace modes")
+#define DEINTERLACE_MODE_KEY_LONGTEXT N_("Cycle through available deinterlace modes.")
 #define INTF_TOGGLE_FSC_KEY_TEXT N_("Show controller in fullscreen")
 #define INTF_SHOW_KEY_TEXT N_("Show interface")
 #define INTF_SHOW_KEY_LONGTEXT N_("Raise the interface above all other windows.")
@@ -1493,6 +1485,8 @@ vlc_module_begin ()
     add_integer( "force-dolby-surround", 0, FORCE_DOLBY_TEXT,
                  FORCE_DOLBY_LONGTEXT, false )
         change_integer_list( pi_force_dolby_values, ppsz_force_dolby_descriptions )
+    add_integer( "stereo-mode", 0, STEREO_MODE_TEXT, STEREO_MODE_TEXT, true )
+        change_integer_list( pi_stereo_mode_values, ppsz_stereo_mode_texts )
     add_integer( "audio-desync", 0, DESYNC_TEXT,
                  DESYNC_LONGTEXT, true )
         change_safe ()
@@ -1519,8 +1513,8 @@ vlc_module_begin ()
                 true )
         change_short('A')
     set_subcategory( SUBCAT_AUDIO_AFILTER )
-    add_module_list_cat( "audio-filter", SUBCAT_AUDIO_AFILTER, NULL,
-                         AUDIO_FILTER_TEXT, AUDIO_FILTER_LONGTEXT, false )
+    add_module_list( "audio-filter", "audio filter", NULL,
+                     AUDIO_FILTER_TEXT, AUDIO_FILTER_LONGTEXT, false )
     set_subcategory( SUBCAT_AUDIO_VISUAL )
     add_module( "audio-visual", "visualization2", NULL,AUDIO_VISUAL_TEXT,
                 AUDIO_VISUAL_LONGTEXT, false )
@@ -1844,7 +1838,6 @@ vlc_module_begin ()
     add_obsolete_integer( "linsys-hdsdi-caching" ) /* 2.0.0 */
     add_obsolete_integer( "linsys-sdi-caching" ) /* 2.0.0 */
     add_obsolete_integer( "oss-caching" ) /* 2.0.0 */
-    add_obsolete_integer( "pvr-caching" ) /* 2.0.0 */
     add_obsolete_integer( "screen-caching" ) /* 2.0.0 */
     add_obsolete_integer( "v4l2-caching" ) /* 2.0.0 */
     add_integer( "disc-caching", DEFAULT_PTS_DELAY / 1000,
@@ -1947,6 +1940,9 @@ vlc_module_begin ()
 
 
     set_subcategory( SUBCAT_SOUT_STREAM )
+    add_integer( "sap-interval", 5, ANN_SAPINTV_TEXT,
+                               ANN_SAPINTV_LONGTEXT, true )
+
     set_subcategory( SUBCAT_SOUT_MUX )
     add_module( "mux", "sout mux", NULL, MUX_TEXT, MUX_LONGTEXT, true )
     set_subcategory( SUBCAT_SOUT_ACO )
@@ -1961,16 +1957,10 @@ vlc_module_begin ()
     add_module( "packetizer", "packetizer", NULL,
                 PACKETIZER_TEXT, PACKETIZER_LONGTEXT, true )
 
-    set_subcategory( SUBCAT_SOUT_SAP )
-    add_integer( "sap-interval", 5, ANN_SAPINTV_TEXT,
-                               ANN_SAPINTV_LONGTEXT, true )
-
     set_subcategory( SUBCAT_SOUT_VOD )
 
 /* CPU options */
     set_category( CAT_ADVANCED )
-    set_subcategory( SUBCAT_ADVANCED_CPU )
-    add_category_hint( N_("CPU"), CPU_CAT_LONGTEXT, true )
     add_obsolete_bool( "fpu" )
 #if defined( __i386__ ) || defined( __x86_64__ )
     add_obsolete_bool( "mmx" ) /* since 2.0.0 */
@@ -1991,7 +1981,6 @@ vlc_module_begin ()
     set_subcategory( SUBCAT_ADVANCED_MISC )
     set_section( N_("Special modules"), NULL )
     add_category_hint( N_("Miscellaneous"), MISC_CAT_LONGTEXT, true )
-    add_module( "memcpy", "memcpy", NULL, MEMCPY_TEXT, MEMCPY_LONGTEXT, true )
     add_module( "vod-server", "vod server", NULL, VOD_SERVER_TEXT,
                 VOD_SERVER_LONGTEXT, true )
 
@@ -2017,24 +2006,17 @@ vlc_module_begin ()
               INHIBIT_LONGTEXT, true )
 #endif
 
-#if defined(WIN32) || defined(HAVE_DBUS)
-    add_bool( "one-instance", 0, ONEINSTANCE_TEXT,
-              ONEINSTANCE_LONGTEXT, true )
-    add_bool( "started-from-file", 0, STARTEDFROMFILE_TEXT,
-              STARTEDFROMFILE_LONGTEXT, true )
-        change_volatile ()
-    add_bool( "one-instance-when-started-from-file", 1,
-              ONEINSTANCEWHENSTARTEDFROMFILE_TEXT,
-              ONEINSTANCEWHENSTARTEDFROMFILE_LONGTEXT, true )
-    add_bool( "playlist-enqueue", 0, PLAYLISTENQUEUE_TEXT,
-              PLAYLISTENQUEUE_LONGTEXT, true )
-#endif
-
 #if defined(WIN32) || defined(__OS2__)
     add_bool( "high-priority", 0, HPRIORITY_TEXT,
               HPRIORITY_LONGTEXT, false )
 #endif
 
+#define CLOCK_SOURCE_TEXT N_("Clock source")
+#ifdef WIN32
+    add_string( "clock-source", NULL, CLOCK_SOURCE_TEXT, CLOCK_SOURCE_TEXT, true )
+        change_string_cb( EnumClockSource )
+#endif
+
 /* Playlist options */
     set_category( CAT_PLAYLIST )
     set_subcategory( SUBCAT_PLAYLIST_GENERAL )
@@ -2056,6 +2038,18 @@ vlc_module_begin ()
     add_bool( "playlist-autostart", true,
               AUTOSTART_TEXT, AUTOSTART_LONGTEXT, false )
     add_bool( "playlist-cork", true, CORK_TEXT, CORK_LONGTEXT, false )
+#if defined(WIN32) || defined(HAVE_DBUS) || defined(__OS2__)
+    add_bool( "one-instance", 0, ONEINSTANCE_TEXT,
+              ONEINSTANCE_LONGTEXT, true )
+    add_bool( "started-from-file", 0, STARTEDFROMFILE_TEXT,
+              STARTEDFROMFILE_LONGTEXT, true )
+        change_volatile ()
+    add_bool( "one-instance-when-started-from-file", 1,
+              ONEINSTANCEWHENSTARTEDFROMFILE_TEXT,
+              ONEINSTANCEWHENSTARTEDFROMFILE_LONGTEXT, true )
+    add_bool( "playlist-enqueue", 0, PLAYLISTENQUEUE_TEXT,
+              PLAYLISTENQUEUE_LONGTEXT, true )
+#endif
     add_bool( "media-library", 0, ML_TEXT, ML_LONGTEXT, false )
 #if defined( MEDIA_LIBRARY )
     add_bool( "load-media-library-on-startup", 1, LOAD_ML_TEXT,
@@ -2083,8 +2077,7 @@ vlc_module_begin ()
     add_integer( "verbose", 0, VERBOSE_TEXT, VERBOSE_LONGTEXT,
                  false )
         change_short('v')
-    add_string( "verbose-objects", 0, VERBOSE_OBJECTS_TEXT, VERBOSE_OBJECTS_LONGTEXT,
-                 false )
+    add_obsolete_string( "verbose-objects" ) /* since 2.1.0 */
     add_bool( "quiet", 0, QUIET_TEXT, QUIET_LONGTEXT, false )
         change_short('q')
 
@@ -2211,6 +2204,7 @@ vlc_module_begin ()
 #   define KEY_SCALE_UP           "Alt+o"
 #   define KEY_SCALE_DOWN         "Shift+Alt+o"
 #   define KEY_DEINTERLACE        "d"
+#   define KEY_DEINTERLACE_MODE   "Shift+d"
 #   define KEY_INTF_TOGGLE_FSC    "i"
 #   define KEY_INTF_BOSS          NULL
 #   define KEY_DISC_MENU          "Ctrl+m"
@@ -2329,6 +2323,7 @@ vlc_module_begin ()
 #   define KEY_SCALE_UP           "Alt+o"
 #   define KEY_SCALE_DOWN         "Alt+Shift+o"
 #   define KEY_DEINTERLACE        "d"
+#   define KEY_DEINTERLACE_MODE   "Shift+d"
 #   define KEY_INTF_TOGGLE_FSC    "i"
 #   define KEY_INTF_BOSS          NULL
 #   define KEY_DISC_MENU          "Shift+m"
@@ -2501,6 +2496,8 @@ vlc_module_begin ()
              SCALE_DOWN_KEY_TEXT, SCALE_DOWN_KEY_LONGTEXT, false )
     add_key( "key-deinterlace", KEY_DEINTERLACE,
              DEINTERLACE_KEY_TEXT, DEINTERLACE_KEY_LONGTEXT, false )
+    add_key( "key-deinterlace-mode", KEY_DEINTERLACE_MODE,
+             DEINTERLACE_MODE_KEY_TEXT, DEINTERLACE_MODE_KEY_LONGTEXT, false )
     add_key( "key-intf-show", KEY_INTF_TOGGLE_FSC,
              INTF_TOGGLE_FSC_KEY_TEXT, INTF_TOGGLE_FSC_KEY_TEXT, false )
     add_obsolete_inner( "key-intf-hide", CONFIG_ITEM_KEY )