Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Take into account RTP packets header sizes when calculating BWE and pacing #581

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* Configure RTX ratio cap via `StreamTx::set_rtx_cache` #570
* Correctly handle per m-line TWCC #573
* Correctly handle per m-line Absolute Send Time #575
* Take into account RTP packets header sizes when calculating BWE and pacing #581

# 0.6.1
* Force openssl to be >=0.10.66 #545
Expand Down
4 changes: 2 additions & 2 deletions src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ impl Session {
crate::log_stat!("PACKET_SENT", header.ssrc, payload_size, kind);
}

self.pacer.register_send(now, payload_size.into(), mid);
self.pacer.register_send(now, buf.len().into(), mid);

if let Some(raw_packets) = &mut self.raw_packets {
raw_packets.push_back(Box::new(RawPacket::RtpTx(header.clone(), buf.clone())));
Expand All @@ -740,7 +740,7 @@ impl Session {

if twcc_enabled {
self.twcc_tx_register
.register_seq(twcc_seq.into(), now, payload_size);
.register_seq(twcc_seq.into(), now, buf.len());
}

// Technically we should wait for the next handle_timeout, but this speeds things up a bit
Expand Down
Loading