]> git.sesse.net Git - vlc/blobdiff - src/libvlc-module.c
block_t: repack
[vlc] / src / libvlc-module.c
index be9cd7821838c624f38565ec0826da27e32aa453..455c25fff13db150ba9592872b84eda5f6869a7f 100644 (file)
@@ -38,6 +38,7 @@
 #include <vlc_cpu.h>
 #include <vlc_aout_intf.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"
@@ -202,7 +203,7 @@ static const char *const ppsz_snap_formats[] =
 #define VERBOSE_OBJECTS_LONGTEXT N_( \
     "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 " \
+    "'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.")
@@ -651,10 +652,6 @@ static const int pi_clock_values[] = { -1, 0, 1 };
 static const char *const ppsz_clock_descriptions[] =
 { N_("Default"), N_("Disable"), N_("Enable") };
 
-#define SERVER_PORT_TEXT N_("UDP port")
-#define SERVER_PORT_LONGTEXT N_( \
-    "This is the default port used for UDP streams. Default is 1234." )
-
 #define MTU_TEXT N_("MTU of the network interface")
 #define MTU_LONGTEXT N_( \
     "This is the maximum application-layer packet size that can be " \
@@ -672,11 +669,6 @@ static const char *const ppsz_clock_descriptions[] =
 #define MIFACE_LONGTEXT N_( \
     "Default multicast interface. This overrides the routing table.")
 
-#define MIFACE_ADDR_TEXT N_("IPv4 multicast output interface address")
-#define MIFACE_ADDR_LONGTEXT N_( \
-    "IPv4 address for the default multicast interface. This overrides " \
-    "the routing table.")
-
 #define DSCP_TEXT N_("DiffServ Code Point")
 #define DSCP_LONGTEXT N_("Differentiated Services Code Point " \
     "for outgoing UDP streams (or IPv4 Type Of Service, " \
@@ -893,6 +885,52 @@ static const char *const ppsz_clock_descriptions[] =
 #define TIMEOUT_LONGTEXT N_( \
     "Default TCP connection timeout (in milliseconds). " )
 
+#define HTTP_HOST_TEXT N_( "HTTP server address" )
+#define RTSP_HOST_TEXT N_( "RTSP server address" )
+#define HOST_LONGTEXT N_( \
+    "By default, the server will listen on any local IP address. " \
+    "Specify an IP address (e.g. ::1 or 127.0.0.1) or a host name " \
+    "(e.g. localhost) to restrict them to a specific network interface." )
+
+#define HTTP_PORT_TEXT N_( "HTTP server port" )
+#define HTTP_PORT_LONGTEXT N_( \
+    "The HTTP server will listen on this TCP port. " \
+    "The standard HTTP port number is 80. " \
+    "However allocation of port numbers below 1025 is usually restricted " \
+    "by the operating system." )
+
+#define HTTPS_PORT_TEXT N_( "HTTPS server port" )
+#define HTTPS_PORT_LONGTEXT N_( \
+    "The HTTPS server will listen on this TCP port. " \
+    "The standard HTTPS port number is 443. " \
+    "However allocation of port numbers below 1025 is usually restricted " \
+    "by the operating system." )
+
+#define RTSP_PORT_TEXT N_( "RTSP server port" )
+#define RTSP_PORT_LONGTEXT N_( \
+    "The HTTPS server will listen on this TCP port. " \
+    "The standard RTSP port number is 554. " \
+    "However allocation of port numbers below 1025 is usually restricted " \
+    "by the operating system." )
+
+#define HTTP_CERT_TEXT N_("HTTP/TLS server certificate")
+#define CERT_LONGTEXT N_( \
+   "This X.509 certicate file (PEM format) is used for server-side TLS." )
+
+#define HTTP_KEY_TEXT N_("HTTP/TLS server private key")
+#define KEY_LONGTEXT N_( \
+   "This private key file (PEM format) is used for server-side TLS.")
+
+#define HTTP_CA_TEXT N_("HTTP/TLS Certificate Authority")
+#define CA_LONGTEXT N_( \
+   "This X.509 certificate file (PEM format) can optionally be used " \
+   "to authenticate remote clients in TLS sessions.")
+
+#define HTTP_CRL_TEXT N_("HTTP/TLS Certificate Revocation List")
+#define CRL_LONGTEXT N_( \
+   "This file countains an optional CRL to prevent remove clients " \
+   "from using revoked certificates in TLS sessions.")
+
 #define SOCKS_SERVER_TEXT N_("SOCKS server")
 #define SOCKS_SERVER_LONGTEXT N_( \
     "SOCKS proxy server to use. This must be of the form " \
@@ -1038,56 +1076,6 @@ static const char *const ppsz_clock_descriptions[] =
     "These options allow you to enable special CPU optimizations. " \
     "You should always leave all these enabled." )
 
