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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 bool AudioSendStream::DeliverRtcp(const uint8_t* packet, size_t length) { | 222 bool AudioSendStream::DeliverRtcp(const uint8_t* packet, size_t length) { |
223 // TODO(solenberg): Tests call this function on a network thread, libjingle | 223 // TODO(solenberg): Tests call this function on a network thread, libjingle |
224 // calls on the worker thread. We should move towards always using a network | 224 // calls on the worker thread. We should move towards always using a network |
225 // thread. Then this check can be enabled. | 225 // thread. Then this check can be enabled. |
226 // RTC_DCHECK(!thread_checker_.CalledOnValidThread()); | 226 // RTC_DCHECK(!thread_checker_.CalledOnValidThread()); |
227 return channel_proxy_->ReceivedRTCPPacket(packet, length); | 227 return channel_proxy_->ReceivedRTCPPacket(packet, length); |
228 } | 228 } |
229 | 229 |
230 uint32_t AudioSendStream::OnBitrateUpdated(uint32_t bitrate_bps, | 230 uint32_t AudioSendStream::OnBitrateUpdated(uint32_t bitrate_bps, |
231 uint8_t fraction_loss, | 231 uint8_t fraction_loss, |
232 int64_t rtt, | 232 int64_t rtt) { |
233 int64_t probing_interval_ms) { | |
234 RTC_DCHECK_GE(bitrate_bps, | 233 RTC_DCHECK_GE(bitrate_bps, |
235 static_cast<uint32_t>(config_.min_bitrate_bps)); | 234 static_cast<uint32_t>(config_.min_bitrate_bps)); |
236 // The bitrate allocator might allocate an higher than max configured bitrate | 235 // The bitrate allocator might allocate an higher than max configured bitrate |
237 // if there is room, to allow for, as example, extra FEC. Ignore that for now. | 236 // if there is room, to allow for, as example, extra FEC. Ignore that for now. |
238 const uint32_t max_bitrate_bps = config_.max_bitrate_bps; | 237 const uint32_t max_bitrate_bps = config_.max_bitrate_bps; |
239 if (bitrate_bps > max_bitrate_bps) | 238 if (bitrate_bps > max_bitrate_bps) |
240 bitrate_bps = max_bitrate_bps; | 239 bitrate_bps = max_bitrate_bps; |
241 | 240 |
242 channel_proxy_->SetBitrate(bitrate_bps, probing_interval_ms); | 241 channel_proxy_->SetBitrate(bitrate_bps); |
243 | 242 |
244 // The amount of audio protection is not exposed by the encoder, hence | 243 // The amount of audio protection is not exposed by the encoder, hence |
245 // always returning 0. | 244 // always returning 0. |
246 return 0; | 245 return 0; |
247 } | 246 } |
248 | 247 |
249 const webrtc::AudioSendStream::Config& AudioSendStream::config() const { | 248 const webrtc::AudioSendStream::Config& AudioSendStream::config() const { |
250 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 249 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
251 return config_; | 250 return config_; |
252 } | 251 } |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 LOG(LS_WARNING) << "SetVADStatus() failed: " << base->LastError(); | 377 LOG(LS_WARNING) << "SetVADStatus() failed: " << base->LastError(); |
379 return false; | 378 return false; |
380 } | 379 } |
381 } | 380 } |
382 } | 381 } |
383 return true; | 382 return true; |
384 } | 383 } |
385 | 384 |
386 } // namespace internal | 385 } // namespace internal |
387 } // namespace webrtc | 386 } // namespace webrtc |
OLD | NEW |