This commit is contained in:
Johnny
2023-05-02 20:40:40 +08:00
parent 1dd0c69aa0
commit bfec1b1e0e
4 changed files with 7 additions and 7 deletions

View File

@@ -34,7 +34,7 @@ size_t RtcpContext::getLost() {
throw std::runtime_error("没有实现, rtp发送者无法统计丢包率");
}
size_t RtcpContext::geLostInterval() {
size_t RtcpContext::getLostInterval() {
throw std::runtime_error("没有实现, rtp发送者无法统计丢包率");
}
@@ -231,7 +231,7 @@ size_t RtcpContextForRecv::getLost() {
return getExpectedPackets() - _packets;
}
size_t RtcpContextForRecv::geLostInterval() {
size_t RtcpContextForRecv::getLostInterval() {
auto lost = getLost();
auto ret = lost - _last_lost;
_last_lost = lost;
@@ -248,7 +248,7 @@ Buffer::Ptr RtcpContextForRecv::createRtcpRR(uint32_t rtcp_ssrc, uint32_t rtp_ss
uint8_t fraction = 0;
auto expected_interval = getExpectedPacketsInterval();
if (expected_interval) {
fraction = uint8_t(geLostInterval() << 8 / expected_interval);
fraction = uint8_t(getLostInterval() << 8 / expected_interval);
}
item->fraction = fraction;