Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(448)

Side by Side Diff: webrtc/media/engine/webrtcvoiceengine.cc

Issue 2642923003: Removed double-special-casing of ISAC in libjingle and WebRtcVoE. (Closed)
Patch Set: Rebase Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/media/engine/webrtcvoiceengine_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 voe_codec.pltype = in.id; 364 voe_codec.pltype = in.id;
365 365
366 // Set bitrate if specified. 366 // Set bitrate if specified.
367 if (multi_rate && in.bitrate != 0) { 367 if (multi_rate && in.bitrate != 0) {
368 voe_codec.rate = in.bitrate; 368 voe_codec.rate = in.bitrate;
369 } 369 }
370 370
371 // Reset G722 sample rate to 16000 to match WebRTC. 371 // Reset G722 sample rate to 16000 to match WebRTC.
372 MaybeFixupG722(&voe_codec, 16000); 372 MaybeFixupG722(&voe_codec, 16000);
373 373
374 // Apply codec-specific settings.
375 if (IsCodec(codec, kIsacCodecName)) {
376 // If ISAC and an explicit bitrate is not specified,
377 // enable auto bitrate adjustment.
378 voe_codec.rate = (in.bitrate > 0) ? in.bitrate : -1;
379 }
380 *out = voe_codec; 374 *out = voe_codec;
381 } 375 }
382 return true; 376 return true;
383 } 377 }
384 } 378 }
385 return false; 379 return false;
386 } 380 }
387 381
388 static bool IsCodecMultiRate(const webrtc::CodecInst& codec) { 382 static bool IsCodecMultiRate(const webrtc::CodecInst& codec) {
389 for (size_t i = 0; i < arraysize(kCodecPrefs); ++i) { 383 for (size_t i = 0; i < arraysize(kCodecPrefs); ++i) {
(...skipping 2321 matching lines...) Expand 10 before | Expand all | Expand 10 after
2711 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); 2705 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
2712 const auto it = send_streams_.find(ssrc); 2706 const auto it = send_streams_.find(ssrc);
2713 if (it != send_streams_.end()) { 2707 if (it != send_streams_.end()) {
2714 return it->second->channel(); 2708 return it->second->channel();
2715 } 2709 }
2716 return -1; 2710 return -1;
2717 } 2711 }
2718 } // namespace cricket 2712 } // namespace cricket
2719 2713
2720 #endif // HAVE_WEBRTC_VOICE 2714 #endif // HAVE_WEBRTC_VOICE
OLDNEW
« no previous file with comments | « no previous file | webrtc/media/engine/webrtcvoiceengine_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698