mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
parent
f39faa78bb
commit
120033e0a2
1 changed files with 9 additions and 6 deletions
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 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();
|
return pthread->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,7 +121,8 @@ void SrsEdgeIngester::stop()
|
||||||
int SrsEdgeIngester::cycle()
|
int SrsEdgeIngester::cycle()
|
||||||
{
|
{
|
||||||
int ret = ERROR_SUCCESS;
|
int ret = ERROR_SUCCESS;
|
||||||
|
_source->on_source_id_changed(_srs_context->get_id());
|
||||||
|
|
||||||
std::string ep_server, ep_port;
|
std::string ep_server, ep_port;
|
||||||
if ((ret = connect_server(ep_server, ep_port)) != ERROR_SUCCESS) {
|
if ((ret = connect_server(ep_server, ep_port)) != ERROR_SUCCESS) {
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -144,11 +152,6 @@ int SrsEdgeIngester::cycle()
|
||||||
return ret;
|
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) {
|
if ((ret = _edge->on_ingest_play()) != ERROR_SUCCESS) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue