rtc port默认8000

This commit is contained in:
Dw9 2023-07-14 20:15:11 +08:00
parent 4e33f5b477
commit e8a870e215
4 changed files with 39 additions and 24 deletions

View File

@ -102,6 +102,17 @@ onceToken token1([](){
},nullptr);
} //namespace RtpProxy
// RTC配置项目
namespace Rtc {
#define RTC_FIELD "rtc."
const string kPort = RTC_FIELD "port";
const string kTcpPort = RTC_FIELD "tcpPort";
onceToken token1([]() {
mINI::Instance()[kPort] = 8000;
mINI::Instance()[kTcpPort] = 8000;
},nullptr);
} // namespace RTC
} // namespace mediakit

View File

@ -260,6 +260,24 @@ static onceToken token([]() {
});
} // namespace Rtp
////////////RTC服务器配置///////////
namespace Rtc {
#define RTC_FIELD "rtc."
// rtp和rtcp接受超时时间
const string kTimeOutSec = RTC_FIELD "timeoutSec";
// 服务器外网ip
const string kExternIP = RTC_FIELD "externIP";
// 设置remb比特率非0时关闭twcc并开启remb。该设置在rtc推流时有效可以控制推流画质
const string kRembBitRate = RTC_FIELD "rembBitRate";
static onceToken token([]() {
mINI::Instance()[kTimeOutSec] = 15;
mINI::Instance()[kExternIP] = "";
mINI::Instance()[kRembBitRate] = 0;
});
} // namespace RTC
////////////组播配置///////////
namespace MultiCast {
#define MULTI_FIELD "multicast."

View File

@ -308,6 +308,16 @@ extern const std::string kLowLatency;
extern const std::string kH264StapA;
} // namespace Rtp
////////////RTC服务器配置///////////
namespace Rtc {
//rtc播放推流、播放超时时间
extern const std::string kTimeOutSec;
// 服务器外网ip
extern const std::string kExternIP;
// 设置remb比特率非0时关闭twcc并开启remb。该设置在rtc推流时有效可以控制推流画质
extern const std::string kRembBitRate;
} // namespace Rtc
////////////组播配置///////////
namespace MultiCast {
// 组播分配起始地址

View File

@ -36,30 +36,6 @@ using namespace std;
namespace mediakit {
// RTC配置项目
namespace Rtc {
#define RTC_FIELD "rtc."
// rtp和rtcp接受超时时间
const string kTimeOutSec = RTC_FIELD "timeoutSec";
// 服务器外网ip
const string kExternIP = RTC_FIELD "externIP";
// 设置remb比特率非0时关闭twcc并开启remb。该设置在rtc推流时有效可以控制推流画质
const string kRembBitRate = RTC_FIELD "rembBitRate";
// webrtc单端口udp服务器
const string kPort = RTC_FIELD "port";
const string kTcpPort = RTC_FIELD "tcpPort";
static onceToken token([]() {
mINI::Instance()[kTimeOutSec] = 15;
mINI::Instance()[kExternIP] = "";
mINI::Instance()[kRembBitRate] = 0;
mINI::Instance()[kPort] = 0;
mINI::Instance()[kTcpPort] = 0;
});
} // namespace RTC
static atomic<uint64_t> s_key { 0 };
static void translateIPFromEnv(std::vector<std::string> &v) {