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 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 if (IsCodec(*voe_codec, kG722CodecName)) { | 491 if (IsCodec(*voe_codec, kG722CodecName)) { |
492 // If the DCHECK triggers, the codec definition in WebRTC VoiceEngine | 492 // If the DCHECK triggers, the codec definition in WebRTC VoiceEngine |
493 // has changed, and this special case is no longer needed. | 493 // has changed, and this special case is no longer needed. |
494 RTC_DCHECK(voe_codec->plfreq != new_plfreq); | 494 RTC_DCHECK(voe_codec->plfreq != new_plfreq); |
495 voe_codec->plfreq = new_plfreq; | 495 voe_codec->plfreq = new_plfreq; |
496 } | 496 } |
497 } | 497 } |
498 }; | 498 }; |
499 | 499 |
500 const WebRtcVoiceCodecs::CodecPref WebRtcVoiceCodecs::kCodecPrefs[14] = { | 500 const WebRtcVoiceCodecs::CodecPref WebRtcVoiceCodecs::kCodecPrefs[14] = { |
| 501 #if WEBRTC_OPUS_SUPPORT_120MS_PTIME |
| 502 {kOpusCodecName, 48000, 2, 111, true, {10, 20, 40, 60, 120}, |
| 503 kOpusMaxBitrateBps}, |
| 504 #else |
501 {kOpusCodecName, 48000, 2, 111, true, {10, 20, 40, 60}, kOpusMaxBitrateBps}, | 505 {kOpusCodecName, 48000, 2, 111, true, {10, 20, 40, 60}, kOpusMaxBitrateBps}, |
| 506 #endif |
502 {kIsacCodecName, 16000, 1, 103, true, {30, 60}, kIsacMaxBitrateBps}, | 507 {kIsacCodecName, 16000, 1, 103, true, {30, 60}, kIsacMaxBitrateBps}, |
503 {kIsacCodecName, 32000, 1, 104, true, {30}, kIsacMaxBitrateBps}, | 508 {kIsacCodecName, 32000, 1, 104, true, {30}, kIsacMaxBitrateBps}, |
504 // G722 should be advertised as 8000 Hz because of the RFC "bug". | 509 // G722 should be advertised as 8000 Hz because of the RFC "bug". |
505 {kG722CodecName, 8000, 1, 9, false, {10, 20, 30, 40, 50, 60}}, | 510 {kG722CodecName, 8000, 1, 9, false, {10, 20, 30, 40, 50, 60}}, |
506 {kIlbcCodecName, 8000, 1, 102, false, {20, 30, 40, 60}}, | 511 {kIlbcCodecName, 8000, 1, 102, false, {20, 30, 40, 60}}, |
507 {kPcmuCodecName, 8000, 1, 0, false, {10, 20, 30, 40, 50, 60}}, | 512 {kPcmuCodecName, 8000, 1, 0, false, {10, 20, 30, 40, 50, 60}}, |
508 {kPcmaCodecName, 8000, 1, 8, false, {10, 20, 30, 40, 50, 60}}, | 513 {kPcmaCodecName, 8000, 1, 8, false, {10, 20, 30, 40, 50, 60}}, |
509 {kCnCodecName, 32000, 1, 106, false, {}}, | 514 {kCnCodecName, 32000, 1, 106, false, {}}, |
510 {kCnCodecName, 16000, 1, 105, false, {}}, | 515 {kCnCodecName, 16000, 1, 105, false, {}}, |
511 {kCnCodecName, 8000, 1, 13, false, {}}, | 516 {kCnCodecName, 8000, 1, 13, false, {}}, |
(...skipping 2193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2705 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 2710 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
2706 const auto it = send_streams_.find(ssrc); | 2711 const auto it = send_streams_.find(ssrc); |
2707 if (it != send_streams_.end()) { | 2712 if (it != send_streams_.end()) { |
2708 return it->second->channel(); | 2713 return it->second->channel(); |
2709 } | 2714 } |
2710 return -1; | 2715 return -1; |
2711 } | 2716 } |
2712 } // namespace cricket | 2717 } // namespace cricket |
2713 | 2718 |
2714 #endif // HAVE_WEBRTC_VOICE | 2719 #endif // HAVE_WEBRTC_VOICE |
OLD | NEW |