OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 return true; | 65 return true; |
66 } | 66 } |
67 | 67 |
68 size_t PacketRouter::TimeToSendPadding(size_t bytes_to_send, | 68 size_t PacketRouter::TimeToSendPadding(size_t bytes_to_send, |
69 int probe_cluster_id) { | 69 int probe_cluster_id) { |
70 RTC_DCHECK(pacer_thread_checker_.CalledOnValidThread()); | 70 RTC_DCHECK(pacer_thread_checker_.CalledOnValidThread()); |
71 size_t total_bytes_sent = 0; | 71 size_t total_bytes_sent = 0; |
72 rtc::CritScope cs(&modules_crit_); | 72 rtc::CritScope cs(&modules_crit_); |
73 // Rtp modules are ordered by which stream can most benefit from padding. | 73 // Rtp modules are ordered by which stream can most benefit from padding. |
74 for (RtpRtcp* module : rtp_modules_) { | 74 for (RtpRtcp* module : rtp_modules_) { |
75 if (module->SendingMedia()) { | 75 if (module->SendingMedia() && module->HasBweExtensions()) { |
76 size_t bytes_sent = module->TimeToSendPadding( | 76 size_t bytes_sent = module->TimeToSendPadding( |
77 bytes_to_send - total_bytes_sent, probe_cluster_id); | 77 bytes_to_send - total_bytes_sent, probe_cluster_id); |
78 total_bytes_sent += bytes_sent; | 78 total_bytes_sent += bytes_sent; |
79 if (total_bytes_sent >= bytes_to_send) | 79 if (total_bytes_sent >= bytes_to_send) |
80 break; | 80 break; |
81 } | 81 } |
82 } | 82 } |
83 return total_bytes_sent; | 83 return total_bytes_sent; |
84 } | 84 } |
85 | 85 |
(...skipping 23 matching lines...) Expand all Loading... |
109 rtc::CritScope cs(&modules_crit_); | 109 rtc::CritScope cs(&modules_crit_); |
110 for (auto* rtp_module : rtp_modules_) { | 110 for (auto* rtp_module : rtp_modules_) { |
111 packet->SetSenderSsrc(rtp_module->SSRC()); | 111 packet->SetSenderSsrc(rtp_module->SSRC()); |
112 if (rtp_module->SendFeedbackPacket(*packet)) | 112 if (rtp_module->SendFeedbackPacket(*packet)) |
113 return true; | 113 return true; |
114 } | 114 } |
115 return false; | 115 return false; |
116 } | 116 } |
117 | 117 |
118 } // namespace webrtc | 118 } // namespace webrtc |
OLD | NEW |