OLD | NEW |
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 Loading... |
1316 if (_rtpRtcpModule->RegisterSendPayload(codec) != 0) { | 1316 if (_rtpRtcpModule->RegisterSendPayload(codec) != 0) { |
1317 _rtpRtcpModule->DeRegisterSendPayload(codec.pltype); | 1317 _rtpRtcpModule->DeRegisterSendPayload(codec.pltype); |
1318 if (_rtpRtcpModule->RegisterSendPayload(codec) != 0) { | 1318 if (_rtpRtcpModule->RegisterSendPayload(codec) != 0) { |
1319 WEBRTC_TRACE(kTraceError, kTraceVoice, VoEId(_instanceId, _channelId), | 1319 WEBRTC_TRACE(kTraceError, kTraceVoice, VoEId(_instanceId, _channelId), |
1320 "SetSendCodec() failed to register codec to" | 1320 "SetSendCodec() failed to register codec to" |
1321 " RTP/RTCP module"); | 1321 " RTP/RTCP module"); |
1322 return -1; | 1322 return -1; |
1323 } | 1323 } |
1324 } | 1324 } |
1325 | 1325 |
1326 if (_rtpRtcpModule->SetAudioPacketSize(codec.pacsize) != 0) { | |
1327 WEBRTC_TRACE(kTraceError, kTraceVoice, VoEId(_instanceId, _channelId), | |
1328 "SetSendCodec() failed to set audio packet size"); | |
1329 return -1; | |
1330 } | |
1331 | |
1332 return 0; | 1326 return 0; |
1333 } | 1327 } |
1334 | 1328 |
1335 void Channel::SetBitRate(int bitrate_bps, int64_t probing_interval_ms) { | 1329 void Channel::SetBitRate(int bitrate_bps, int64_t probing_interval_ms) { |
1336 WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId), | 1330 WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId), |
1337 "Channel::SetBitRate(bitrate_bps=%d)", bitrate_bps); | 1331 "Channel::SetBitRate(bitrate_bps=%d)", bitrate_bps); |
1338 audio_coding_->ModifyEncoder([&](std::unique_ptr<AudioEncoder>* encoder) { | 1332 audio_coding_->ModifyEncoder([&](std::unique_ptr<AudioEncoder>* encoder) { |
1339 if (*encoder) | 1333 if (*encoder) |
1340 (*encoder)->OnReceivedTargetAudioBitrate(bitrate_bps); | 1334 (*encoder)->OnReceivedTargetAudioBitrate(bitrate_bps); |
1341 }); | 1335 }); |
(...skipping 1943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3285 int64_t min_rtt = 0; | 3279 int64_t min_rtt = 0; |
3286 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != | 3280 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != |
3287 0) { | 3281 0) { |
3288 return 0; | 3282 return 0; |
3289 } | 3283 } |
3290 return rtt; | 3284 return rtt; |
3291 } | 3285 } |
3292 | 3286 |
3293 } // namespace voe | 3287 } // namespace voe |
3294 } // namespace webrtc | 3288 } // namespace webrtc |
OLD | NEW |