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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 // encoder is free to adjust or disregard the given bitrate (the default | 128 // encoder is free to adjust or disregard the given bitrate (the default |
129 // implementation does the latter). | 129 // implementation does the latter). |
130 virtual void SetTargetBitrate(int target_bps); | 130 virtual void SetTargetBitrate(int target_bps); |
131 | 131 |
132 protected: | 132 protected: |
133 // Subclasses implement this to perform the actual encoding. Called by | 133 // Subclasses implement this to perform the actual encoding. Called by |
134 // Encode(). | 134 // Encode(). |
135 virtual EncodedInfo EncodeImpl(uint32_t rtp_timestamp, | 135 virtual EncodedInfo EncodeImpl(uint32_t rtp_timestamp, |
136 rtc::ArrayView<const int16_t> audio, | 136 rtc::ArrayView<const int16_t> audio, |
137 rtc::Buffer* encoded) = 0; | 137 rtc::Buffer* encoded) = 0; |
138 | |
139 private: | |
140 // This function is deprecated. It was used to return the maximum number of | |
141 // bytes that can be produced by the encoder at each Encode() call. Since the | |
142 // Encode interface was changed to use rtc::Buffer, this is no longer | |
143 // applicable. It is only kept in to avoid breaking subclasses that still have | |
144 // it implemented (with the override attribute). It will be removed as soon | |
145 // as these subclasses have been given a chance to change. | |
146 virtual size_t MaxEncodedBytes() const; | |
147 }; | 138 }; |
148 } // namespace webrtc | 139 } // namespace webrtc |
149 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_H_ | 140 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_H_ |
OLD | NEW |