]> git.sesse.net Git - vlc/blobdiff - src/libvlc-module.c
more libvlc_media_list_player tests
[vlc] / src / libvlc-module.c
index 5eb1fe74cec9e847edf783cec05cab9cf450e5f0..e01b822131118f748df7298ed1463208ac06683b 100644 (file)
 #define __BUILTIN__
 
 
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include <vlc/vlc.h>
 #include "libvlc.h"
 
@@ -517,10 +521,6 @@ static const char *ppsz_pos_descriptions[] =
     "subsystem, such as the DVD or VCD device, the network interface " \
     "settings or the subtitle channel.")
 
-#define FRANCE_LONGTEXT N_( \
-    "If you live in France, it is not allowed to workaround any Digital " \
-    "Restrictions Management measure." )
-
 #define CR_AVERAGE_TEXT N_("Clock reference average counter")
 #define CR_AVERAGE_LONGTEXT N_( \
     "When using the PVR input (or a very irregular source), you should " \
@@ -1224,6 +1224,12 @@ static const char *ppsz_pltree_descriptions[] = { N_("Default"), N_("Always"), N
 #define AUDIODELAY_UP_KEY_LONGTEXT N_("Select the key to increase the audio delay.")
 #define AUDIODELAY_DOWN_KEY_TEXT N_("Audio delay down")
 #define AUDIODELAY_DOWN_KEY_LONGTEXT N_("Select the key to decrease the audio delay.")
+
+#define ZOOM_QUARTER_KEY_TEXT N_("1:4 Quarter")
+#define ZOOM_HALF_KEY_TEXT N_("1:2 Half")
+#define ZOOM_ORIGINAL_KEY_TEXT N_("1:1 Original")
+#define ZOOM_DOUBLE_KEY_TEXT N_("2:1 Double")
+
 #define PLAY_BOOKMARK1_KEY_TEXT N_("Play playlist bookmark 1")
 #define PLAY_BOOKMARK2_KEY_TEXT N_("Play playlist bookmark 2")
 #define PLAY_BOOKMARK3_KEY_TEXT N_("Play playlist bookmark 3")
@@ -1370,10 +1376,10 @@ const char vlc_usage[] = N_(
     "\n  [dvd://][device][@raw_device]  DVD device"
     "\n  [vcd://][device]               VCD device"
     "\n  [cdda://][device]              Audio CD device"
-    "\n  udp:[[<source address>]@[<bind address>][:<bind port>]]"
+    "\n  udp://[[<source address>]@[<bind address>][:<bind port>]]"
     "\n                                 UDP stream sent by a streaming server"
-    "\n  vlc:pause:<seconds>            Special item to pause the playlist for a certain time"
-    "\n  vlc:quit                       Special item to quit VLC"
+    "\n  vlc://pause:<seconds>          Special item to pause the playlist for a certain time"
+    "\n  vlc://quit                     Special item to quit VLC"
     "\n");
 
 /*
@@ -1455,6 +1461,9 @@ vlc_module_begin();
         change_short('f');
     add_bool( "embedded-video", 1, NULL, EMBEDDED_TEXT, EMBEDDED_LONGTEXT,
               VLC_TRUE );
+#ifdef __APPLE__
+       add_deprecated_alias( "macosx-embedded" ); /*deprecated since 0.9.0 */
+#endif
     add_bool( "drop-late-frames", 1, NULL, DROP_LATE_FRAMES_TEXT,
               DROP_LATE_FRAMES_LONGTEXT, VLC_TRUE );
     /* Used in vout_synchro */
@@ -1481,6 +1490,7 @@ vlc_module_begin();
     set_section( N_("Snapshot") , NULL );
     add_directory( "snapshot-path", NULL, NULL, SNAP_PATH_TEXT,
                    SNAP_PATH_LONGTEXT, VLC_FALSE );
+        change_unsafe();
     add_string( "snapshot-prefix", "vlcsnap-", NULL, SNAP_PREFIX_TEXT,
                    SNAP_PREFIX_LONGTEXT, VLC_FALSE );
     add_string( "snapshot-format", "png", NULL, SNAP_FORMAT_TEXT,
@@ -1570,8 +1580,6 @@ vlc_module_begin();
     set_category( CAT_INPUT );
     set_subcategory( SUBCAT_INPUT_GENERAL );
 
-    add_bool( "france", VLC_FALSE, NULL, N_("France"), FRANCE_LONGTEXT, VLC_TRUE );
-
     set_section( N_( "Track settings" ), NULL );
     add_integer( "program", 0, NULL,
                  INPUT_PROGRAM_TEXT, INPUT_PROGRAM_LONGTEXT, VLC_TRUE );
@@ -1786,19 +1794,20 @@ vlc_module_begin();
     add_directory( "plugin-path", NULL, NULL, PLUGIN_PATH_TEXT,
                    PLUGIN_PATH_LONGTEXT, VLC_TRUE );
         change_need_restart();
+        change_unsafe();
 
     set_section( N_("Performance options"), NULL );
     add_bool( "minimize-threads", 0, NULL, MINIMIZE_THREADS_TEXT,
               MINIMIZE_THREADS_LONGTEXT, VLC_TRUE );
         change_need_restart();
 
-#if !defined(__APPLE__) && !defined(SYS_BEOS) && defined(PTHREAD_COND_T_IN_PTHREAD_H)
+#if !defined(__APPLE__) && !defined(SYS_BEOS) && defined(LIBVLC_USE_PTHREAD)
     add_bool( "rt-priority", VLC_FALSE, NULL, RT_PRIORITY_TEXT,
               RT_PRIORITY_LONGTEXT, VLC_TRUE );
         change_need_restart();
 #endif
 
-#if !defined(SYS_BEOS) && defined(PTHREAD_COND_T_IN_PTHREAD_H)
+#if !defined(SYS_BEOS) && defined(LIBVLC_USE_PTHREAD)
     add_integer( "rt-offset", 0, NULL, RT_OFFSET_TEXT,
                  RT_OFFSET_LONGTEXT, VLC_TRUE );
         change_need_restart();
@@ -1809,7 +1818,6 @@ vlc_module_begin();
               ONEINSTANCE_DBUS_LONGTEXT, VLC_TRUE );
     add_bool( "playlist-enqueue", 0, NULL, PLAYLISTENQUEUE_TEXT,
               PLAYLISTENQUEUE_LONGTEXT, VLC_TRUE );
-        change_unsaveable();
 
     add_bool( "inhibit", 1, NULL, INHIBIT_TEXT,
               INHIBIT_LONGTEXT, VLC_TRUE );
@@ -1906,7 +1914,7 @@ vlc_module_begin();
 #endif
 
     add_bool( "color", VLC_TRUE, NULL, COLOR_TEXT, COLOR_LONGTEXT, VLC_TRUE );
-    add_bool( "advanced", 0, NULL, ADVANCED_TEXT, ADVANCED_LONGTEXT,
+    add_bool( "advanced", VLC_FALSE, NULL, ADVANCED_TEXT, ADVANCED_LONGTEXT,
                     VLC_FALSE );
         change_need_restart();
     add_bool( "interact", VLC_TRUE, NULL, INTERACTION_TEXT,
@@ -2027,6 +2035,12 @@ vlc_module_begin();
 #   define KEY_CROP_RIGHT         KEY_MODIFIER_ALT|'l'
 #   define KEY_UNCROP_RIGHT       KEY_MODIFIER_ALT|KEY_MODIFIER_SHIFT|'l'
 
+/* the macosx-interface already has bindings */
+#   define KEY_ZOOM_QUARTER       KEY_UNSET 
+#   define KEY_ZOOM_HALF          KEY_UNSET
+#   define KEY_ZOOM_ORIGINAL      KEY_UNSET
+#   define KEY_ZOOM_DOUBLE        KEY_UNSET
+
 #   define KEY_SET_BOOKMARK1      KEY_MODIFIER_COMMAND|KEY_F1
 #   define KEY_SET_BOOKMARK2      KEY_MODIFIER_COMMAND|KEY_F2
 #   define KEY_SET_BOOKMARK3      KEY_MODIFIER_COMMAND|KEY_F3
@@ -2123,6 +2137,11 @@ vlc_module_begin();
 #   define KEY_CROP_RIGHT         KEY_MODIFIER_ALT|'l'
 #   define KEY_UNCROP_RIGHT       KEY_MODIFIER_ALT|KEY_MODIFIER_SHIFT|'l'
 
+#   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_SET_BOOKMARK1      KEY_MODIFIER_CTRL|KEY_F1
 #   define KEY_SET_BOOKMARK2      KEY_MODIFIER_CTRL|KEY_F2
 #   define KEY_SET_BOOKMARK3      KEY_MODIFIER_CTRL|KEY_F3
@@ -2301,6 +2320,16 @@ vlc_module_begin();
     add_key( "key-loop", KEY_LOOP, NULL,
              LOOP_KEY_TEXT, LOOP_KEY_LONGTEXT, VLC_FALSE );
 
+    set_section ( N_("Zoom" ), NULL );
+    add_key( "key-zoom-quarter",  KEY_ZOOM_QUARTER, NULL, 
+        ZOOM_QUARTER_KEY_TEXT,  NULL, VLC_FALSE );
+    add_key( "key-zoom-half",     KEY_ZOOM_HALF, NULL, 
+        ZOOM_HALF_KEY_TEXT,     NULL, VLC_FALSE );
+    add_key( "key-zoom-original", KEY_ZOOM_ORIGINAL, NULL, 
+        ZOOM_ORIGINAL_KEY_TEXT, NULL, VLC_FALSE );
+    add_key( "key-zoom-double",   KEY_ZOOM_DOUBLE, NULL, 
+        ZOOM_DOUBLE_KEY_TEXT,   NULL, VLC_FALSE );
+    
     set_section ( N_("Jump sizes" ), NULL );
     add_integer( "extrashort-jump-size", 3, NULL, JIEXTRASHORT_TEXT,
                                     JIEXTRASHORT_LONGTEXT, VLC_FALSE );
@@ -2377,84 +2406,85 @@ vlc_module_begin();
     add_string( "bookmark10", NULL, NULL,
               BOOKMARK10_TEXT, BOOKMARK_LONGTEXT, VLC_FALSE );
 
-    /* Usage (mainly useful for cmd line stuff) */
+#define HELP_TEXT \
+    N_("print help for VLC (can be combined with --advanced and " \
+       "--help-verbose)")
+#define LONGHELP_TEXT \
+    N_("print help for VLC and all its modules (can be combined with " \
+       "--advanced and --help-verbose)")
+#define HELP_VERBOSE_TEXT \
+    N_("ask for extra verbosity when displaying help")
+#define LIST_TEXT \
+    N_("print a list of available modules")
+#define LIST_VERBOSE_TEXT \
+    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)")
+#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 \
+    N_("use alternate config file")
+#define RESET_PLUGINS_CACHE_TEXT \
+    N_("resets the current plugins cache")
+#define VERSION_TEXT \
+    N_("print version information")
+    add_bool( "help", VLC_FALSE, NULL, HELP_TEXT, "", VLC_FALSE );
+        change_short( 'h' );
+        change_internal();
+        change_unsaveable();
+    add_bool( "longhelp", VLC_FALSE, NULL, LONGHELP_TEXT, "", VLC_FALSE );
+        change_short( 'H' );
+        change_internal();
+        change_unsaveable();
+    add_bool( "help-verbose", VLC_FALSE, NULL, HELP_VERBOSE_TEXT, "",
+              VLC_FALSE );
+        change_internal();
+        change_unsaveable();
+    add_bool( "list", VLC_FALSE, NULL, LIST_TEXT, "", VLC_FALSE );
+        change_short( 'l' );
+        change_internal();
+        change_unsaveable();
+    add_bool( "list-verbose", VLC_FALSE, NULL, LIST_VERBOSE_TEXT, "",
+              VLC_FALSE );
+        change_short( 'l' );
+        change_internal();
+        change_unsaveable();
+    add_string( "module", NULL, NULL, MODULE_TEXT, "", VLC_FALSE );
+        change_short( 'p' );
+        change_internal();
+        change_unsaveable();
+    add_bool( "save-config", VLC_FALSE, NULL, SAVE_CONFIG_TEXT, "",
+              VLC_FALSE );
+        change_internal();
+        change_unsaveable();
+    add_bool( "reset-config", VLC_FALSE, NULL, MODULE_TEXT, "", VLC_FALSE );
+        change_internal();
+        change_unsaveable();
+    add_bool( "reset-plugins-cache", VLC_FALSE, NULL,
+              RESET_PLUGINS_CACHE_TEXT, "", VLC_FALSE );
+        change_internal();
+        change_unsaveable();
+    add_bool( "version", VLC_FALSE, NULL, VERSION_TEXT, "", VLC_FALSE );
+        change_internal();
+        change_unsaveable();
+    add_string( "config", NULL, NULL, CONFIG_TEXT, "", VLC_FALSE );
+        change_internal();
+        change_unsaveable();
+    add_bool( "version", VLC_FALSE, NULL, VERSION_TEXT, "", VLC_FALSE );
+        change_internal();
+        change_unsaveable();
+
+   /* Usage (mainly useful for cmd line stuff) */
     /* add_usage_hint( PLAYLIST_USAGE ); */
 
     set_description( N_("main program") );
     set_capability( "main", 100 );
 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 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 and --help-verbose)")
-    },
-    {
-        .i_type   = CONFIG_ITEM_BOOL,
-        .psz_name = "advanced",
-        .psz_text = N_("print help for the advanced options")
-    },
-    {
-        .i_type   = CONFIG_ITEM_BOOL,
-        .psz_name = "help-verbose",
-        .psz_text = N_("ask for extra verbosity when displaying help")
-    },
-    {
-        .i_type   = CONFIG_ITEM_BOOL,
-        .psz_name = "list",
-        .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 and --help-verbose)")
-    },
-    {
-        .i_type   = CONFIG_ITEM_BOOL,
-        .psz_name = "save-config",
-        .psz_text = N_("save the current command line options in the config")
-    },
-    {
-        .i_type   = CONFIG_ITEM_BOOL,
-        .psz_name = "reset-config",
-        .psz_text = N_("reset the current config to the default values")
-    },
-    {
-        .i_type   = CONFIG_ITEM_STRING,
-        .psz_name = "config",
-        .psz_text = N_("use alternate config file")
-    },
-    {
-        .i_type   = CONFIG_ITEM_BOOL,
-        .psz_name = "reset-plugins-cache",
-        .psz_text = N_("resets the current plugins cache")
-    },
-    {
-        .i_type   = CONFIG_ITEM_BOOL,
-        .psz_name = "version",
-        .psz_text = N_("print version information")
-    }
-};
-
-const size_t libvlc_config_count = sizeof (libvlc_config)
-                                 / sizeof (libvlc_config[0]);
-
 /*****************************************************************************
  * End configuration.
  *****************************************************************************/
@@ -2520,6 +2550,10 @@ const struct hotkey libvlc_hotkeys[] =
     { "key-title-next", ACTIONID_TITLE_NEXT, 0, 0, 0, 0 },
     { "key-chapter-prev", ACTIONID_CHAPTER_PREV, 0, 0, 0, 0 },
     { "key-chapter-next", ACTIONID_CHAPTER_NEXT, 0, 0, 0, 0 },
+    { "key-zoom-quarter", ACTIONID_ZOOM_QUARTER, 0, 0, 0, 0 },
+    { "key-zoom-half", ACTIONID_ZOOM_HALF, 0, 0, 0, 0 },
+    { "key-zoom-original", ACTIONID_ZOOM_ORIGINAL, 0, 0, 0, 0 },
+    { "key-zoom-double", ACTIONID_ZOOM_DOUBLE, 0, 0, 0, 0 },
     { "key-set-bookmark1", ACTIONID_SET_BOOKMARK1, 0, 0, 0, 0 },
     { "key-set-bookmark2", ACTIONID_SET_BOOKMARK2, 0, 0, 0, 0 },
     { "key-set-bookmark3", ACTIONID_SET_BOOKMARK3, 0, 0, 0, 0 },