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 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 } | 489 } |
490 } | 490 } |
491 return selected_packet_size_ms; | 491 return selected_packet_size_ms; |
492 } | 492 } |
493 | 493 |
494 // Changes RTP timestamp rate of G722. This is due to the "bug" in the RFC | 494 // Changes RTP timestamp rate of G722. This is due to the "bug" in the RFC |
495 // which says that G722 should be advertised as 8 kHz although it is a 16 kHz | 495 // which says that G722 should be advertised as 8 kHz although it is a 16 kHz |
496 // codec. | 496 // codec. |
497 static void MaybeFixupG722(webrtc::CodecInst* voe_codec, int new_plfreq) { | 497 static void MaybeFixupG722(webrtc::CodecInst* voe_codec, int new_plfreq) { |
498 if (IsCodec(*voe_codec, kG722CodecName)) { | 498 if (IsCodec(*voe_codec, kG722CodecName)) { |
499 // If the ASSERT triggers, the codec definition in WebRTC VoiceEngine | 499 // If the DCHECK triggers, the codec definition in WebRTC VoiceEngine |
500 // has changed, and this special case is no longer needed. | 500 // has changed, and this special case is no longer needed. |
501 RTC_DCHECK(voe_codec->plfreq != new_plfreq); | 501 RTC_DCHECK(voe_codec->plfreq != new_plfreq); |
502 voe_codec->plfreq = new_plfreq; | 502 voe_codec->plfreq = new_plfreq; |
503 } | 503 } |
504 } | 504 } |
505 }; | 505 }; |
506 | 506 |
507 const WebRtcVoiceCodecs::CodecPref WebRtcVoiceCodecs::kCodecPrefs[14] = { | 507 const WebRtcVoiceCodecs::CodecPref WebRtcVoiceCodecs::kCodecPrefs[14] = { |
508 {kOpusCodecName, 48000, 2, 111, true, {10, 20, 40, 60}, kOpusMaxBitrateBps}, | 508 {kOpusCodecName, 48000, 2, 111, true, {10, 20, 40, 60}, kOpusMaxBitrateBps}, |
509 {kIsacCodecName, 16000, 1, 103, true, {30, 60}, kIsacMaxBitrateBps}, | 509 {kIsacCodecName, 16000, 1, 103, true, {30, 60}, kIsacMaxBitrateBps}, |
(...skipping 2203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2713 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 2713 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
2714 const auto it = send_streams_.find(ssrc); | 2714 const auto it = send_streams_.find(ssrc); |
2715 if (it != send_streams_.end()) { | 2715 if (it != send_streams_.end()) { |
2716 return it->second->channel(); | 2716 return it->second->channel(); |
2717 } | 2717 } |
2718 return -1; | 2718 return -1; |
2719 } | 2719 } |
2720 } // namespace cricket | 2720 } // namespace cricket |
2721 | 2721 |
2722 #endif // HAVE_WEBRTC_VOICE | 2722 #endif // HAVE_WEBRTC_VOICE |
OLD | NEW |