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

@@ -57,6 +57,12 @@ public:
*/
void setStopCheckRtp(bool is_check=false);
/**
* 设置为单track单音频时可以加快媒体注册速度
* 请在inputRtp前调用此方法否则可能会是空操作
*/
void setOnlyAudio(bool only_audio);
/**
* flush输出缓存
*/
@@ -87,6 +93,7 @@ private:
void doCachedFunc();
private:
bool _only_audio = false;
uint64_t _dts = 0;
uint64_t _total_bytes = 0;
std::unique_ptr<sockaddr_storage> _addr;