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 1530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1541 int ret = enable_dtx ? audio_coding_->EnableOpusDtx() | 1541 int ret = enable_dtx ? audio_coding_->EnableOpusDtx() |
1542 : audio_coding_->DisableOpusDtx(); | 1542 : audio_coding_->DisableOpusDtx(); |
1543 if (ret != 0) { | 1543 if (ret != 0) { |
1544 _engineStatisticsPtr->SetLastError(VE_AUDIO_CODING_MODULE_ERROR, | 1544 _engineStatisticsPtr->SetLastError(VE_AUDIO_CODING_MODULE_ERROR, |
1545 kTraceError, "SetOpusDtx() failed"); | 1545 kTraceError, "SetOpusDtx() failed"); |
1546 return -1; | 1546 return -1; |
1547 } | 1547 } |
1548 return 0; | 1548 return 0; |
1549 } | 1549 } |
1550 | 1550 |
| 1551 int Channel::GetOpusDtx(bool* enabled) { |
| 1552 int success = -1; |
| 1553 audio_coding_->QueryEncoder([&](AudioEncoder const* encoder) { |
| 1554 if (encoder) { |
| 1555 *enabled = encoder->GetDtx(); |
| 1556 success = 0; |
| 1557 } |
| 1558 }); |
| 1559 return success; |
| 1560 } |
| 1561 |
1551 int32_t Channel::RegisterExternalTransport(Transport* transport) { | 1562 int32_t Channel::RegisterExternalTransport(Transport* transport) { |
1552 WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId), | 1563 WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId), |
1553 "Channel::RegisterExternalTransport()"); | 1564 "Channel::RegisterExternalTransport()"); |
1554 | 1565 |
1555 rtc::CritScope cs(&_callbackCritSect); | 1566 rtc::CritScope cs(&_callbackCritSect); |
1556 if (_externalTransport) { | 1567 if (_externalTransport) { |
1557 _engineStatisticsPtr->SetLastError( | 1568 _engineStatisticsPtr->SetLastError( |
1558 VE_INVALID_OPERATION, kTraceError, | 1569 VE_INVALID_OPERATION, kTraceError, |
1559 "RegisterExternalTransport() external transport already enabled"); | 1570 "RegisterExternalTransport() external transport already enabled"); |
1560 return -1; | 1571 return -1; |
(...skipping 2001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3562 int64_t min_rtt = 0; | 3573 int64_t min_rtt = 0; |
3563 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != | 3574 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != |
3564 0) { | 3575 0) { |
3565 return 0; | 3576 return 0; |
3566 } | 3577 } |
3567 return rtt; | 3578 return rtt; |
3568 } | 3579 } |
3569 | 3580 |
3570 } // namespace voe | 3581 } // namespace voe |
3571 } // namespace webrtc | 3582 } // namespace webrtc |
OLD | NEW |