mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-26 03:42:21 +08:00
重构 audio_transcode 代码:
- 独立出 RtcMediaSource,并只对rtc开放 - 增加Rtc g711转码开关 - 修改说明
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
#include "Rtsp/Rtsp.h"
|
||||
#include "Rtsp/RtpReceiver.h"
|
||||
#include "WebRtcTransport.h"
|
||||
|
||||
#include "RtcMediaSource.h"
|
||||
#include "WebRtcEchoTest.h"
|
||||
#include "WebRtcPlayer.h"
|
||||
#include "WebRtcPusher.h"
|
||||
@@ -45,6 +45,9 @@ const string kTimeOutSec = RTC_FIELD "timeoutSec";
|
||||
const string kExternIP = RTC_FIELD "externIP";
|
||||
// 设置remb比特率,非0时关闭twcc并开启remb。该设置在rtc推流时有效,可以控制推流画质
|
||||
const string kRembBitRate = RTC_FIELD "rembBitRate";
|
||||
// 是否转码G711音频,做到: 出rtc将g711转成aac,入rtc将g711转成opus
|
||||
const string kTranscodeG711 = RTC_FIELD "transcodeG711";
|
||||
|
||||
// webrtc单端口udp服务器
|
||||
const string kPort = RTC_FIELD "port";
|
||||
|
||||
@@ -56,6 +59,7 @@ static onceToken token([]() {
|
||||
mINI::Instance()[kRembBitRate] = 0;
|
||||
mINI::Instance()[kPort] = 0;
|
||||
mINI::Instance()[kTcpPort] = 0;
|
||||
mINI::Instance()[kTranscodeG711] = 0;
|
||||
});
|
||||
|
||||
} // namespace RTC
|
||||
@@ -1206,7 +1210,7 @@ void push_plugin(Session &sender, const WebRtcArgs &args, const WebRtcPluginMana
|
||||
}
|
||||
|
||||
if (!push_src) {
|
||||
push_src = std::make_shared<RtspMediaSourceImp>(info, schema);
|
||||
push_src = std::make_shared<RtcMediaSourceImp>(info);
|
||||
push_src_ownership = push_src->getOwnership();
|
||||
push_src->setProtocolOption(option);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user