1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

For #1638, #307, extract rtc server to hybrid manager.

This commit is contained in:
winlin 2020-03-17 17:56:37 +08:00
parent 4318d989a6
commit 2c4dc0fb3d
9 changed files with 141 additions and 136 deletions

View file

@ -102,6 +102,11 @@ void SrsServerAdapter::stop()
{
}
SrsServer* SrsServerAdapter::instance()
{
return srs;
}
SrsHybridServer::SrsHybridServer()
{
}
@ -181,5 +186,15 @@ void SrsHybridServer::stop()
}
}
SrsServerAdapter* SrsHybridServer::srs()
{
for (vector<ISrsHybridServer*>::iterator it = servers.begin(); it != servers.end(); ++it) {
if (dynamic_cast<SrsServerAdapter*>(*it)) {
return dynamic_cast<SrsServerAdapter*>(*it);
}
}
return NULL;
}
SrsHybridServer* _srs_hybrid = new SrsHybridServer();