Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Unified Diff: webrtc/modules/pacing/paced_sender.cc

Issue 2664213002: Don't send audio packets if the network is down. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/modules/pacing/paced_sender_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/pacing/paced_sender.cc
diff --git a/webrtc/modules/pacing/paced_sender.cc b/webrtc/modules/pacing/paced_sender.cc
index a0d7eda73f26f901afbf29de7abc051034b68ae9..b64e366d48f2ac0444955cbe8516d425610b99b2 100644
--- a/webrtc/modules/pacing/paced_sender.cc
+++ b/webrtc/modules/pacing/paced_sender.cc
@@ -388,7 +388,6 @@ void PacedSender::Process() {
int64_t elapsed_time_ms = (now_us - time_last_update_us_ + 500) / 1000;
time_last_update_us_ = now_us;
int target_bitrate_kbps = pacing_bitrate_kbps_;
- // TODO(holmer): Remove the !paused_ check when issue 5307 has been fixed.
if (!paused_ && elapsed_time_ms > 0) {
size_t queue_size_bytes = packets_->SizeInBytes();
if (queue_size_bytes > 0) {
@@ -437,7 +436,6 @@ void PacedSender::Process() {
}
}
- // TODO(holmer): Remove the paused_ check when issue 5307 has been fixed.
if (packets_->Empty() && !paused_) {
// We can not send padding unless a normal packet has first been sent. If we
// do, timestamps get messed up.
@@ -457,16 +455,11 @@ void PacedSender::Process() {
bool PacedSender::SendPacket(const paced_sender::Packet& packet,
int probe_cluster_id) {
- // TODO(holmer): Because of this bug issue 5307 we have to send audio
- // packets even when the pacer is paused. Here we assume audio packets are
- // always high priority and that they are the only high priority packets.
- if (packet.priority != kHighPriority) {
- if (paused_)
- return false;
- if (media_budget_->bytes_remaining() == 0 &&
- probe_cluster_id == PacketInfo::kNotAProbe) {
- return false;
- }
+ if (paused_)
+ return false;
+ if (media_budget_->bytes_remaining() == 0 &&
+ probe_cluster_id == PacketInfo::kNotAProbe) {
+ return false;
}
critsect_->Leave();
const bool success = packet_sender_->TimeToSendPacket(
« no previous file with comments | « no previous file | webrtc/modules/pacing/paced_sender_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698