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

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

Issue 2681733002: Remove workaround for bug 6986 (Closed)
Patch Set: rebase 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
« no previous file with comments | « no previous file | no next file » | 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) 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 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after
1370 WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId), 1370 WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId),
1371 "Channel::SetRecPayloadType()"); 1371 "Channel::SetRecPayloadType()");
1372 1372
1373 if (channel_state_.Get().playing) { 1373 if (channel_state_.Get().playing) {
1374 _engineStatisticsPtr->SetLastError( 1374 _engineStatisticsPtr->SetLastError(
1375 VE_ALREADY_PLAYING, kTraceError, 1375 VE_ALREADY_PLAYING, kTraceError,
1376 "SetRecPayloadType() unable to set PT while playing"); 1376 "SetRecPayloadType() unable to set PT while playing");
1377 return -1; 1377 return -1;
1378 } 1378 }
1379 1379
1380 const CodecInst codec = [&] { 1380 const CodecInst codec = SdpToCodecInst(payload_type, format);
1381 CodecInst c = SdpToCodecInst(payload_type, format);
1382
1383 // Bug 6986: Emulate an old bug that caused us to always choose to decode
1384 // Opus in stereo. To be able to remove this, we first need to fix the
1385 // other half of bug 6986, which is about losing the Opus "stereo"
1386 // parameter.
1387 // TODO(kwiberg): Remove this special case, a.k.a. fix bug 6986.
1388 if (STR_CASE_CMP(codec.plname, "opus") == 0) {
1389 c.channels = 2;
1390 }
1391
1392 return c;
1393 }();
1394 1381
1395 if (payload_type == -1) { 1382 if (payload_type == -1) {
1396 // De-register the selected codec (RTP/RTCP module and ACM) 1383 // De-register the selected codec (RTP/RTCP module and ACM)
1397 1384
1398 int8_t pltype(-1); 1385 int8_t pltype(-1);
1399 CodecInst rxCodec = codec; 1386 CodecInst rxCodec = codec;
1400 1387
1401 // Get payload type for the given codec 1388 // Get payload type for the given codec
1402 rtp_payload_registry_->ReceivePayloadType(rxCodec, &pltype); 1389 rtp_payload_registry_->ReceivePayloadType(rxCodec, &pltype);
1403 rxCodec.pltype = pltype; 1390 rxCodec.pltype = pltype;
(...skipping 1672 matching lines...) Expand 10 before | Expand all | Expand 10 after
3076 int64_t min_rtt = 0; 3063 int64_t min_rtt = 0;
3077 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != 3064 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) !=
3078 0) { 3065 0) {
3079 return 0; 3066 return 0;
3080 } 3067 }
3081 return rtt; 3068 return rtt;
3082 } 3069 }
3083 3070
3084 } // namespace voe 3071 } // namespace voe
3085 } // namespace webrtc 3072 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698