mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-30 06:42:22 +08:00
简化命名空间
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
|
||||
#include "Factory.h"
|
||||
|
||||
namespace mediakit{
|
||||
|
||||
Sdp::Ptr Factory::getSdpByTrack(const Track::Ptr &track) {
|
||||
switch (track->getCodecId()){
|
||||
case CodecH264:{
|
||||
@@ -101,3 +103,5 @@ RtpCodec::Ptr Factory::getRtpDecoderById(CodecId codecId, uint32_t ui32SampleRat
|
||||
}
|
||||
}
|
||||
|
||||
}//namespace mediakit
|
||||
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
#include "Rtsp/RtspSdp.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace ZL::Rtsp;
|
||||
using namespace toolkit;
|
||||
|
||||
namespace mediakit{
|
||||
|
||||
class Factory {
|
||||
public:
|
||||
@@ -53,5 +55,6 @@ public:
|
||||
static RtpCodec::Ptr getRtpDecoderById(CodecId codecId, uint32_t ui32SampleRate);
|
||||
};
|
||||
|
||||
}//namespace mediakit
|
||||
|
||||
#endif //ZLMEDIAKIT_FACTORY_H
|
||||
|
||||
@@ -31,12 +31,9 @@
|
||||
#include "Rtsp/Rtsp.h"
|
||||
#include "Network/sockutil.h"
|
||||
|
||||
using namespace ZL::Util;
|
||||
using namespace ZL::Network;
|
||||
using namespace ZL::MediaFile;
|
||||
using namespace toolkit;
|
||||
|
||||
namespace ZL {
|
||||
namespace Media {
|
||||
namespace mediakit {
|
||||
|
||||
recursive_mutex MediaSource::g_mtxMediaSrc;
|
||||
MediaSource::SchemaVhostAppStreamMap MediaSource::g_mapMediaSrc;
|
||||
@@ -174,5 +171,4 @@ void MediaInfo::parse(const string &url){
|
||||
}
|
||||
|
||||
|
||||
} /* namespace Media */
|
||||
} /* namespace ZL */
|
||||
} /* namespace mediakit */
|
||||
@@ -40,11 +40,9 @@
|
||||
#include "Rtsp/Rtsp.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace Config;
|
||||
using namespace ZL::Util;
|
||||
using namespace toolkit;
|
||||
|
||||
namespace ZL {
|
||||
namespace Media {
|
||||
namespace mediakit {
|
||||
|
||||
class MediaSourceEvent
|
||||
{
|
||||
@@ -234,8 +232,7 @@ private:
|
||||
static recursive_mutex g_mtxMediaSrc; //访问静态的媒体源表的互斥锁
|
||||
};
|
||||
|
||||
} /* namespace Media */
|
||||
} /* namespace ZL */
|
||||
} /* namespace mediakit */
|
||||
|
||||
|
||||
#endif //ZLMEDIAKIT_MEDIASOURCE_H
|
||||
|
||||
@@ -30,9 +30,9 @@
|
||||
#include "Util/onceToken.h"
|
||||
#include "Network/sockutil.h"
|
||||
|
||||
using namespace ZL::Network;
|
||||
using namespace toolkit;
|
||||
|
||||
namespace Config {
|
||||
namespace mediakit {
|
||||
|
||||
bool loadIniConfig(const char *ini_path){
|
||||
string ini;
|
||||
@@ -293,6 +293,6 @@ onceToken token([](){
|
||||
|
||||
} //namespace Hls
|
||||
|
||||
} // namespace Config
|
||||
} // namespace mediakit
|
||||
|
||||
|
||||
|
||||
@@ -34,9 +34,9 @@
|
||||
#include "Util/NoticeCenter.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace ZL::Util;
|
||||
using namespace toolkit;
|
||||
|
||||
namespace Config {
|
||||
namespace mediakit {
|
||||
|
||||
//加载配置文件,如果配置文件不存在,那么会导出默认配置并生成配置文件
|
||||
//加载配置文件成功后会触发kBroadcastUpdateConfig广播
|
||||
@@ -131,7 +131,7 @@ extern const char kBroadcastReloadConfig[];
|
||||
#define RELOAD_KEY_REGISTER(arg,key) \
|
||||
do{ \
|
||||
static onceToken s_token([](){ \
|
||||
NoticeCenter::Instance().addListener(ReloadConfigTag,Config::Broadcast::kBroadcastReloadConfig,[](BroadcastReloadConfigArgs){ \
|
||||
NoticeCenter::Instance().addListener(ReloadConfigTag,Broadcast::kBroadcastReloadConfig,[](BroadcastReloadConfigArgs){ \
|
||||
RELOAD_KEY(arg,key); \
|
||||
}); \
|
||||
}); \
|
||||
@@ -234,6 +234,6 @@ extern const char kFileBufSize[];
|
||||
extern const char kFilePath[];
|
||||
} //namespace Hls
|
||||
|
||||
} // namespace Config
|
||||
} // namespace mediakit
|
||||
|
||||
#endif /* COMMON_CONFIG_H */
|
||||
|
||||
Reference in New Issue
Block a user