mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-07 12:18:12 +08:00
添加配置文件热加载功能
This commit is contained in:
@@ -54,7 +54,8 @@ void RtmpSession::onError(const SockException& err) {
|
||||
DebugL << err.what();
|
||||
|
||||
//流量统计事件广播
|
||||
static uint64_t iFlowThreshold = mINI::Instance()[Broadcast::kFlowThreshold];
|
||||
GET_CONFIG_AND_REGISTER(uint32_t,iFlowThreshold,Broadcast::kFlowThreshold);
|
||||
|
||||
if(m_ui64TotalBytes > iFlowThreshold * 1024){
|
||||
NoticeCenter::Instance().emitEvent(Broadcast::kBroadcastFlowReport,m_mediaInfo,m_ui64TotalBytes);
|
||||
}
|
||||
|
||||
@@ -98,8 +98,9 @@ void RtmpToRtspMediaSource::makeSDP() {
|
||||
auto lam = [this](const RtpPacket::Ptr &pkt, bool bKeyPos) {
|
||||
m_pRtspSrc->onGetRTP(pkt,bKeyPos);
|
||||
};
|
||||
static uint32_t videoMtu = mINI::Instance()[Config::Rtp::kVideoMtuSize].as<uint32_t>();
|
||||
m_pRtpMaker_h264.reset(new RtpMaker_H264(lam, ssrc0,videoMtu));
|
||||
|
||||
GET_CONFIG_AND_REGISTER(uint32_t,videoMtu,Config::Rtp::kVideoMtuSize);
|
||||
m_pRtpMaker_h264.reset(new RtpMaker_H264(lam, ssrc0,videoMtu));
|
||||
|
||||
char strTemp[100];
|
||||
int profile_level_id = 0;
|
||||
@@ -140,8 +141,8 @@ void RtmpToRtspMediaSource::makeSDP() {
|
||||
auto lam = [this](const RtpPacket::Ptr &pkt, bool bKeyPos) {
|
||||
m_pRtspSrc->onGetRTP(pkt,bKeyPos);
|
||||
};
|
||||
static uint32_t audioMtu = mINI::Instance()[Config::Rtp::kAudioMtuSize].as<uint32_t>();
|
||||
m_pRtpMaker_aac.reset(new RtpMaker_AAC(lam, ssrc1, audioMtu,m_pParser->getAudioSampleRate()));
|
||||
GET_CONFIG_AND_REGISTER(uint32_t,audioMtu,Config::Rtp::kAudioMtuSize);
|
||||
m_pRtpMaker_aac.reset(new RtpMaker_AAC(lam, ssrc1, audioMtu,m_pParser->getAudioSampleRate()));
|
||||
|
||||
char configStr[32];
|
||||
const string & strAacCfg = m_pParser->getAudioCfg();
|
||||
|
||||
Reference in New Issue
Block a user