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

Reynaldo H. Verdejo Pinochet r.verdejo at sisa.samsung.com
Mon Aug 18 04:58:45 CEST 2014


Pushed as 1013d8dd6967f1e776c08dc1, Thanks.

On 08/02/2014 10:40 AM, Stefano Sabatini wrote:
> The new option names are more explicit.
> ---
>   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 00153b4..75049c1 100644
> --- a/ffserver.c
> +++ b/ffserver.c
> @@ -4079,14 +4079,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);
>


-- 
Reynaldo H. Verdejo Pinochet
Sr. Multimedia Engineer, Open Source Group
Samsung Research America - Silicon Valley


More information about the ffmpeg-devel mailing list