Chromium Code Reviews| Index: webrtc/modules/audio_coding/codecs/audio_encoder.h |
| diff --git a/webrtc/modules/audio_coding/codecs/audio_encoder.h b/webrtc/modules/audio_coding/codecs/audio_encoder.h |
| index 3fdee259ce7735567013f052d634e4175661a734..f25d49faf0512051d9bcb5197fbcc625e255696a 100644 |
| --- a/webrtc/modules/audio_coding/codecs/audio_encoder.h |
| +++ b/webrtc/modules/audio_coding/codecs/audio_encoder.h |
| @@ -52,14 +52,6 @@ class AudioEncoder { |
| virtual ~AudioEncoder() = default; |
| - // Returns the maximum number of bytes that can be produced by the encoder |
| - // at each Encode() call. The caller can use the return value to determine |
| - // the size of the buffer that needs to be allocated. This value is allowed |
| - // to depend on encoder parameters like bitrate, frame size etc., so if |
| - // any of these change, the caller of Encode() is responsible for checking |
| - // that the buffer is large enough by calling MaxEncodedBytes() again. |
| - virtual size_t MaxEncodedBytes() const = 0; |
|
kwiberg-webrtc
2016/04/07 08:23:16
If you go straight from having this as a virtual m
ossu
2016/04/07 08:52:53
Didn't we just have a deprecation cycle for this?
kwiberg-webrtc
2016/04/07 09:53:26
Yes, you said it would be going away. But that mai
ossu
2016/04/07 10:42:39
Ah, right, that's true. So, if I put it back in wi
kwiberg-webrtc
2016/04/07 12:31:24
Yes, private + RTC_CHECK(false) sounds good.
|
| - |
| // Returns the input sample rate in Hz and the number of input channels. |
| // These are constants set at instantiation time. |
| virtual int SampleRateHz() const = 0; |
| @@ -95,33 +87,6 @@ class AudioEncoder { |
| rtc::ArrayView<const int16_t> audio, |
| rtc::Buffer* encoded); |
| - // Deprecated interface to Encode (remove eventually, bug 5591). May incur a |
| - // copy. The encoder produces zero or more bytes of output in |encoded| and |
| - // returns additional encoding information. The caller is responsible for |
| - // making sure that |max_encoded_bytes| is not smaller than the number of |
| - // bytes actually produced by the encoder. |
| - RTC_DEPRECATED EncodedInfo Encode(uint32_t rtp_timestamp, |
| - rtc::ArrayView<const int16_t> audio, |
| - size_t max_encoded_bytes, |
| - uint8_t* encoded); |
| - |
| - EncodedInfo DEPRECATED_Encode(uint32_t rtp_timestamp, |
| - rtc::ArrayView<const int16_t> audio, |
| - size_t max_encoded_bytes, |
| - uint8_t* encoded); |
| - |
| - // Deprecated interface EncodeInternal (see bug 5591). May incur a copy. |
| - // Subclasses implement this to perform the actual encoding. Called by |
| - // Encode(). By default, this is implemented as a call to the newer |
| - // EncodeImpl() that accepts an rtc::Buffer instead of a raw pointer. |
| - // That version is protected, so see below. At least one of EncodeInternal |
| - // or EncodeImpl _must_ be implemented by a subclass. |
| - virtual EncodedInfo EncodeInternal( |
| - uint32_t rtp_timestamp, |
| - rtc::ArrayView<const int16_t> audio, |
| - size_t max_encoded_bytes, |
| - uint8_t* encoded); |
| - |
| // Resets the encoder to its starting state, discarding any input that has |
| // been fed to the encoder but not yet emitted in a packet. |
| virtual void Reset() = 0; |
| @@ -162,13 +127,10 @@ class AudioEncoder { |
| protected: |
| // Subclasses implement this to perform the actual encoding. Called by |
| - // Encode(). For compatibility reasons, this is implemented by default as a |
| - // call to the older interface EncodeInternal(). At least one of |
| - // EncodeInternal or EncodeImpl _must_ be implemented by a |
| - // subclass. Preferably this one. |
| + // Encode(). |
| virtual EncodedInfo EncodeImpl(uint32_t rtp_timestamp, |
| rtc::ArrayView<const int16_t> audio, |
| - rtc::Buffer* encoded); |
| + rtc::Buffer* encoded) = 0; |
| }; |
| } // namespace webrtc |
| #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_H_ |