fix #324, support hstrs(http stream trigger rtmp source) edge mode. 2.0.140.
正在显示
3 个修改的文件
包含
15 行增加
和
2 行删除
| @@ -560,6 +560,7 @@ Supported operating systems and hardware: | @@ -560,6 +560,7 @@ Supported operating systems and hardware: | ||
| 560 | 560 | ||
| 561 | ### SRS 2.0 history | 561 | ### SRS 2.0 history |
| 562 | 562 | ||
| 563 | +* v2.0, 2015-03-14, fix [#324](https://github.com/winlinvip/simple-rtmp-server/issues/324), support hstrs(http stream trigger rtmp source) edge mode. 2.0.140. | ||
| 563 | * v2.0, 2015-03-14, for [#324](https://github.com/winlinvip/simple-rtmp-server/issues/324), support hstrs(http stream trigger rtmp source) origin mode. 2.0.139. | 564 | * v2.0, 2015-03-14, for [#324](https://github.com/winlinvip/simple-rtmp-server/issues/324), support hstrs(http stream trigger rtmp source) origin mode. 2.0.139. |
| 564 | * v2.0, 2015-03-12, fix [#328](https://github.com/winlinvip/simple-rtmp-server/issues/328), support adobe hds. 2.0.138. | 565 | * v2.0, 2015-03-12, fix [#328](https://github.com/winlinvip/simple-rtmp-server/issues/328), support adobe hds. 2.0.138. |
| 565 | * v2.0, 2015-03-10, fix [#155](https://github.com/winlinvip/simple-rtmp-server/issues/155), support osx(darwin) for mac pro. 2.0.137. | 566 | * v2.0, 2015-03-10, fix [#155](https://github.com/winlinvip/simple-rtmp-server/issues/155), support osx(darwin) for mac pro. 2.0.137. |
| @@ -1180,7 +1180,19 @@ int SrsHttpServer::hijack(SrsHttpMessage* request, ISrsHttpHandler** ph) | @@ -1180,7 +1180,19 @@ int SrsHttpServer::hijack(SrsHttpMessage* request, ISrsHttpHandler** ph) | ||
| 1180 | if (sflvs.find(sid) != sflvs.end()) { | 1180 | if (sflvs.find(sid) != sflvs.end()) { |
| 1181 | entry = sflvs[sid]; | 1181 | entry = sflvs[sid]; |
| 1182 | *ph = entry->stream; | 1182 | *ph = entry->stream; |
| 1183 | - srs_trace("hstrs sid=%s", sid.c_str()); | 1183 | + } |
| 1184 | + } | ||
| 1185 | + | ||
| 1186 | + // trigger edge to fetch from origin. | ||
| 1187 | + bool vhost_is_edge = _srs_config->get_vhost_is_edge(r->vhost); | ||
| 1188 | + srs_trace("hstrs: source url=%s, is_edge=%d, source_id=%d[%d]", | ||
| 1189 | + r->get_stream_url().c_str(), vhost_is_edge, s->source_id(), s->source_id()); | ||
| 1190 | + | ||
| 1191 | + if (vhost_is_edge) { | ||
| 1192 | + // notice edge to start for the first client. | ||
| 1193 | + if ((ret = s->on_edge_start_play()) != ERROR_SUCCESS) { | ||
| 1194 | + srs_error("notice edge start play stream failed. ret=%d", ret); | ||
| 1195 | + return ret; | ||
| 1184 | } | 1196 | } |
| 1185 | } | 1197 | } |
| 1186 | 1198 |
| @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 31 | // current release version | 31 | // current release version |
| 32 | #define VERSION_MAJOR 2 | 32 | #define VERSION_MAJOR 2 |
| 33 | #define VERSION_MINOR 0 | 33 | #define VERSION_MINOR 0 |
| 34 | -#define VERSION_REVISION 139 | 34 | +#define VERSION_REVISION 140 |
| 35 | 35 | ||
| 36 | // server info. | 36 | // server info. |
| 37 | #define RTMP_SIG_SRS_KEY "SRS" | 37 | #define RTMP_SIG_SRS_KEY "SRS" |
-
请 注册 或 登录 后发表评论