正在显示
1 个修改的文件
包含
8 行增加
和
5 行删除
trunk/src/app/srs_app_edge.cpp
100644 → 100755
@@ -94,6 +94,13 @@ int SrsEdgeIngester::initialize(SrsSource* source, SrsPlayEdge* edge, SrsRequest | @@ -94,6 +94,13 @@ int SrsEdgeIngester::initialize(SrsSource* source, SrsPlayEdge* edge, SrsRequest | ||
94 | 94 | ||
95 | int SrsEdgeIngester::start() | 95 | int SrsEdgeIngester::start() |
96 | { | 96 | { |
97 | + int ret = ERROR_SUCCESS; | ||
98 | + | ||
99 | + if ((ret = _source->on_publish()) != ERROR_SUCCESS) { | ||
100 | + srs_error("edge pull stream then publish to edge failed. ret=%d", ret); | ||
101 | + return ret; | ||
102 | + } | ||
103 | + | ||
97 | return pthread->start(); | 104 | return pthread->start(); |
98 | } | 105 | } |
99 | 106 | ||
@@ -114,6 +121,7 @@ void SrsEdgeIngester::stop() | @@ -114,6 +121,7 @@ void SrsEdgeIngester::stop() | ||
114 | int SrsEdgeIngester::cycle() | 121 | int SrsEdgeIngester::cycle() |
115 | { | 122 | { |
116 | int ret = ERROR_SUCCESS; | 123 | int ret = ERROR_SUCCESS; |
124 | + _source->on_source_id_changed(_srs_context->get_id()); | ||
117 | 125 | ||
118 | std::string ep_server, ep_port; | 126 | std::string ep_server, ep_port; |
119 | if ((ret = connect_server(ep_server, ep_port)) != ERROR_SUCCESS) { | 127 | if ((ret = connect_server(ep_server, ep_port)) != ERROR_SUCCESS) { |
@@ -144,11 +152,6 @@ int SrsEdgeIngester::cycle() | @@ -144,11 +152,6 @@ int SrsEdgeIngester::cycle() | ||
144 | return ret; | 152 | return ret; |
145 | } | 153 | } |
146 | 154 | ||
147 | - if ((ret = _source->on_publish()) != ERROR_SUCCESS) { | ||
148 | - srs_error("edge pull stream then publish to edge failed. ret=%d", ret); | ||
149 | - return ret; | ||
150 | - } | ||
151 | - | ||
152 | if ((ret = _edge->on_ingest_play()) != ERROR_SUCCESS) { | 155 | if ((ret = _edge->on_ingest_play()) != ERROR_SUCCESS) { |
153 | return ret; | 156 | return ret; |
154 | } | 157 | } |
-
请 注册 或 登录 后发表评论