1
0
Fork 0
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:
winlin 2014-04-07 08:41:32 +08:00
parent adfbbbfd68
commit 4a7378b77a
2 changed files with 16 additions and 0 deletions

View file

@ -368,6 +368,12 @@ int SrsServer::cycle()
{ {
int ret = ERROR_SUCCESS; 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 // the deamon thread, update the time cache
while (true) { while (true) {
st_usleep(SRS_TIME_RESOLUTION_MS * 1000); 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() void SrsServer::close_listeners()
{ {
std::vector<SrsListener*>::iterator it; std::vector<SrsListener*>::iterator it;

View file

@ -100,6 +100,7 @@ public:
virtual void remove(SrsConnection* conn); virtual void remove(SrsConnection* conn);
virtual void on_signal(int signo); virtual void on_signal(int signo);
private: private:
virtual int ingest_streams();
virtual void close_listeners(); virtual void close_listeners();
virtual int accept_client(SrsListenerType type, st_netfd_t client_stfd); virtual int accept_client(SrsListenerType type, st_netfd_t client_stfd);
public: public: