diff --git a/README.md b/README.md index c2bc75bb3..973158393 100755 --- a/README.md +++ b/README.md @@ -560,6 +560,7 @@ Supported operating systems and hardware: ### SRS 2.0 history +* 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. * 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. * v2.0, 2015-03-12, fix [#328](https://github.com/winlinvip/simple-rtmp-server/issues/328), support adobe hds. 2.0.138. * 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. diff --git a/trunk/src/app/srs_app_http_conn.cpp b/trunk/src/app/srs_app_http_conn.cpp index 2567719bd..6a3fef4e9 100644 --- a/trunk/src/app/srs_app_http_conn.cpp +++ b/trunk/src/app/srs_app_http_conn.cpp @@ -1180,7 +1180,19 @@ int SrsHttpServer::hijack(SrsHttpMessage* request, ISrsHttpHandler** ph) if (sflvs.find(sid) != sflvs.end()) { entry = sflvs[sid]; *ph = entry->stream; - srs_trace("hstrs sid=%s", sid.c_str()); + } + } + + // trigger edge to fetch from origin. + bool vhost_is_edge = _srs_config->get_vhost_is_edge(r->vhost); + srs_trace("hstrs: source url=%s, is_edge=%d, source_id=%d[%d]", + r->get_stream_url().c_str(), vhost_is_edge, s->source_id(), s->source_id()); + + if (vhost_is_edge) { + // notice edge to start for the first client. + if ((ret = s->on_edge_start_play()) != ERROR_SUCCESS) { + srs_error("notice edge start play stream failed. ret=%d", ret); + return ret; } } diff --git a/trunk/src/core/srs_core.hpp b/trunk/src/core/srs_core.hpp index 0c0c85d5d..6487b8637 100644 --- a/trunk/src/core/srs_core.hpp +++ b/trunk/src/core/srs_core.hpp @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // current release version #define VERSION_MAJOR 2 #define VERSION_MINOR 0 -#define VERSION_REVISION 139 +#define VERSION_REVISION 140 // server info. #define RTMP_SIG_SRS_KEY "SRS"