mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
ingest stream when server cycle
This commit is contained in:
parent
adfbbbfd68
commit
4a7378b77a
2 changed files with 16 additions and 0 deletions
|
@ -368,6 +368,12 @@ int SrsServer::cycle()
|
|||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
// ingest streams
|
||||
if ((ret = ingest_streams()) != ERROR_SUCCESS) {
|
||||
srs_error("ingest streams failed. ret=%d", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
// the deamon thread, update the time cache
|
||||
while (true) {
|
||||
st_usleep(SRS_TIME_RESOLUTION_MS * 1000);
|
||||
|
@ -439,6 +445,15 @@ void SrsServer::on_signal(int signo)
|
|||
}
|
||||
}
|
||||
|
||||
int SrsServer::ingest_streams()
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
#ifdef SRS_INGEST
|
||||
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
void SrsServer::close_listeners()
|
||||
{
|
||||
std::vector<SrsListener*>::iterator it;
|
||||
|
|
|
@ -100,6 +100,7 @@ public:
|
|||
virtual void remove(SrsConnection* conn);
|
||||
virtual void on_signal(int signo);
|
||||
private:
|
||||
virtual int ingest_streams();
|
||||
virtual void close_listeners();
|
||||
virtual int accept_client(SrsListenerType type, st_netfd_t client_stfd);
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue