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

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

Issue 2013053002: Support for two audio codec lists down into WebRtcVoiceEngine. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@asymmetric-audio-codec-support
Patch Set: Replaced MergeSendRecvCodecs with NegotiateCodecs. Created 4 years, 6 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
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 908 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 return true; 919 return true;
920 } 920 }
921 921
922 int WebRtcVoiceEngine::GetInputLevel() { 922 int WebRtcVoiceEngine::GetInputLevel() {
923 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); 923 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
924 unsigned int ulevel; 924 unsigned int ulevel;
925 return (voe_wrapper_->volume()->GetSpeechInputLevel(ulevel) != -1) ? 925 return (voe_wrapper_->volume()->GetSpeechInputLevel(ulevel) != -1) ?
926 static_cast<int>(ulevel) : -1; 926 static_cast<int>(ulevel) : -1;
927 } 927 }
928 928
929 const std::vector<AudioCodec>& WebRtcVoiceEngine::codecs() { 929 const std::vector<AudioCodec>& WebRtcVoiceEngine::send_codecs() const {
930 RTC_DCHECK(signal_thread_checker_.CalledOnValidThread()); 930 RTC_DCHECK(signal_thread_checker_.CalledOnValidThread());
931 return codecs_; 931 return codecs_;
932 } 932 }
933
934 const std::vector<AudioCodec>& WebRtcVoiceEngine::recv_codecs() const {
935 RTC_DCHECK(signal_thread_checker_.CalledOnValidThread());
936 return codecs_;
937 }
933 938
934 RtpCapabilities WebRtcVoiceEngine::GetCapabilities() const { 939 RtpCapabilities WebRtcVoiceEngine::GetCapabilities() const {
935 RTC_DCHECK(signal_thread_checker_.CalledOnValidThread()); 940 RTC_DCHECK(signal_thread_checker_.CalledOnValidThread());
936 RtpCapabilities capabilities; 941 RtpCapabilities capabilities;
937 capabilities.header_extensions.push_back(RtpHeaderExtension( 942 capabilities.header_extensions.push_back(RtpHeaderExtension(
938 kRtpAudioLevelHeaderExtension, kRtpAudioLevelHeaderExtensionDefaultId)); 943 kRtpAudioLevelHeaderExtension, kRtpAudioLevelHeaderExtensionDefaultId));
939 capabilities.header_extensions.push_back( 944 capabilities.header_extensions.push_back(
940 RtpHeaderExtension(kRtpAbsoluteSenderTimeHeaderExtension, 945 RtpHeaderExtension(kRtpAbsoluteSenderTimeHeaderExtension,
941 kRtpAbsoluteSenderTimeHeaderExtensionDefaultId)); 946 kRtpAbsoluteSenderTimeHeaderExtensionDefaultId));
942 if (webrtc::field_trial::FindFullName("WebRTC-Audio-SendSideBwe") == 947 if (webrtc::field_trial::FindFullName("WebRTC-Audio-SendSideBwe") ==
(...skipping 1616 matching lines...) Expand 10 before | Expand all | Expand 10 after
2559 } 2564 }
2560 } else { 2565 } else {
2561 LOG(LS_INFO) << "Stopping playout for channel #" << channel; 2566 LOG(LS_INFO) << "Stopping playout for channel #" << channel;
2562 engine()->voe()->base()->StopPlayout(channel); 2567 engine()->voe()->base()->StopPlayout(channel);
2563 } 2568 }
2564 return true; 2569 return true;
2565 } 2570 }
2566 } // namespace cricket 2571 } // namespace cricket
2567 2572
2568 #endif // HAVE_WEBRTC_VOICE 2573 #endif // HAVE_WEBRTC_VOICE
OLDNEW
« no previous file with comments | « webrtc/media/engine/webrtcvoiceengine.h ('k') | webrtc/media/engine/webrtcvoiceengine_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698