]> git.sesse.net Git - vlc/blobdiff - src/libvlc-module.c
Show title on video output based on users preferences. Defaults are:--video-title...
[vlc] / src / libvlc-module.c
index 9c308efd93bb3b571e183f143b1ce1aefdbe1b42..eae0b1b4fc7439b005257f781286a1d414f50e7e 100644 (file)
 
 #if defined (WIN32) || defined (__APPLE__)
 static const char *ppsz_language[] =
-{ "auto", "en", "en_GB", "ca", "cs", "da", "de", "es", "fr", "gl", "he", "hu",
-  "it", "ja", "ka", "ko", "ms", "nl", "oc", "pt_BR", "ro", "ru", "sk", "sl",
-  "sv", "tr", "zh_CN", "zh_TW" };
+{ "auto", "ar", "en", "en_GB", "ca", "cs", "da", "de", "es", "fa"  "fr", "gl",
+    "he", "hu", "it", "ja", "ka", "ko", "ms", "nl", "oc", "pt_BR", "ro", "ru",
+    "sk", "sl", "sv", "tr", "zh_CN", "zh_TW" };
 
 static const char *ppsz_language_text[] =
-{ N_("Auto"), N_("American English"), N_("British English"),
+{ N_("Auto"), N_("Arabic"), N_("American English"), N_("British English"),
 N_("Catalan"), N_("Czech"), N_("Danish"), N_("German"), N_("Spanish"),
-N_("French"), N_("Galician"), N_("Hebrew"), N_("Hungarian"),N_("Italian"),
-N_("Japanese"),N_("Georgian"), N_("Korean"), N_("Malay"), N_("Dutch"),
-N_("Occitan"), N_("Brazilian Portuguese"), N_("Romanian"), N_("Russian"),
-N_("Slovak"), N_("Slovenian"), N_("Swedish"), N_("Turkish"),
+N_("Persian"), N_("French"), N_("Galician"), N_("Hebrew"), N_("Hungarian"),
+N_("Italian"), N_("Japanese"),N_("Georgian"), N_("Korean"), N_("Malay"),
+N_("Dutch"), N_("Occitan"), N_("Brazilian Portuguese"), N_("Romanian"),
+N_("Russian"), N_("Slovak"), N_("Slovenian"), N_("Swedish"), N_("Turkish"),
 N_("Simplified Chinese"), N_("Chinese Traditional") };
 #endif
 
@@ -303,6 +303,23 @@ static const char *ppsz_align_descriptions[] =
 #define VIDEO_ON_TOP_LONGTEXT N_( \
     "Always place the video window on top of other windows." )
 
+#define VIDEO_TITLE_SHOW_TEXT N_("Show media title on video.")
+#define VIDEO_TITLE_SHOW_LONGTEXT N_( \
+    "Display the title of the video on top of the movie.")
+
+#define VIDEO_TITLE_TIMEOUT_TEXT N_("Show video title for x miliseconds.")
+#define VIDEO_TITLE_TIMEOUT_LONGTEXT N_( \
+    "Show the video title for n miliseconds, default is 5000 ms (5 sec.)")
+
+#define VIDEO_TITLE_POSITION_TEXT N_("Position of video title.")
+#define VIDEO_TITLE_POSITION_LONGTEXT N_( \
+    "Place on video where to display the title (default bottom center).")
+
+static int pi_pos_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 };
+static const char *ppsz_pos_descriptions[] =
+{ N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"),
+  N_("Top-Left"), N_("Top-Right"), N_("Bottom-Left"), N_("Bottom-Right") };
+
 #define SS_TEXT N_("Disable screensaver")
 #define SS_LONGTEXT N_("Disable the screensaver during video playback." )
 
@@ -381,10 +398,9 @@ static const char *ppsz_align_descriptions[] =
     "pixels (1:1). If you have a 16:9 screen, you might need to change this " \
     "to 4:3 in order to keep proportions.")
 
-/// \bug [String] Remove "this option"
 #define SKIP_FRAMES_TEXT N_("Skip frames")
 #define SKIP_FRAMES_LONGTEXT N_( \
