正在显示
2 个修改的文件
包含
17 行增加
和
3 行删除
| @@ -41,7 +41,8 @@ function remote_check() | @@ -41,7 +41,8 @@ function remote_check() | ||
| 41 | fi | 41 | fi |
| 42 | ok_msg "remote $remote ok, url is $url" | 42 | ok_msg "remote $remote ok, url is $url" |
| 43 | } | 43 | } |
| 44 | -remote_check origin git@github.com:winlinvip/simple-rtmp-server.git | 44 | +remote_check origin git@github.com:simple-rtmp-server/srs.git |
| 45 | +remote_check srs.winlin git@github.com:winlinvip/simple-rtmp-server.git | ||
| 45 | remote_check srs.csdn git@code.csdn.net:winlinvip/srs-csdn.git | 46 | remote_check srs.csdn git@code.csdn.net:winlinvip/srs-csdn.git |
| 46 | remote_check srs.oschina git@git.oschina.net:winlinvip/srs.oschina.git | 47 | remote_check srs.oschina git@git.oschina.net:winlinvip/srs.oschina.git |
| 47 | remote_check srs.gitlab git@gitlab.com:winlinvip/srs-gitlab.git | 48 | remote_check srs.gitlab git@gitlab.com:winlinvip/srs-gitlab.git |
| @@ -63,11 +64,13 @@ function sync_push() | @@ -63,11 +64,13 @@ function sync_push() | ||
| 63 | } | 64 | } |
| 64 | 65 | ||
| 65 | sync_push --all origin | 66 | sync_push --all origin |
| 67 | +sync_push --all srs.winlin | ||
| 66 | sync_push --all srs.csdn | 68 | sync_push --all srs.csdn |
| 67 | sync_push --all srs.oschina | 69 | sync_push --all srs.oschina |
| 68 | sync_push --all srs.gitlab | 70 | sync_push --all srs.gitlab |
| 69 | ok_msg "push refs ok" | 71 | ok_msg "push refs ok" |
| 70 | 72 | ||
| 73 | +sync_push --tags srs.winlin | ||
| 71 | sync_push --tags srs.csdn | 74 | sync_push --tags srs.csdn |
| 72 | sync_push --tags srs.oschina | 75 | sync_push --tags srs.oschina |
| 73 | sync_push --tags srs.gitlab | 76 | sync_push --tags srs.gitlab |
| @@ -965,7 +965,7 @@ int SrsHttpServer::hls_update_m3u8(SrsRequest* r, string m3u8) | @@ -965,7 +965,7 @@ int SrsHttpServer::hls_update_m3u8(SrsRequest* r, string m3u8) | ||
| 965 | { | 965 | { |
| 966 | int ret = ERROR_SUCCESS; | 966 | int ret = ERROR_SUCCESS; |
| 967 | 967 | ||
| 968 | - std::string mount = m3u8; | 968 | + std::string mount; |
| 969 | 969 | ||
| 970 | std::string sid = r->get_stream_url(); | 970 | std::string sid = r->get_stream_url(); |
| 971 | SrsHlsEntry* entry = NULL; | 971 | SrsHlsEntry* entry = NULL; |
| @@ -980,8 +980,17 @@ int SrsHttpServer::hls_update_m3u8(SrsRequest* r, string m3u8) | @@ -980,8 +980,17 @@ int SrsHttpServer::hls_update_m3u8(SrsRequest* r, string m3u8) | ||
| 980 | SrsHlsEntry* tmpl = thls[r->vhost]; | 980 | SrsHlsEntry* tmpl = thls[r->vhost]; |
| 981 | 981 | ||
| 982 | entry = new SrsHlsEntry(); | 982 | entry = new SrsHlsEntry(); |
| 983 | - entry->mount = tmpl->mount; | 983 | + mount = tmpl->mount; |
| 984 | 984 | ||
| 985 | + // replace the vhost variable | ||
| 986 | + mount = srs_string_replace(mount, "[vhost]", r->vhost); | ||
| 987 | + mount = srs_string_replace(mount, "[app]", r->app); | ||
| 988 | + mount = srs_string_replace(mount, "[stream]", r->stream); | ||
| 989 | + | ||
| 990 | + // remove the default vhost mount | ||
| 991 | + mount = srs_string_replace(mount, SRS_CONSTS_RTMP_DEFAULT_VHOST"/", "/"); | ||
| 992 | + | ||
| 993 | + entry->mount = mount; | ||
| 985 | shls[sid] = entry; | 994 | shls[sid] = entry; |
| 986 | 995 | ||
| 987 | if (entry->streams.find(mount) == entry->streams.end()) { | 996 | if (entry->streams.find(mount) == entry->streams.end()) { |
| @@ -997,6 +1006,8 @@ int SrsHttpServer::hls_update_m3u8(SrsRequest* r, string m3u8) | @@ -997,6 +1006,8 @@ int SrsHttpServer::hls_update_m3u8(SrsRequest* r, string m3u8) | ||
| 997 | entry = shls[sid]; | 1006 | entry = shls[sid]; |
| 998 | } | 1007 | } |
| 999 | 1008 | ||
| 1009 | + mount = entry->mount; | ||
| 1010 | + | ||
| 1000 | // update the m3u8 stream. | 1011 | // update the m3u8 stream. |
| 1001 | SrsHlsM3u8Stream* hms = dynamic_cast<SrsHlsM3u8Stream*>(entry->streams[mount]); | 1012 | SrsHlsM3u8Stream* hms = dynamic_cast<SrsHlsM3u8Stream*>(entry->streams[mount]); |
| 1002 | if (hms) { | 1013 | if (hms) { |
-
请 注册 或 登录 后发表评论