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

refine code to use the one coding style.

This commit is contained in:
winlin 2015-01-05 12:20:46 +08:00
parent 4bb17f0c81
commit 40ed2249e8
3 changed files with 34 additions and 32 deletions

View file

@ -39,32 +39,24 @@ class SrsStreamInfo
public:
SrsStreamInfo();
virtual ~SrsStreamInfo();
public:
SrsRequest *_req;
};
typedef std::map<void*, SrsStreamInfo*> SrsStreamInfoMap;
class SrsStatistic
{
public:
static SrsStatistic *instance()
{
if (_instance == NULL) {
_instance = new SrsStatistic();
}
return _instance;
}
virtual SrsStreamInfoMap* get_pool();
static SrsStatistic* instance();
public:
virtual std::map<void*, SrsStreamInfo*>* get_pool();
virtual void add_request_info(void *p, SrsRequest *req);
private:
SrsStatistic();
virtual ~SrsStatistic();
private:
static SrsStatistic *_instance;
SrsStreamInfoMap pool;
std::map<void*, SrsStreamInfo*> pool;
private:
virtual SrsStreamInfo *get(void *p);
};