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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 virtual bool SetDtx(bool enable); | 118 virtual bool SetDtx(bool enable); |
119 | 119 |
120 // Sets the application mode. Returns true if the codec was able to comply. | 120 // Sets the application mode. Returns true if the codec was able to comply. |
121 // The default implementation just returns false. | 121 // The default implementation just returns false. |
122 enum class Application { kSpeech, kAudio }; | 122 enum class Application { kSpeech, kAudio }; |
123 virtual bool SetApplication(Application application); | 123 virtual bool SetApplication(Application application); |
124 | 124 |
125 // Tells the encoder about the highest sample rate the decoder is expected to | 125 // Tells the encoder about the highest sample rate the decoder is expected to |
126 // use when decoding the bitstream. The encoder would typically use this | 126 // use when decoding the bitstream. The encoder would typically use this |
127 // information to adjust the quality of the encoding. The default | 127 // information to adjust the quality of the encoding. The default |
128 // implementation just returns true. | 128 // implementation does nothing. |
129 virtual void SetMaxPlaybackRate(int frequency_hz); | 129 virtual void SetMaxPlaybackRate(int frequency_hz); |
130 | 130 |
131 // Tells the encoder what the projected packet loss rate is. The rate is in | 131 // Tells the encoder what the projected packet loss rate is. The rate is in |
132 // the range [0.0, 1.0]. The encoder would typically use this information to | 132 // the range [0.0, 1.0]. The encoder would typically use this information to |
133 // adjust channel coding efforts, such as FEC. The default implementation | 133 // adjust channel coding efforts, such as FEC. The default implementation |
134 // does nothing. | 134 // does nothing. |
135 virtual void SetProjectedPacketLossRate(double fraction); | 135 virtual void SetProjectedPacketLossRate(double fraction); |
136 | 136 |
137 // Tells the encoder what average bitrate we'd like it to produce. The | 137 // Tells the encoder what average bitrate we'd like it to produce. The |
138 // encoder is free to adjust or disregard the given bitrate (the default | 138 // encoder is free to adjust or disregard the given bitrate (the default |
139 // implementation does the latter). | 139 // implementation does the latter). |
140 virtual void SetTargetBitrate(int target_bps); | 140 virtual void SetTargetBitrate(int target_bps); |
141 }; | 141 }; |
142 } // namespace webrtc | 142 } // namespace webrtc |
143 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_H_ | 143 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_H_ |
OLD | NEW |