Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2004 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 1402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1413 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 1413 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
| 1414 if (stream_) { | 1414 if (stream_) { |
| 1415 call_->DestroyAudioSendStream(stream_); | 1415 call_->DestroyAudioSendStream(stream_); |
| 1416 stream_ = nullptr; | 1416 stream_ = nullptr; |
| 1417 } | 1417 } |
| 1418 RTC_DCHECK(!stream_); | 1418 RTC_DCHECK(!stream_); |
| 1419 if (webrtc::field_trial::FindFullName("WebRTC-Audio-SendSideBwe") == | 1419 if (webrtc::field_trial::FindFullName("WebRTC-Audio-SendSideBwe") == |
| 1420 "Enabled") { | 1420 "Enabled") { |
| 1421 // TODO(mflodman): Keep testing this and set proper values. | 1421 // TODO(mflodman): Keep testing this and set proper values. |
| 1422 // Note: This is an early experiment currently only supported by Opus. | 1422 // Note: This is an early experiment currently only supported by Opus. |
| 1423 config_.min_bitrate_bps = kOpusMinBitrateBps; | 1423 if (webrtc::field_trial::FindFullName( |
| 1424 config_.max_bitrate_bps = kOpusBitrateFbBps; | 1424 "WebRTC-SendSideBwe-WithOverhead") == "Enabled") { |
| 1425 // OverheadPerPacket(58) = Ipv4(20B) + UDP(8B) + SRTP(10B) + RTP(12) | |
| 1426 // + RTP_ext(8); | |
| 1427 // kMaxOverheadBps = OverheadPerPacket * 8 * 1000ms / frame_length(20ms) | |
|
minyue-webrtc
2016/11/24 10:42:10
use 10ms I think due to
https://cs.chromium.org/ch
michaelt
2016/11/24 10:51:24
I think we should not us 10ms frames since they ar
minyue-webrtc
2016/11/28 15:27:06
It does not sound convincing to me. Are we only de
| |
| 1428 // kMinOverheadBps = OverheadPerPacket * 8 * 1000ms / frame_length(60ms) | |
| 1429 constexpr int kMaxOverheadBps = 23200; | |
| 1430 constexpr int kMinOverheadBps = 7733; | |
|
stefan-webrtc
2016/11/24 10:48:27
This will be hard to maintain. can't we compute th
minyue-webrtc
2016/11/28 15:27:06
It looks like that the problem is that the min fra
stefan-webrtc
2016/12/22 09:06:25
I still don't really follow. How are they differen
| |
| 1431 config_.min_bitrate_bps = kOpusMinBitrateBps + kMinOverheadBps; | |
| 1432 config_.max_bitrate_bps = kOpusBitrateFbBps + kMaxOverheadBps; | |
| 1433 } else { | |
| 1434 config_.min_bitrate_bps = kOpusMinBitrateBps; | |
| 1435 config_.max_bitrate_bps = kOpusBitrateFbBps; | |
| 1436 } | |
| 1425 } | 1437 } |
| 1426 stream_ = call_->CreateAudioSendStream(config_); | 1438 stream_ = call_->CreateAudioSendStream(config_); |
| 1427 RTC_CHECK(stream_); | 1439 RTC_CHECK(stream_); |
| 1428 UpdateSendState(); | 1440 UpdateSendState(); |
| 1429 } | 1441 } |
| 1430 | 1442 |
| 1431 rtc::ThreadChecker worker_thread_checker_; | 1443 rtc::ThreadChecker worker_thread_checker_; |
| 1432 rtc::RaceChecker audio_capture_race_checker_; | 1444 rtc::RaceChecker audio_capture_race_checker_; |
| 1433 webrtc::AudioTransport* const voe_audio_transport_ = nullptr; | 1445 webrtc::AudioTransport* const voe_audio_transport_ = nullptr; |
| 1434 webrtc::Call* call_ = nullptr; | 1446 webrtc::Call* call_ = nullptr; |
| (...skipping 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2638 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 2650 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
| 2639 const auto it = send_streams_.find(ssrc); | 2651 const auto it = send_streams_.find(ssrc); |
| 2640 if (it != send_streams_.end()) { | 2652 if (it != send_streams_.end()) { |
| 2641 return it->second->channel(); | 2653 return it->second->channel(); |
| 2642 } | 2654 } |
| 2643 return -1; | 2655 return -1; |
| 2644 } | 2656 } |
| 2645 } // namespace cricket | 2657 } // namespace cricket |
| 2646 | 2658 |
| 2647 #endif // HAVE_WEBRTC_VOICE | 2659 #endif // HAVE_WEBRTC_VOICE |
| OLD | NEW |