mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 19:30:05 +00:00
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>
This commit is contained in:
parent
96d2178325
commit
1013d8dd69
@ -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
|
||||
|
@ -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,
|
||||
|
10
ffserver.c
10
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);
|
||||
|
Loading…
Reference in New Issue
Block a user