mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 04:31:37 +08:00
优化代码
This commit is contained in:
parent
305d9bc259
commit
7d1b2583e6
@ -21,8 +21,8 @@ namespace toolkit {
|
|||||||
|
|
||||||
namespace mediakit {
|
namespace mediakit {
|
||||||
|
|
||||||
recursive_mutex s_media_source_mtx;
|
static recursive_mutex s_media_source_mtx;
|
||||||
MediaSource::SchemaVhostAppStreamMap s_media_source_map;
|
static MediaSource::SchemaVhostAppStreamMap s_media_source_map;
|
||||||
|
|
||||||
string getOriginTypeString(MediaOriginType type){
|
string getOriginTypeString(MediaOriginType type){
|
||||||
#define SWITCH_CASE(type) case MediaOriginType::type : return #type
|
#define SWITCH_CASE(type) case MediaOriginType::type : return #type
|
||||||
|
@ -200,10 +200,10 @@ class MediaSource: public TrackSource, public enable_shared_from_this<MediaSourc
|
|||||||
public:
|
public:
|
||||||
static MediaSource * const NullMediaSource;
|
static MediaSource * const NullMediaSource;
|
||||||
using Ptr = std::shared_ptr<MediaSource>;
|
using Ptr = std::shared_ptr<MediaSource>;
|
||||||
using StreamMap = unordered_map<string, weak_ptr<MediaSource> >;
|
using StreamMap = unordered_map<string/*strema_id*/, weak_ptr<MediaSource> >;
|
||||||
using AppStreamMap = unordered_map<string, StreamMap>;
|
using AppStreamMap = unordered_map<string/*app*/, StreamMap>;
|
||||||
using VhostAppStreamMap = unordered_map<string, AppStreamMap>;
|
using VhostAppStreamMap = unordered_map<string/*vhost*/, AppStreamMap>;
|
||||||
using SchemaVhostAppStreamMap = unordered_map<string, VhostAppStreamMap>;
|
using SchemaVhostAppStreamMap = unordered_map<string/*schema*/, VhostAppStreamMap>;
|
||||||
|
|
||||||
MediaSource(const string &schema, const string &vhost, const string &app, const string &stream_id) ;
|
MediaSource(const string &schema, const string &vhost, const string &app, const string &stream_id) ;
|
||||||
virtual ~MediaSource();
|
virtual ~MediaSource();
|
||||||
|
Loading…
Reference in New Issue
Block a user