Skip to content

Commit

Permalink
fix ossrs#324, support hstrs(http stream trigger rtmp source) edge mo…
Browse files Browse the repository at this point in the history
…de. 2.0.140.
  • Loading branch information
winlinvip committed Mar 14, 2015
1 parent 27cb62b commit 320f45c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
14 changes: 13 additions & 1 deletion trunk/src/app/srs_app_http_conn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/src/core/srs_core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 320f45c

Please sign in to comment.