parent
f39faa78bb
commit
120033e0a2
15
trunk/src/app/srs_app_edge.cpp
Normal file → Executable file
15
trunk/src/app/srs_app_edge.cpp
Normal file → Executable file
|
|
@ -94,6 +94,13 @@ int SrsEdgeIngester::initialize(SrsSource* source, SrsPlayEdge* edge, SrsRequest
|
|||
|
||||
int SrsEdgeIngester::start()
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
if ((ret = _source->on_publish()) != ERROR_SUCCESS) {
|
||||
srs_error("edge pull stream then publish to edge failed. ret=%d", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return pthread->start();
|
||||
}
|
||||
|
||||
|
|
@ -114,7 +121,8 @@ void SrsEdgeIngester::stop()
|
|||
int SrsEdgeIngester::cycle()
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
_source->on_source_id_changed(_srs_context->get_id());
|
||||
|
||||
std::string ep_server, ep_port;
|
||||
if ((ret = connect_server(ep_server, ep_port)) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
|
|
@ -144,11 +152,6 @@ int SrsEdgeIngester::cycle()
|
|||
return ret;
|
||||
}
|
||||
|
||||
if ((ret = _source->on_publish()) != ERROR_SUCCESS) {
|
||||
srs_error("edge pull stream then publish to edge failed. ret=%d", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
if ((ret = _edge->on_ingest_play()) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user