修复c api编译错误

This commit is contained in:
Dw9 2023-07-14 21:30:27 +08:00
parent e8a870e215
commit 84ab30ec76
3 changed files with 18 additions and 8 deletions

View File

@ -38,7 +38,7 @@ restart_sec=0
modify_stamp=2
#转协议是否开启音频
enable_audio=1
#添加acc静音音频在关闭音频时此开关无效
#添加aac静音音频在关闭音频时此开关无效
add_mute_audio=1
#无人观看时,是否直接关闭(而不是通过on_none_reader hook返回close)
#此配置置1时此流如果无人观看将不触发on_none_reader hook回调

View File

@ -32,6 +32,23 @@
#define RTP_MSLABEL "zlmediakit-mslabel"
#define RTP_MSID RTP_MSLABEL " " RTP_LABEL
namespace mediakit {
//c api RTC配置项目
namespace Rtc {
#ifndef RTC_FIELD
#define RTC_FIELD "rtc."
// webrtc单端口udp服务器
const std::string kPort = RTC_FIELD "port";
const std::string kTcpPort = RTC_FIELD "tcpPort";
static onceToken token([]() {
mINI::Instance()[kPort] = 8000;
mINI::Instance()[kTcpPort] = 8000;
});
#endif
}
}
using namespace std;
namespace mediakit {

View File

@ -28,13 +28,6 @@
namespace mediakit {
//RTC配置项目
namespace Rtc {
extern const std::string kPort;
extern const std::string kTcpPort;
extern const std::string kTimeOutSec;
}//namespace RTC
class WebRtcInterface {
public:
WebRtcInterface() = default;