优化rtp统计性能

This commit is contained in:
xiongziliang
2021-01-31 19:55:47 +08:00
parent 070bf19cb5
commit 51435d955c
5 changed files with 79 additions and 53 deletions

View File

@@ -177,7 +177,7 @@ void RtspPusher::sendAnnounce() {
throw std::runtime_error("无有效的Sdp Track");
}
for (auto &track : _track_vec) {
_rtcp_context.emplace_back(std::make_shared<RtcpContext>(track->_samplerate));
_rtcp_context.emplace_back(std::make_shared<RtcpContext>(track->_samplerate, false));
}
_on_res_func = std::bind(&RtspPusher::handleResAnnounce, this, placeholders::_1);
sendRtspRequest("ANNOUNCE", _url, {}, src->getSdp());