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

fix #374: when terminate srs, cleanup to ensure FFMPEG quit.

This commit is contained in:
winlin 2015-05-30 09:58:17 +08:00
parent db57a519a9
commit 567d84e997
5 changed files with 49 additions and 11 deletions

View file

@ -275,16 +275,22 @@ private:
*/
bool signal_reload;
bool signal_gmc_stop;
bool signal_gracefully_quit;
public:
SrsServer();
virtual ~SrsServer();
public:
private:
/**
* the destroy is for gmc to analysis the memory leak,
* if not destroy global/static data, the gmc will warning memory leak.
* in service, server never destroy, directly exit when restart.
*/
virtual void destroy();
/**
* when SIGTERM, SRS should do cleanup, for example,
* to stop all ingesters, cleanup HLS and dvr.
*/
virtual void dispose();
// server startup workflow, @see run_master()
public:
virtual int initialize(ISrsServerCycle* cycle_handler);