| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 bool SetFec(bool enable) override; | 86 bool SetFec(bool enable) override; |
| 87 | 87 |
| 88 // Set Opus DTX. Once enabled, Opus stops transmission, when it detects voice | 88 // Set Opus DTX. Once enabled, Opus stops transmission, when it detects voice |
| 89 // being inactive. During that, it still sends 2 packets (one for content, one | 89 // being inactive. During that, it still sends 2 packets (one for content, one |
| 90 // for signaling) about every 400 ms. | 90 // for signaling) about every 400 ms. |
| 91 bool SetDtx(bool enable) override; | 91 bool SetDtx(bool enable) override; |
| 92 | 92 |
| 93 bool SetApplication(Application application) override; | 93 bool SetApplication(Application application) override; |
| 94 bool SetMaxPlaybackRate(int frequency_hz) override; | 94 bool SetMaxPlaybackRate(int frequency_hz) override; |
| 95 AudioEncoderOpus::ApplicationMode application() const { | 95 AudioEncoderOpus::ApplicationMode application() const { |
| 96 CriticalSectionScoped cs(encoder_lock_.get()); |
| 96 return encoder()->application(); | 97 return encoder()->application(); |
| 97 } | 98 } |
| 98 double packet_loss_rate() const { return encoder()->packet_loss_rate(); } | 99 double packet_loss_rate() const { |
| 99 bool dtx_enabled() const { return encoder()->dtx_enabled(); } | 100 CriticalSectionScoped cs(encoder_lock_.get()); |
| 101 return encoder()->packet_loss_rate(); |
| 102 } |
| 103 bool dtx_enabled() const { |
| 104 CriticalSectionScoped cs(encoder_lock_.get()); |
| 105 return encoder()->dtx_enabled(); |
| 106 } |
| 100 }; | 107 }; |
| 101 | 108 |
| 102 } // namespace webrtc | 109 } // namespace webrtc |
| 103 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_OPUS_INTERFACE_AUDIO_ENCODER_OPUS_
H_ | 110 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_OPUS_INTERFACE_AUDIO_ENCODER_OPUS_
H_ |
| OLD | NEW |