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

Side by Side Diff: webrtc/voice_engine/channel.cc

Issue 2686043006: WebRtcVoiceMediaChannel::AddRecvStream: Don't call SetRecPayloadType (Closed)
Patch Set: Discard packets when updating payload type map Created 3 years, 9 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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after
1316 int32_t Channel::GetVADStatus(bool& enabledVAD, 1316 int32_t Channel::GetVADStatus(bool& enabledVAD,
1317 ACMVADMode& mode, 1317 ACMVADMode& mode,
1318 bool& disabledDTX) { 1318 bool& disabledDTX) {
1319 const auto* params = codec_manager_.GetStackParams(); 1319 const auto* params = codec_manager_.GetStackParams();
1320 enabledVAD = params->use_cng; 1320 enabledVAD = params->use_cng;
1321 mode = params->vad_mode; 1321 mode = params->vad_mode;
1322 disabledDTX = !params->use_cng; 1322 disabledDTX = !params->use_cng;
1323 return 0; 1323 return 0;
1324 } 1324 }
1325 1325
1326 bool Channel::SetReceiveCodecs(const std::map<int, SdpAudioFormat>& codecs) {
1327 if (!rtp_payload_registry_->SetAudioReceivePayloads(codecs)) {
the sun 2017/03/14 20:07:01 If you remove the return value from the above call
kwiberg-webrtc 2017/03/16 10:24:12 Acknowledged. I'll remove as many of them as I can
1328 return false;
1329 }
1330 audio_coding_->SetReceiveCodecs(codecs);
1331 return true;
1332 }
1333
1326 int32_t Channel::SetRecPayloadType(const CodecInst& codec) { 1334 int32_t Channel::SetRecPayloadType(const CodecInst& codec) {
1327 return SetRecPayloadType(codec.pltype, CodecInstToSdp(codec)); 1335 return SetRecPayloadType(codec.pltype, CodecInstToSdp(codec));
1328 } 1336 }
1329 1337
1330 int32_t Channel::SetRecPayloadType(int payload_type, 1338 int32_t Channel::SetRecPayloadType(int payload_type,
1331 const SdpAudioFormat& format) { 1339 const SdpAudioFormat& format) {
1332 WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId), 1340 WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId),
1333 "Channel::SetRecPayloadType()"); 1341 "Channel::SetRecPayloadType()");
1334 1342
1335 if (channel_state_.Get().playing) { 1343 if (channel_state_.Get().playing) {
(...skipping 1656 matching lines...) Expand 10 before | Expand all | Expand 10 after
2992 int64_t min_rtt = 0; 3000 int64_t min_rtt = 0;
2993 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != 3001 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) !=
2994 0) { 3002 0) {
2995 return 0; 3003 return 0;
2996 } 3004 }
2997 return rtt; 3005 return rtt;
2998 } 3006 }
2999 3007
3000 } // namespace voe 3008 } // namespace voe
3001 } // namespace webrtc 3009 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698