diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2014-08-02 16:40:53 +0200 |
---|---|---|
committer | Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> | 2014-08-17 22:51:45 -0400 |
commit | 1013d8dd6967f1e776c08dc133ed6ae44ca3dc64 (patch) | |
tree | 4bc27ceb9353b8c674db8f94323eb252b7a3a824 | |
parent | 96d217832598da7001bc204706476dd1e37f377e (diff) | |
download | ffmpeg-1013d8dd6967f1e776c08dc133ed6ae44ca3dc64.tar.gz |
ffserver: deprecate Port and BindAddress options in favor of HTTPPort and HTTPBindAddress
The new option names are more explicit.
Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
-rw-r--r-- | doc/ffserver.conf | 4 | ||||
-rw-r--r-- | doc/ffserver.texi | 19 | ||||
-rw-r--r-- | ffserver.c | 10 |
3 files changed, 23 insertions, 10 deletions
diff --git a/doc/ffserver.conf b/doc/ffserver.conf index 094c093af2..b756961aa3 100644 --- a/doc/ffserver.conf +++ b/doc/ffserver.conf @@ -1,11 +1,11 @@ # Port on which the server is listening. You must select a different # port from your standard HTTP web server if it is running on the same # computer. -Port 8090 +HTTPPort 8090 # Address on which the server is bound. Only useful if you have # several network interfaces. -BindAddress 0.0.0.0 +HTTPBindAddress 0.0.0.0 # Number of simultaneous HTTP connections that can be handled. It has # to be defined *before* the MaxClients parameter, since it defines the diff --git a/doc/ffserver.texi b/doc/ffserver.texi index 2bf815223d..77273d22e1 100644 --- a/doc/ffserver.texi +++ b/doc/ffserver.texi @@ -66,7 +66,7 @@ http://@var{ffserver_ip_address}:@var{http_port}/@var{feed_name} where @var{ffserver_ip_address} is the IP address of the machine where @command{ffserver} is installed, @var{http_port} is the port number of -the HTTP server (configured through the @option{Port} option), and +the HTTP server (configured through the @option{HTTPPort} option), and @var{feed_name} is the name of the corresponding feed defined in the configuration file. @@ -101,7 +101,7 @@ http://@var{ffserver_ip_address}:@var{rtsp_port}/@var{stream_name}[@var{options} the configuration file. @var{options} is a list of options specified after the URL which affects how the stream is served by @command{ffserver}. @var{http_port} and @var{rtsp_port} are the HTTP -and RTSP ports configured with the options @var{Port} and +and RTSP ports configured with the options @var{HTTPPort} and @var{RTSPPort} respectively. In case the stream is associated to a feed, the encoding parameters @@ -352,20 +352,29 @@ allow everybody else. @section Global options @table @option +@item HTTPPort @var{port_number} @item Port @var{port_number} @item RTSPPort @var{port_number} -Set TCP port number on which the HTTP/RTSP server is listening. You -must select a different port from your standard HTTP web server if it -is running on the same computer. +@var{HTTPPort} sets the HTTP server listening TCP port number, +@var{RTSPPort} sets the RTSP server listening TCP port number. + +@var{Port} is the equivalent of @var{HTTPPort} and is deprecated. + +You must select a different port from your standard HTTP web server if +it is running on the same computer. If not specified, no corresponding server will be created. +@item HTTPBindAddress @var{ip_address} @item BindAddress @var{ip_address} @item RTSPBindAddress @var{ip_address} Set address on which the HTTP/RTSP server is bound. Only useful if you have several network interfaces. +@var{BindAddress} is the equivalent of @var{HTTPBindAddress} and is +deprecated. + @item MaxHTTPConnections @var{n} Set number of simultaneous HTTP connections that can be handled. It has to be defined @emph{before} the @option{MaxClients} parameter, diff --git a/ffserver.c b/ffserver.c index 8acc0401ae..57ebfeb3c5 100644 --- a/ffserver.c +++ b/ffserver.c @@ -4081,14 +4081,18 @@ static int parse_ffconfig(const char *filename) get_arg(cmd, sizeof(cmd), &p); - if (!av_strcasecmp(cmd, "Port")) { + if (!av_strcasecmp(cmd, "Port") || !av_strcasecmp(cmd, "HTTPPort")) { + if (!av_strcasecmp(cmd, "Port")) + WARNING("Port option is deprecated, use HTTPPort instead\n"); get_arg(arg, sizeof(arg), &p); val = atoi(arg); if (val < 1 || val > 65536) { - ERROR("Invalid_port: %s\n", arg); + ERROR("Invalid port: %s\n", arg); } my_http_addr.sin_port = htons(val); - } else if (!av_strcasecmp(cmd, "BindAddress")) { + } else if (!av_strcasecmp(cmd, "HTTPBindAddress") || !av_strcasecmp(cmd, "BindAddress")) { + if (!av_strcasecmp(cmd, "BindAddress")) + WARNING("BindAddress option is deprecated, use HTTPBindAddress instead\n"); get_arg(arg, sizeof(arg), &p); if (resolve_host(&my_http_addr.sin_addr, arg) != 0) { ERROR("%s:%d: Invalid host/IP address: %s\n", arg); |