[FFmpeg-cvslog] ffserver: deprecate Port and BindAddress options in favor of HTTPPort and HTTPBindAddress

Stefano Sabatini git at videolan.org
Mon Aug 18 04:53:00 CEST 2014


ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Sat Aug  2 16:40:53 2014 +0200| [1013d8dd6967f1e776c08dc133ed6ae44ca3dc64] | committer: Reynaldo H. Verdejo Pinochet

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 at osg.samsung.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1013d8dd6967f1e776c08dc133ed6ae44ca3dc64
---

 doc/ffserver.conf |    4 ++--
 doc/ffserver.texi |   19 ++++++++++++++-----
 ffserver.c        |   10 +++++++---
 3 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/doc/ffserver.conf b/doc/ffserver.conf
index 094c093..b756961 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 2bf8152..77273d2 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
+ at 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.
+ at var{HTTPPort} sets the HTTP server listening TCP port number,
+ at var{RTSPPort} sets the RTSP server listening TCP port number.
+
+ at 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.
 
+ at 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.
 
+ at 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 8acc040..57ebfeb 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);



More information about the ffmpeg-cvslog mailing list