openRtpServer接口新增only_audio参数,优化语音对讲场景

This commit is contained in:
xiongziliang
2023-02-17 22:43:45 +08:00
parent 5cdaf982f3
commit 8f0ba6988b
10 changed files with 80 additions and 17 deletions

View File

@@ -44,7 +44,7 @@ public:
* @param ssrc 指定的ssrc
*/
void start(uint16_t local_port, const std::string &stream_id = "", TcpMode tcp_mode = PASSIVE,
const char *local_ip = "::", bool re_use_port = true, uint32_t ssrc = 0);
const char *local_ip = "::", bool re_use_port = true, uint32_t ssrc = 0, bool only_audio = false);
/**
* 连接到tcp服务(tcp主动模式)
@@ -75,6 +75,7 @@ protected:
std::shared_ptr<RtcpHelper> _rtcp_helper;
std::function<void()> _on_cleanup;
bool _only_audio = false;
//用于tcp主动模式
TcpMode _tcp_mode = NONE;
};