1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00
srs/trunk/src/app/srs_app_coworkers.hpp
Winlin c8a1e0f3da
Refine AUTHORS.txt to AUTHORS.md, etc. 5.0.8 (#2464)
* Refine AUTHORS.txt to AUTHORS.md, etc. 5.0.8

* Update README.md

* Update README.md

* Refine format for AUTHORS.md
2021-07-08 14:30:47 +08:00

40 lines
888 B
C++

//
// Copyright (c) 2013-2021 The SRS Authors
//
// SPDX-License-Identifier: MIT
//
#ifndef SRS_APP_COWORKERS_HPP
#define SRS_APP_COWORKERS_HPP
#include <srs_core.hpp>
#include <string>
#include <map>
class SrsJsonAny;
class SrsRequest;
class SrsLiveSource;
// For origin cluster.
class SrsCoWorkers
{
private:
static SrsCoWorkers* _instance;
private:
std::map<std::string, SrsRequest*> streams;
private:
SrsCoWorkers();
virtual ~SrsCoWorkers();
public:
static SrsCoWorkers* instance();
public:
virtual SrsJsonAny* dumps(std::string vhost, std::string coworker, 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(SrsLiveSource* s, SrsRequest* r);
virtual void on_unpublish(SrsLiveSource* s, SrsRequest* r);
};
#endif