-    "This option enables framedropping on MPEG2 stream. Framedropping " \
+    "Enables framedropping on MPEG2 stream. Framedropping " \
     "occurs when your computer is not powerful enough" )
 
 #define DROP_LATE_FRAMES_TEXT N_("Drop late frames")
@@ -558,11 +574,10 @@ static const char *ppsz_clock_descriptions[] =
 #define TEXTRENDERER_LONGTEXT N_( \
     "VLC normally uses Freetype for rendering, but this allows you to use svg for instance.")
 
-/// \bug typo arbitraty
 #define SUB_FILTER_TEXT N_("Subpictures filter module")
 #define SUB_FILTER_LONGTEXT N_( \
     "This adds so-called \"subpicture filters\". These filters overlay " \
-    "some images or text over the video (like a logo, arbitraty text...)." )
+    "some images or text over the video (like a logo, arbitrary text...)." )
 
 #define SUB_AUTO_TEXT N_("Autodetect subtitle files")
 #define SUB_AUTO_LONGTEXT N_( \
@@ -694,6 +709,11 @@ static const char *ppsz_clock_descriptions[] =
     "This allows you to select a list of encoders that VLC will use in " \
     "priority.")
 
+#define SYSTEM_CODEC_TEXT N_("Prefer system plugins over vlc")
+#define SYSTEM_CODEC_LONGTEXT N_( \
+    "Indicates whether VLC will prefer native plugins installed " \
+    "on system over VLC owns plugins whenever a choice is available." )
+
 /*****************************************************************************
  * Sout
  ****************************************************************************/
@@ -898,7 +918,7 @@ static const char *ppsz_clock_descriptions[] =
     "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 " \
     "open a file in your file manager. This option will allow you " \
-    "to play the file with the already running instance or enqueue it." \
+    "to play the file with the already running instance or enqueue it. " \
     "This option require the D-Bus session daemon to be active " \
     "and the running instance of VLC to use D-Bus control interface.")
 
@@ -920,24 +940,6 @@ static const char *ppsz_clock_descriptions[] =
     "all the processor time and render the whole system unresponsive which " \
     "might require a reboot of your machine.")
 
-#define FAST_MUTEX_TEXT N_("Fast mutex on NT/2K/XP (developers only)")
-#define FAST_MUTEX_LONGTEXT N_( \
-    "On Windows NT/2K/XP we use a slow mutex implementation but which " \
-    "allows us to correctly implement condition variables. " \
-    "You can also use the faster Win9x implementation but you might " \
-    "experience problems with it.")
-
-#define WIN9X_CV_TEXT N_("Condition variables implementation for Win9x " \
-    "(developers only)")
-#define WIN9X_CV_LONGTEXT N_( \
-    "On Windows 9x/Me you can use a fast but incorrect condition variables " \
-    "implementation (more precisely there is a possibility for a race " \
-    "condition to happen). " \
-    "However it is possible to use slower alternatives which are more " \
-    "robust. " \
-    "Currently you can choose between implementation 0 (which is the " \
-    "fastest but slightly incorrect), 1 (default) and 2.")
-
 #define PLAYLISTENQUEUE_TEXT N_( \
     "Enqueue items to playlist when in one instance mode")
 #define PLAYLISTENQUEUE_LONGTEXT N_( \
@@ -1018,8 +1020,10 @@ static const char *ppsz_pltree_descriptions[] = { N_("Default"), N_("Always"), N
 #define HOTKEY_CAT_LONGTEXT N_( "These settings are the global VLC key " \
     "bindings, known as \"hotkeys\"." )
 
-#define FULLSCREEN_KEY_TEXT N_("Fullscreen")
-#define FULLSCREEN_KEY_LONGTEXT N_("Select the hotkey to use to swap fullscreen state.")
+#define TOGGLE_FULLSCREEN_KEY_TEXT N_("Fullscreen")
+#define TOGGLE_FULLSCREEN_KEY_LONGTEXT N_("Select the hotkey to use to swap fullscreen state.")
+#define LEAVE_FULLSCREEN_KEY_TEXT N_("Leave fullscreen")
+#define LEAVE_FULLSCREEN_KEY_LONGTEXT N_("Select the hotkey to use to leave fullscreen state.")
 #define PLAY_PAUSE_KEY_TEXT N_("Play/Pause")
 #define PLAY_PAUSE_KEY_LONGTEXT N_("Select the hotkey to use to swap paused state.")
 #define PAUSE_KEY_TEXT N_("Pause only")
