Refine object create in server.

pull/978/head
winlin 8 years ago
parent c32afb95ab
commit 4e4091231e

@ -179,6 +179,7 @@ Please select your language:
- [x] [Experimental] Support multiple processes by [dolphin][srs-dolphin] or [oryx][oryx].
- [x] [Experimental] Support [mgmt console][console], please read [srs-ngb][srs-ngb].
- [x] [Experimental] Support MPEG-DASH, the future streaming protocol, read [#299][bug #299].
- [ ] Enhanced error code with description and stack, read [#913][bug #913].
- [ ] Enhanced forward with vhost and url variables.
- [ ] Support source or idle stream cleanup.
- [ ] Support origin cluster, please read [#464][bug #464], [RTMP 302][bug #92].
@ -1426,6 +1427,7 @@ Winlin
[bug #547]: https://github.com/ossrs/srs/issues/547
[bug #904]: https://github.com/ossrs/srs/issues/904
[bug #821]: https://github.com/ossrs/srs/issues/821
[bug #913]: https://github.com/ossrs/srs/issues/913
[bug #xxxxxxxxxxxxx]: https://github.com/ossrs/srs/issues/xxxxxxxxxxxxx
[exo #828]: https://github.com/google/ExoPlayer/pull/828

@ -483,7 +483,7 @@ SrsServer::SrsServer()
signal_gracefully_quit = false;
pid_fd = -1;
signal_manager = NULL;
signal_manager = new SrsSignalManager(this);
conn_manager = new SrsCoroutineManager();
handler = NULL;
@ -494,10 +494,10 @@ SrsServer::SrsServer()
// new these objects in initialize instead.
http_api_mux = new SrsHttpServeMux();
http_server = new SrsHttpServer(this);
http_heartbeat = NULL;
http_heartbeat = new SrsHttpHeartbeat();
#ifdef SRS_AUTO_INGEST
ingester = NULL;
ingester = new SrsIngester();
#endif
}
@ -570,9 +570,6 @@ srs_error_t SrsServer::initialize(ISrsServerCycle* cycle_handler)
srs_assert(_srs_config);
_srs_config->subscribe(this);
srs_assert(!signal_manager);
signal_manager = new SrsSignalManager(this);
handler = cycle_handler;
if(handler && (err = handler->initialize()) != srs_success){
return srs_error_wrap(err, "handler initialize");
@ -586,13 +583,6 @@ srs_error_t SrsServer::initialize(ISrsServerCycle* cycle_handler)
return srs_error_wrap(err, "http server initialize");
}
http_heartbeat = new SrsHttpHeartbeat();
#ifdef SRS_AUTO_INGEST
srs_assert(!ingester);
ingester = new SrsIngester();
#endif
return err;
}

Loading…
Cancel
Save