-#define MMX_TEXT N_("Enable CPU MMX support")
-#define MMX_LONGTEXT N_( \
-    "If your processor supports the MMX instructions set, VLC can take " \
-    "advantage of them.")
-
-#define THREE_DN_TEXT N_("Enable CPU 3D Now! support")
-#define THREE_DN_LONGTEXT N_( \
-    "If your processor supports the 3D Now! instructions set, VLC can take " \
-    "advantage of them.")
-
-#define MMXEXT_TEXT N_("Enable CPU MMX EXT support")
-#define MMXEXT_LONGTEXT N_( \
-    "If your processor supports the MMX EXT instructions set, VLC can take " \
-    "advantage of them.")
-
-#define SSE_TEXT N_("Enable CPU SSE support")
-#define SSE_LONGTEXT N_( \
-    "If your processor supports the SSE instructions set, VLC can take " \
-    "advantage of them.")
-
-#define SSE2_TEXT N_("Enable CPU SSE2 support")
-#define SSE2_LONGTEXT N_( \
-    "If your processor supports the SSE2 instructions set, VLC can take " \
-    "advantage of them.")
-
-#define SSE3_TEXT N_("Enable CPU SSE3 support")
-#define SSE3_LONGTEXT N_( \
-    "If your processor supports the SSE3 instructions set, VLC can take " \
-    "advantage of them.")
-
-#define SSSE3_TEXT N_("Enable CPU SSSE3 support")
-#define SSSE3_LONGTEXT N_( \
-    "If your processor supports the SSSE3 instructions set, VLC can take " \
-    "advantage of them.")
-
-#define SSE4_1_TEXT N_("Enable CPU SSE4.1 support")
-#define SSE4_1_LONGTEXT N_( \
-    "If your processor supports the SSE4.1 instructions set, VLC can take " \
-    "advantage of them.")
-
-#define SSE4_2_TEXT N_("Enable CPU SSE4.2 support")
-#define SSE4_2_LONGTEXT N_( \
-    "If your processor supports the SSE4.2 instructions set, VLC can take " \
-    "advantage of them.")
-
-#define ALTIVEC_TEXT N_("Enable CPU AltiVec support")
-#define ALTIVEC_LONGTEXT N_( \
-    "If your processor supports the AltiVec instructions set, VLC can take " \
-    "advantage of them.")
-
 // DEPRECATED
 #define MISC_CAT_LONGTEXT N_( \
     "These options allow you to select default modules. Leave these " \
@@ -1534,37 +1522,6 @@ static const char *const ppsz_albumart_descriptions[] =
 
 #define AUDI_DEVICE_CYCLE_KEY_TEXT N_("Cycle through audio devices")
 #define AUDI_DEVICE_CYCLE_KEY_LONGTEXT N_("Cycle through available audio devices")
-const char vlc_usage[] = N_(
-    "Usage: %s [options] [stream] ..."
-    "\nYou can specify multiple streams on the commandline. They will be enqueued in the playlist."
-    "\nThe first item specified will be played first."
-    "\n"
-    "\nOptions-styles:"
-    "\n  --option  A global option that is set for the duration of the program."
-    "\n   -option  A single letter version of a global --option."
-    "\n   :option  An option that only applies to the stream directly before it"
-    "\n            and that overrides previous settings."
-    "\n"
-    "\nStream MRL syntax:"
-    "\n  [[access][/demux]://]URL[@[title][:chapter][-[title][:chapter]]] [:option=value ...]"
-    "\n"
-    "\n  Many of the global --options can also be used as MRL specific :options."
-    "\n  Multiple :option=value pairs can be specified."
-    "\n"
-    "\nURL syntax:"
-    "\n  [file://]filename              Plain media file"
-    "\n  http://ip:port/file            HTTP URL"
-    "\n  ftp://ip:port/file             FTP URL"
-    "\n  mms://ip:port/file             MMS URL"
-    "\n  screen://                      Screen capture"
-    "\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 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");
 
 /*
  * Quick usage guide for the configuration options:
@@ -1598,8 +1555,7 @@ vlc_module_begin ()
     add_integer_with_range( "volume-step", AOUT_VOLUME_STEP, 0,
                             AOUT_VOLUME_MAX, VOLUME_STEP_TEXT,
                             VOLUME_STEP_LONGTEXT, true )
-    add_integer( "aout-rate", 0, AOUT_RATE_TEXT,
-                 AOUT_RATE_LONGTEXT, true )
+    add_obsolete_integer( "aout-rate" ) /* since 1.2.0 */
 #if HAVE_FPU && !defined( __APPLE__ )
     add_bool( "hq-resampling", 1, AOUT_RESAMP_TEXT,
               AOUT_RESAMP_LONGTEXT, true )
@@ -1879,14 +1835,29 @@ vlc_module_begin ()
 
     set_section( N_( "Network settings" ), NULL )
 
-    add_integer( "server-port", 1234,
-                 SERVER_PORT_TEXT, SERVER_PORT_LONGTEXT, false )
     add_integer( "mtu", MTU_DEFAULT, MTU_TEXT, MTU_LONGTEXT, true )
     add_obsolete_bool( "ipv6" ) /* since 1.2.0 */
     add_obsolete_bool( "ipv4" ) /* since 1.2.0 */
     add_integer( "ipv4-timeout", 5 * 1000, TIMEOUT_TEXT,
                  TIMEOUT_LONGTEXT, true )
 
+    add_string( "http-host", NULL, HTTP_HOST_TEXT, HOST_LONGTEXT, true )
+    add_integer( "http-port", 8080, HTTP_PORT_TEXT, HTTP_PORT_LONGTEXT, true )
+        change_integer_range( 1, 65535 )
+    add_integer( "https-port", 8443, HTTPS_PORT_TEXT, HTTPS_PORT_LONGTEXT, true )
+        change_integer_range( 1, 65535 )
+    add_string( "rtsp-host", NULL, RTSP_HOST_TEXT, HOST_LONGTEXT, true )
+    add_integer( "rtsp-port", 8554, RTSP_PORT_TEXT, RTSP_PORT_LONGTEXT, true )
+        change_integer_range( 1, 65535 )
+    add_loadfile( "http-cert", NULL, HTTP_CERT_TEXT, CERT_LONGTEXT, true )
+        add_deprecated_alias( "sout-http-cert" ) /* since 1.2.0 */
+    add_loadfile( "http-key", NULL, HTTP_KEY_TEXT, KEY_LONGTEXT, true )
+        add_deprecated_alias( "sout-http-key" ) /* since 1.2.0 */
+    add_loadfile( "http-ca", NULL, HTTP_CA_TEXT, CA_LONGTEXT, true )
+        add_deprecated_alias( "sout-http-ca" ) /* since 1.2.0 */
+    add_loadfile( "http-crl", NULL, HTTP_CRL_TEXT, CRL_LONGTEXT, true )
+        add_deprecated_alias( "sout-http-crl" ) /* since 1.2.0 */
+
     set_section( N_( "Socks proxy") , NULL )
     add_string( "socks", NULL,
                  SOCKS_SERVER_TEXT, SOCKS_SERVER_LONGTEXT, true )
@@ -2006,7 +1977,7 @@ vlc_module_begin ()
                 ACCESS_OUTPUT_TEXT, ACCESS_OUTPUT_LONGTEXT, true )
     add_integer( "ttl", -1, TTL_TEXT, TTL_LONGTEXT, true )
     add_string( "miface", NULL, MIFACE_TEXT, MIFACE_LONGTEXT, true )
-    add_string( "miface-addr", NULL, MIFACE_ADDR_TEXT, MIFACE_ADDR_LONGTEXT, true )
+    add_obsolete_string( "miface-addr" )
     add_integer( "dscp", 0, DSCP_TEXT, DSCP_LONGTEXT, true )
 
     set_subcategory( SUBCAT_SOUT_PACKETIZER )
@@ -2025,18 +1996,18 @@ vlc_module_begin ()
     add_category_hint( N_("CPU"), CPU_CAT_LONGTEXT, true )
     add_obsolete_bool( "fpu" )
 #if defined( __i386__ ) || defined( __x86_64__ )
-    add_bool( "mmx", 1, MMX_TEXT, MMX_LONGTEXT, true )
-    add_bool( "3dn", 1, THREE_DN_TEXT, THREE_DN_LONGTEXT, true )
-    add_bool( "mmxext", 1, MMXEXT_TEXT, MMXEXT_LONGTEXT, true )
-    add_bool( "sse", 1, SSE_TEXT, SSE_LONGTEXT, true )
-    add_bool( "sse2", 1, SSE2_TEXT, SSE2_LONGTEXT, true )
-    add_bool( "sse3", 1, SSE3_TEXT, SSE3_LONGTEXT, true )
-    add_bool( "ssse3", 1, SSSE3_TEXT, SSSE3_LONGTEXT, true )
-    add_bool( "sse41", 1, SSE4_1_TEXT, SSE4_1_LONGTEXT, true )
-    add_bool( "sse42", 1, SSE4_2_TEXT, SSE4_2_LONGTEXT, true )
+    add_obsolete_bool( "mmx" ) /* since 1.2.0 */
+    add_obsolete_bool( "3dn" ) /* since 1.2.0 */
+    add_obsolete_bool( "mmxext" ) /* since 1.2.0 */
+    add_obsolete_bool( "sse" ) /* since 1.2.0 */
+    add_obsolete_bool( "sse2" ) /* since 1.2.0 */
+    add_obsolete_bool( "sse3" ) /* since 1.2.0 */
+    add_obsolete_bool( "ssse3" ) /* since 1.2.0 */
+    add_obsolete_bool( "sse41" ) /* since 1.2.0 */
+    add_obsolete_bool( "sse42" ) /* since 1.2.0 */
 #endif
 #if defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc64__ )
-    add_bool( "altivec", 1, ALTIVEC_TEXT, ALTIVEC_LONGTEXT, true )
+    add_obsolete_bool( "altivec" ) /* since 1.2.0 */
 #endif
 
 /* Misc options */
@@ -2755,7 +2726,6 @@ vlc_module_begin ()
     /* add_usage_hint( PLAYLIST_USAGE ) */
 
     set_description( N_("main program") )
-    set_capability( "main", 100 )
 vlc_module_end ()
 
 /*****************************************************************************