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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 size_t Max10MsFramesInAPacket() const override; | 68 size_t Max10MsFramesInAPacket() const override; |
69 int GetTargetBitrate() const override; | 69 int GetTargetBitrate() const override; |
70 | 70 |
71 void Reset() override; | 71 void Reset() override; |
72 bool SetFec(bool enable) override; | 72 bool SetFec(bool enable) override; |
73 | 73 |
74 // Set Opus DTX. Once enabled, Opus stops transmission, when it detects voice | 74 // Set Opus DTX. Once enabled, Opus stops transmission, when it detects voice |
75 // being inactive. During that, it still sends 2 packets (one for content, one | 75 // being inactive. During that, it still sends 2 packets (one for content, one |
76 // for signaling) about every 400 ms. | 76 // for signaling) about every 400 ms. |
77 bool SetDtx(bool enable) override; | 77 bool SetDtx(bool enable) override; |
| 78 bool GetDtx() override; |
78 | 79 |
79 bool SetApplication(Application application) override; | 80 bool SetApplication(Application application) override; |
80 void SetMaxPlaybackRate(int frequency_hz) override; | 81 void SetMaxPlaybackRate(int frequency_hz) override; |
81 void SetProjectedPacketLossRate(double fraction) override; | 82 void SetProjectedPacketLossRate(double fraction) override; |
82 void SetTargetBitrate(int target_bps) override; | 83 void SetTargetBitrate(int target_bps) override; |
83 | 84 |
84 // Getters for testing. | 85 // Getters for testing. |
85 double packet_loss_rate() const { return packet_loss_rate_; } | 86 double packet_loss_rate() const { return packet_loss_rate_; } |
86 ApplicationMode application() const { return config_.application; } | 87 ApplicationMode application() const { return config_.application; } |
87 bool dtx_enabled() const { return config_.dtx_enabled; } | 88 bool dtx_enabled() const { return config_.dtx_enabled; } |
(...skipping 13 matching lines...) Expand all Loading... |
101 double packet_loss_rate_; | 102 double packet_loss_rate_; |
102 std::vector<int16_t> input_buffer_; | 103 std::vector<int16_t> input_buffer_; |
103 OpusEncInst* inst_; | 104 OpusEncInst* inst_; |
104 uint32_t first_timestamp_in_buffer_; | 105 uint32_t first_timestamp_in_buffer_; |
105 RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderOpus); | 106 RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderOpus); |
106 }; | 107 }; |
107 | 108 |
108 } // namespace webrtc | 109 } // namespace webrtc |
109 | 110 |
110 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_OPUS_AUDIO_ENCODER_OPUS_H_ | 111 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_OPUS_AUDIO_ENCODER_OPUS_H_ |
OLD | NEW |