@@ -1205,6 +1209,10 @@ static const char *ppsz_pltree_descriptions[] = { N_("Default"), N_("Always"), N
 #define UNCROP_RIGHT_KEY_TEXT N_("Uncrop one pixel from the right of the video")
 #define UNCROP_RIGHT_KEY_LONGTEXT N_("Uncrop one pixel from the right of the video")
 
+#define WALLPAPER_KEY_TEXT N_("Toggle wallpaper mode in video output")
+#define WALLPAPER_KEY_LONGTEXT N_( \
+    "Toggle wallpaper mode in video output. Only works with the directx " \
+    "video output for the time being." )
 
 const char vlc_usage[] = N_(
     "Usage: %s [options] [stream] ..."
@@ -1319,6 +1327,14 @@ vlc_module_begin();
     add_bool( "disable-screensaver", VLC_TRUE, NULL, SS_TEXT, SS_LONGTEXT,
               VLC_TRUE );
 
+    add_bool( "video-title-show", 1, NULL, VIDEO_TITLE_SHOW_TEXT,
+              VIDEO_TITLE_SHOW_LONGTEXT, VLC_FALSE );
+    add_integer( "video-title-timeout", 5000, NULL, VIDEO_TITLE_TIMEOUT_TEXT,
+                 VIDEO_TITLE_TIMEOUT_LONGTEXT, VLC_FALSE );
+    add_integer( "video-title-position", 8, NULL, VIDEO_TITLE_POSITION_TEXT,
+                 VIDEO_TITLE_POSITION_LONGTEXT, VLC_FALSE );
+        change_integer_list( pi_pos_values, ppsz_pos_descriptions, 0 );
+
     set_section( N_("Snapshot") , NULL );
     add_directory( "snapshot-path", NULL, NULL, SNAP_PATH_TEXT,
                    SNAP_PATH_LONGTEXT, VLC_FALSE );
@@ -1528,6 +1544,8 @@ vlc_module_begin();
     set_subcategory( SUBCAT_INPUT_VCODEC );
     set_subcategory( SUBCAT_INPUT_ACODEC );
     set_subcategory( SUBCAT_INPUT_SCODEC );
+    add_bool( "prefer-system-codecs", VLC_FALSE, NULL, SYSTEM_CODEC_TEXT,
+                                SYSTEM_CODEC_LONGTEXT, VLC_FALSE );
 
 
 /* Stream output options */
@@ -1658,12 +1676,6 @@ vlc_module_begin();
     add_bool( "high-priority", 0, NULL, HPRIORITY_TEXT,
               HPRIORITY_LONGTEXT, VLC_FALSE );
         change_need_restart();
-    add_bool( "fast-mutex", 0, NULL, FAST_MUTEX_TEXT,
-              FAST_MUTEX_LONGTEXT, VLC_TRUE );
-        change_need_restart();
-    add_integer( "win9x-cv-method", 1, NULL, WIN9X_CV_TEXT,
-                  WIN9X_CV_LONGTEXT, VLC_TRUE );
-        change_need_restart();
 #endif
 
 /* Playlist options */
@@ -1672,13 +1684,10 @@ vlc_module_begin();
     add_category_hint( N_("Playlist"), PLAYLIST_CAT_LONGTEXT , VLC_FALSE );
     add_bool( "random", 0, NULL, RANDOM_TEXT, RANDOM_LONGTEXT, VLC_FALSE );
         change_short('Z');
-        change_autosave();
     add_bool( "loop", 0, NULL, LOOP_TEXT, LOOP_LONGTEXT, VLC_FALSE );
         change_short('L');
-        change_autosave();
     add_bool( "repeat", 0, NULL, REPEAT_TEXT, REPEAT_LONGTEXT, VLC_FALSE );
         change_short('R');
-        change_autosave();
     add_bool( "play-and-exit", 0, NULL, PAE_TEXT, PAE_LONGTEXT, VLC_FALSE );
     add_bool( "play-and-stop", 0, NULL, PAS_TEXT, PAS_LONGTEXT, VLC_FALSE );
     add_bool( "media-library", 1, NULL, ML_TEXT, ML_LONGTEXT, VLC_FALSE );
@@ -1742,7 +1751,7 @@ vlc_module_begin();
     add_bool( "advanced", 0, NULL, ADVANCED_TEXT, ADVANCED_LONGTEXT,
                     VLC_FALSE );
         change_need_restart();
-    add_bool( "interact", VLC_FALSE, NULL, INTERACTION_TEXT,
+    add_bool( "interact", VLC_TRUE, NULL, INTERACTION_TEXT,
               INTERACTION_LONGTEXT, VLC_FALSE );
 
     add_bool( "show-intf", VLC_FALSE, NULL, SHOWINTF_TEXT, SHOWINTF_LONGTEXT,
@@ -1801,7 +1810,8 @@ vlc_module_begin();
  *  show info                     KEY_MODIFIER_COMMAND|'i'
  *  help                          KEY_MODIFIER_COMMAND|'?'
  */
-#   define KEY_FULLSCREEN         KEY_MODIFIER_COMMAND|'f'
+#   define KEY_TOGGLE_FULLSCREEN  KEY_MODIFIER_COMMAND|'f'
+#   define KEY_LEAVE_FULLSCREEN   KEY_ESC
 #   define KEY_PLAY_PAUSE         KEY_MODIFIER_COMMAND|'p'
 #   define KEY_PAUSE              KEY_UNSET
 #   define KEY_PLAY               KEY_UNSET
@@ -1883,9 +1893,11 @@ vlc_module_begin();
 #   define KEY_HISTORY_FORWARD    KEY_MODIFIER_COMMAND|']'
 #   define KEY_RECORD             KEY_MODIFIER_COMMAND|KEY_MODIFIER_SHIFT|'r'
 #   define KEY_DUMP               KEY_MODIFIER_COMMAND|KEY_MODIFIER_SHIFT|'d'
+#   define KEY_WALLPAPER          KEY_MODIFIER_COMMAND|'w'
 
 #else
-#   define KEY_FULLSCREEN         'f'
+#   define KEY_TOGGLE_FULLSCREEN  'f'
+#   define KEY_LEAVE_FULLSCREEN   KEY_ESC
 #   define KEY_PLAY_PAUSE         KEY_SPACE
 #   define KEY_PAUSE              KEY_UNSET
 #   define KEY_PLAY               KEY_UNSET
@@ -1968,10 +1980,14 @@ vlc_module_begin();
 #   define KEY_HISTORY_FORWARD    KEY_MODIFIER_CTRL|'b'
 #   define KEY_RECORD             KEY_MODIFIER_CTRL|'r'
 #   define KEY_DUMP               KEY_MODIFIER_CTRL|KEY_MODIFIER_SHIFT|'d'
+#   define KEY_WALLPAPER          'w'
 #endif
 
-    add_key( "key-fullscreen", KEY_FULLSCREEN, NULL, FULLSCREEN_KEY_TEXT,
-             FULLSCREEN_KEY_LONGTEXT, VLC_FALSE );
+    add_key( "key-toggle-fullscreen", KEY_TOGGLE_FULLSCREEN, NULL, TOGGLE_FULLSCREEN_KEY_TEXT,
+             TOGGLE_FULLSCREEN_KEY_LONGTEXT, VLC_FALSE );
+       add_deprecated( "key-fullscreen", VLC_FALSE ); /*deprecated since 0.9.0 */
+    add_key( "key-leave-fullscreen", KEY_LEAVE_FULLSCREEN, NULL, LEAVE_FULLSCREEN_KEY_TEXT,
+             LEAVE_FULLSCREEN_KEY_LONGTEXT, VLC_FALSE );
     add_key( "key-play-pause", KEY_PLAY_PAUSE, NULL, PLAY_PAUSE_KEY_TEXT,
              PLAY_PAUSE_KEY_LONGTEXT, VLC_FALSE );
     add_key( "key-pause", KEY_PAUSE, NULL, PAUSE_KEY_TEXT,
@@ -2071,6 +2087,8 @@ vlc_module_begin();
              ZOOM_KEY_TEXT, ZOOM_KEY_LONGTEXT, VLC_TRUE );
     add_key( "key-unzoom", KEY_UNZOOM, NULL,
              UNZOOM_KEY_TEXT, UNZOOM_KEY_LONGTEXT, VLC_TRUE );
+    add_key( "key-wallpaper", KEY_WALLPAPER, NULL, WALLPAPER_KEY_TEXT,
+             WALLPAPER_KEY_LONGTEXT, VLC_FALSE );
 
     add_key( "key-crop-top", KEY_CROP_TOP, NULL,
              CROP_TOP_KEY_TEXT, CROP_TOP_KEY_LONGTEXT, VLC_TRUE );
@@ -2178,17 +2196,17 @@ vlc_module_end();
 
 const module_config_t libvlc_config[] =
 {
-    { 
+    {
         .i_type   = CONFIG_ITEM_BOOL,
         .psz_name = "help",
         .i_short  = 'h',
-        .psz_text = N_("print help for VLC (can be combined with --advanced)")
+        .psz_text = N_("print help for VLC (can be combined with --advanced and --help-verbose)")
     },
     {
         .i_type   = CONFIG_ITEM_BOOL,
         .psz_name = "longhelp",
         .i_short  = 'H',
-        .psz_text = N_("print help for VLC and all its modules (can be combined with --advanced)")
+        .psz_text = N_("print help for VLC and all its modules (can be combined with --advanced and --help-verbose)")
     },
     {
         .i_type   = CONFIG_ITEM_BOOL,
@@ -2206,11 +2224,16 @@ const module_config_t libvlc_config[] =
         .i_short  = 'l',
         .psz_text = N_("print a list of available modules")
     },
+    {
+        .i_type   = CONFIG_ITEM_BOOL,
+        .psz_name = "list-verbose",
+        .psz_text = N_("print a list of available modules with extra detail")
+    },
     {
         .i_type   = CONFIG_ITEM_STRING,
         .psz_name = "module",
         .i_short  = 'p',
-        .psz_text = N_("print help on a specific module (can be combined with --advanced)")
+        .psz_text = N_("print help on a specific module (can be combined with --advanced and --help-verbose)")
     },
     {
         .i_type   = CONFIG_ITEM_BOOL,
@@ -2270,7 +2293,8 @@ const struct hotkey libvlc_hotkeys[] =
     { "key-next", ACTIONID_NEXT, 0, 0, 0, 0 },
     { "key-faster", ACTIONID_FASTER, 0, 0, 0, 0 },
     { "key-slower", ACTIONID_SLOWER, 0, 0, 0, 0 },
-    { "key-fullscreen", ACTIONID_FULLSCREEN, 0, 0, 0, 0 },
+    { "key-toggle-fullscreen", ACTIONID_TOGGLE_FULLSCREEN, 0, 0, 0, 0 },
+    { "key-leave-fullscreen", ACTIONID_LEAVE_FULLSCREEN, 0, 0, 0, 0 },
     { "key-vol-up", ACTIONID_VOL_UP, 0, 0, 0, 0 },
     { "key-vol-down", ACTIONID_VOL_DOWN, 0, 0, 0, 0 },
     { "key-vol-mute", ACTIONID_VOL_MUTE, 0, 0, 0, 0 },
@@ -2332,6 +2356,7 @@ const struct hotkey libvlc_hotkeys[] =
     { "key-dump", ACTIONID_DUMP, 0, 0, 0, 0 },
     { "key-random", ACTIONID_RANDOM, 0, 0, 0, 0 },
     { "key-loop", ACTIONID_LOOP, 0, 0, 0, 0 },
+    { "key-wallpaper", ACTIONID_WALLPAPER, 0, 0, 0, 0 },
     { NULL, 0, 0, 0, 0, 0 }
 };