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

For #464, query origin info and ip addresses

This commit is contained in:
winlin 2018-02-16 09:37:31 +08:00
parent 469250f850
commit ec362b2774
3 changed files with 137 additions and 32 deletions

View file

@ -27,6 +27,7 @@
#include <srs_core.hpp>
#include <string>
#include <map>
class SrsJsonAny;
class SrsRequest;
@ -36,6 +37,8 @@ class SrsCoWorkers
{
private:
static SrsCoWorkers* _instance;
private:
std::map<std::string, SrsRequest*> vhosts;
private:
SrsCoWorkers();
virtual ~SrsCoWorkers();
@ -43,6 +46,8 @@ public:
static SrsCoWorkers* instance();
public:
virtual SrsJsonAny* dumps(std::string vhost, std::string app, std::string stream);
private:
virtual SrsRequest* find_stream_info(std::string vhost, std::string app, std::string stream);
public:
virtual srs_error_t on_publish(SrsSource* s, SrsRequest* r);
virtual void on_unpublish(SrsSource* s, SrsRequest* r);