winlin

release v0.3, 11773 lines

@@ -35,17 +35,21 @@ url: rtmp://127.0.0.1:1935/live/livestream @@ -35,17 +35,21 @@ url: rtmp://127.0.0.1:1935/live/livestream
35 6. no multiple processes, single process only.<br/> 35 6. no multiple processes, single process only.<br/>
36 36
37 ### Releases 37 ### Releases
  38 +* 2013-11-04, [release v0.3](https://github.com/winlinvip/simple-rtmp-server/releases/tag/0.3), support vhost, refer, gop cache, listen multiple ports. 11773 lines.<br/>
38 * 2013-10-25, [release v0.2](https://github.com/winlinvip/simple-rtmp-server/releases/tag/0.2), support flash publish, h264 codec, time jitter correct. 10125 lines.<br/> 39 * 2013-10-25, [release v0.2](https://github.com/winlinvip/simple-rtmp-server/releases/tag/0.2), support flash publish, h264 codec, time jitter correct. 10125 lines.<br/>
39 * 2013-10-23, [release v0.1](https://github.com/winlinvip/simple-rtmp-server/releases/tag/0.1), support FMLE/FFMPEG publish, vp6 codec live streaming. 8287 lines.<br/> 40 * 2013-10-23, [release v0.1](https://github.com/winlinvip/simple-rtmp-server/releases/tag/0.1), support FMLE/FFMPEG publish, vp6 codec live streaming. 8287 lines.<br/>
40 * 2013-10-17, created.<br/> 41 * 2013-10-17, created.<br/>
41 42
42 ### Compare 43 ### Compare
  44 +* srs v0.3: 11773 lines.<br/>
43 * srs v0.2: 10125 lines.<br/> 45 * srs v0.2: 10125 lines.<br/>
44 * srs v0.1: 8287 lines.<br/> 46 * srs v0.1: 8287 lines.<br/>
45 * nginx-rtmp v1.0.4: 26786 lines <br/> 47 * nginx-rtmp v1.0.4: 26786 lines <br/>
46 * nginx v1.5.0: 139524 lines <br/> 48 * nginx v1.5.0: 139524 lines <br/>
47 49
48 ### History 50 ### History
  51 +* v0.3, 2013-11-04, v0.3 released. 11773 lines.
  52 +* v0.3, 2013-11-04, support refer/play-refer/publish-refer.
49 * v0.3, 2013-11-04, support vhosts specified config. 53 * v0.3, 2013-11-04, support vhosts specified config.
50 * v0.3, 2013-11-02, support listen multiple ports. 54 * v0.3, 2013-11-02, support listen multiple ports.
51 * v0.3, 2013-11-02, support config file in nginx-conf style. 55 * v0.3, 2013-11-02, support config file in nginx-conf style.
1 listen 1935 19350; 1 listen 1935 19350;
2 vhost __defaultVhost__ { 2 vhost __defaultVhost__ {
3 - enabled on;  
4 - gop_cache on;  
5 - #refer github.com github.io;  
6 - #refer_publish github.com github.io;  
7 - refer_play github.com github.io .com;  
8 } 3 }
9 -vhost winlinvip.github.com { 4 +vhost removed.vhost.com {
  5 + # whether the vhost is enabled.
  6 + # if off, all request access denied.
  7 + # default: on
  8 + enabled off;
  9 +}
  10 +vhost min.delay.com {
  11 + # whether cache the last gop.
  12 + # if on, cache the last gop and dispatch to client,
  13 + # to enable fast startup for client, client play immediately.
  14 + # if off, send the latest media data to client,
  15 + # client need to wait for the next Iframe to decode and show the video.
  16 + # set to off if requires min delay;
  17 + # set to on if requires client fast startup.
  18 + # default: on
10 gop_cache off; 19 gop_cache off;
11 } 20 }
  21 +vhost refer.anti_suck.com {
  22 + # the common refer for play and publish.
  23 + # if the page url of client not in the refer, access denied.
  24 + # if not specified this field, allow all.
  25 + # default: not specified.
  26 + refer github.com github.io;
  27 + # refer for publish clients specified.
  28 + # the common refer is not overrided by this.
  29 + # if not specified this field, allow all.
  30 + # default: not specified.
  31 + refer_publish github.com github.io;
  32 + # refer for play clients specified.
  33 + # the common refer is not overrided by this.
  34 + # if not specified this field, allow all.
  35 + # default: not specified.
  36 + refer_play github.com github.io;
  37 +}
12 38
@@ -215,7 +215,7 @@ int SrsClient::check_vhost() @@ -215,7 +215,7 @@ int SrsClient::check_vhost()
215 } 215 }
216 216
217 SrsConfDirective* conf = NULL; 217 SrsConfDirective* conf = NULL;
218 - if ((conf = vhost->get(RTMP_VHOST_ENABLED)) != NULL && conf->arg0() == "off") { 218 + if ((conf = vhost->get(RTMP_VHOST_ENABLED)) != NULL && conf->arg0() != "on") {
219 ret = ERROR_RTMP_VHOST_NOT_FOUND; 219 ret = ERROR_RTMP_VHOST_NOT_FOUND;
220 srs_error("vhost %s disabled. ret=%d", req->vhost.c_str(), ret); 220 srs_error("vhost %s disabled. ret=%d", req->vhost.c_str(), ret);
221 return ret; 221 return ret;