mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Merge branch '2.0release' into develop
This commit is contained in:
commit
9c716d4791
2 changed files with 15 additions and 24 deletions
4
trunk/configure
vendored
4
trunk/configure
vendored
|
@ -167,7 +167,7 @@ PROTOCOL_OBJS="${MODULE_OBJS[@]}"
|
|||
if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
|
||||
MODULE_ID="APP"
|
||||
MODULE_DEPENDS=("CORE" "KERNEL" "PROTOCOL")
|
||||
ModuleLibIncs=(${LibSTRoot} ${LibHttpParserRoot} ${SRS_OBJS_DIR})
|
||||
ModuleLibIncs=(${LibSTRoot} ${LibHttpParserRoot} ${LibSSLRoot} ${SRS_OBJS_DIR})
|
||||
MODULE_FILES=("srs_app_server" "srs_app_conn" "srs_app_rtmp_conn" "srs_app_source"
|
||||
"srs_app_refer" "srs_app_hls" "srs_app_forward" "srs_app_encoder" "srs_app_http_stream"
|
||||
"srs_app_thread" "srs_app_bandwidth" "srs_app_st" "srs_app_log" "srs_app_config"
|
||||
|
@ -200,7 +200,7 @@ LIBS_OBJS="${MODULE_OBJS[@]}"
|
|||
if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
|
||||
MODULE_ID="MAIN"
|
||||
MODULE_DEPENDS=("CORE" "KERNEL" "PROTOCOL" "APP")
|
||||
ModuleLibIncs=(${LibSTRoot} ${SRS_OBJS_DIR} ${LibGperfRoot} ${LibHttpParserRoot})
|
||||
ModuleLibIncs=(${LibSTRoot} ${SRS_OBJS_DIR} ${LibGperfRoot} ${LibHttpParserRoot} ${LibSSLRoot})
|
||||
MODULE_FILES=("srs_main_server" "srs_main_ingest_hls")
|
||||
# add each modules for main
|
||||
for SRS_MODULE in ${SRS_MODULES[*]}; do
|
||||
|
|
35
trunk/src/app/srs_app_rtmp_conn.cpp
Normal file → Executable file
35
trunk/src/app/srs_app_rtmp_conn.cpp
Normal file → Executable file
|
@ -455,14 +455,6 @@ int SrsRtmpConn::stream_service_cycle()
|
|||
case SrsRtmpConnPlay: {
|
||||
srs_verbose("start to play stream %s.", req->stream.c_str());
|
||||
|
||||
if (vhost_is_edge) {
|
||||
// notice edge to start for the first client.
|
||||
if ((ret = source->on_edge_start_play()) != ERROR_SUCCESS) {
|
||||
srs_error("notice edge start play stream failed. ret=%d", ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
// response connection start play
|
||||
if ((ret = rtmp->start_play(res->stream_id)) != ERROR_SUCCESS) {
|
||||
srs_error("start to play stream failed. ret=%d", ret);
|
||||
|
@ -482,13 +474,6 @@ int SrsRtmpConn::stream_service_cycle()
|
|||
case SrsRtmpConnFMLEPublish: {
|
||||
srs_verbose("FMLE start to publish stream %s.", req->stream.c_str());
|
||||
|
||||
if (vhost_is_edge) {
|
||||
if ((ret = source->on_edge_start_publish()) != ERROR_SUCCESS) {
|
||||
srs_error("notice edge start publish stream failed. ret=%d", ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
if ((ret = rtmp->start_fmle_publish(res->stream_id)) != ERROR_SUCCESS) {
|
||||
srs_error("start to publish stream failed. ret=%d", ret);
|
||||
return ret;
|
||||
|
@ -511,13 +496,6 @@ int SrsRtmpConn::stream_service_cycle()
|
|||
case SrsRtmpConnFlashPublish: {
|
||||
srs_verbose("flash start to publish stream %s.", req->stream.c_str());
|
||||
|
||||
if (vhost_is_edge) {
|
||||
if ((ret = source->on_edge_start_publish()) != ERROR_SUCCESS) {
|
||||
srs_error("notice edge start publish stream failed. ret=%d", ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
if ((ret = rtmp->start_flash_publish(res->stream_id)) != ERROR_SUCCESS) {
|
||||
srs_error("flash start to publish stream failed. ret=%d", ret);
|
||||
return ret;
|
||||
|
@ -596,6 +574,14 @@ int SrsRtmpConn::playing(SrsSource* source)
|
|||
}
|
||||
SrsAutoFree(SrsConsumer, consumer);
|
||||
srs_verbose("consumer created success.");
|
||||
|
||||
if (_srs_config->get_vhost_is_edge(req->vhost)) {
|
||||
// notice edge to start for the first client.
|
||||
if ((ret = source->on_edge_start_play()) != ERROR_SUCCESS) {
|
||||
srs_error("notice edge start play stream failed. ret=%d", ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
// use isolate thread to recv,
|
||||
// @see: https://github.com/simple-rtmp-server/srs/issues/217
|
||||
|
@ -874,6 +860,11 @@ int SrsRtmpConn::do_publishing(SrsSource* source, SrsPublishRecvThread* trd)
|
|||
return ret;
|
||||
}
|
||||
srs_verbose("hls on_publish success.");
|
||||
} else {
|
||||
if ((ret = source->on_edge_start_publish()) != ERROR_SUCCESS) {
|
||||
srs_error("notice edge start publish stream failed. ret=%d", ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
// start isolate recv thread.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue