Skip to content

Commit e151539

Browse files
committed
[misc] update README files and fix a args processing bug.
1 parent c5c7a06 commit e151539

File tree

3 files changed

+44
-1
lines changed

3 files changed

+44
-1
lines changed

README.CN.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,22 @@
4646

4747
打开NGINX的源代码路径并执行:
4848

49+
## 将模块编译进[NGINX](http://nginx.org)
50+
4951
./configure --add-module=/path/to/nginx-http-flv-module
5052
make
5153
make install
5254

55+
## 将模块编译为动态模块
56+
57+
./configure --add-dynamic-module=/path/to/nginx-http-flv-module
58+
make
59+
make install
60+
61+
### 注意
62+
63+
如果将模块编译为动态模块,那么[NGINX](http://nginx.org)的版本号**必须**大于或者等于1.9.11。
64+
5365
# 使用方法
5466

5567
关于[nginx-rtmp-module](https://github.com/arut/nginx-rtmp-module)用法的详情,请参考[README.md](https://github.com/arut/nginx-rtmp-module/blob/master/README.md)
@@ -123,6 +135,11 @@
123135

124136
error_log logs/error.log error;
125137

138+
#如果此模块被编译为动态模块并且要使用与RTMP相关的功
139+
#能时,必须指定下面的配置项并且它必须位于events配置
140+
#项之前,否则NGINX启动时不会加载此模块或者加载失败
141+
#load_module modules/ngx_rtmp_module.so;
142+
126143
events {
127144
worker_connections 1024;
128145
}

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,22 @@ Uncompress them.
4646

4747
cd to NGINX source directory & run this:
4848

49+
## Compile the module into [NGINX](http://nginx.org)
50+
4951
./configure --add-module=/path/to/nginx-http-flv-module
5052
make
5153
make install
5254

55+
## Compile the module as a dynamic module
56+
57+
./configure --add-dynamic-module=/path/to/nginx-http-flv-module
58+
make
59+
make install
60+
61+
### Note
62+
63+
If the module is compiled as a dynamic module, the [NGINX](http://nginx.org) version **MUST** be equal to or greater than 1.9.11.
64+
5365
# Usage
5466

5567
For details about usages of [nginx-rtmp-module](https://github.com/arut/nginx-rtmp-module), please refer to [README.md](https://github.com/arut/nginx-rtmp-module/blob/master/README.md).
@@ -114,7 +126,7 @@ So the url of play using HTTP is:
114126

115127
# Note
116128

117-
Since some players don't support HTTP chunked transmission, it's better **NOT** to specify `chunked on;` in location where `flv_live on;` is specifed in this case, or play will fail.
129+
Since some players don't support HTTP chunked transmission, it's better **NOT** to specify `chunked on;` in location where `flv_live on;` is specified in this case, or play will fail.
118130

119131
# Example nginx.conf
120132

@@ -123,6 +135,12 @@ Since some players don't support HTTP chunked transmission, it's better **NOT**
123135

124136
error_log logs/error.log error;
125137

138+
#if the module is compiled as a dynamic module and features relevant
139+
#to RTMP are needed, the command below MUST be specified and MUST be
140+
#located before events directive, otherwise the module won't be loaded
141+
#or will be loaded unsuccessfully when NGINX is started
142+
#load_module modules/ngx_rtmp_module.so;
143+
126144
events {
127145
worker_connections 1024;
128146
}

ngx_http_flv_live_module.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -900,6 +900,14 @@ ngx_http_flv_live_preprocess(ngx_http_request_t *r,
900900

901901
ctx = ngx_http_get_module_ctx(r, ngx_http_flv_live_module);
902902

903+
/**
904+
* if requested args are escaped, for example, urls in the
905+
* history list of vlc for Android (or all mobile platforms)
906+
**/
907+
if (r->args.len == 0 && r->uri.len) {
908+
ngx_http_split_args(r, &r->uri, &r->args);
909+
}
910+
903911
if (ngx_http_arg(r, arg_port.data, arg_port.len, &port) != NGX_OK) {
904912
/* no port in args */
905913
port.data = (u_char *) "1935";

0 commit comments

Comments
 (0)