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