Chromium Code Reviews

Side by Side Diff: webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t_impl.h

Issue 1883543002: Revert of Remove the deprecated EncodeInternal interface from AudioEncoder (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
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 62 matching lines...)
73 const CodecInst& codec_inst, 73 const CodecInst& codec_inst,
74 const rtc::scoped_refptr<LockedIsacBandwidthInfo>& bwinfo) 74 const rtc::scoped_refptr<LockedIsacBandwidthInfo>& bwinfo)
75 : AudioEncoderIsacT(CreateIsacConfig<T>(codec_inst, bwinfo)) {} 75 : AudioEncoderIsacT(CreateIsacConfig<T>(codec_inst, bwinfo)) {}
76 76
77 template <typename T> 77 template <typename T>
78 AudioEncoderIsacT<T>::~AudioEncoderIsacT() { 78 AudioEncoderIsacT<T>::~AudioEncoderIsacT() {
79 RTC_CHECK_EQ(0, T::Free(isac_state_)); 79 RTC_CHECK_EQ(0, T::Free(isac_state_));
80 } 80 }
81 81
82 template <typename T> 82 template <typename T>
83 size_t AudioEncoderIsacT<T>::MaxEncodedBytes() const {
84 return kSufficientEncodeBufferSizeBytes;
85 }
86
87 template <typename T>
83 int AudioEncoderIsacT<T>::SampleRateHz() const { 88 int AudioEncoderIsacT<T>::SampleRateHz() const {
84 return T::EncSampRate(isac_state_); 89 return T::EncSampRate(isac_state_);
85 } 90 }
86 91
87 template <typename T> 92 template <typename T>
88 size_t AudioEncoderIsacT<T>::NumChannels() const { 93 size_t AudioEncoderIsacT<T>::NumChannels() const {
89 return 1; 94 return 1;
90 } 95 }
91 96
92 template <typename T> 97 template <typename T>
(...skipping 88 matching lines...)
181 // we get an encoding that isn't bit-for-bit identical with what a combined 186 // we get an encoding that isn't bit-for-bit identical with what a combined
182 // encoder+decoder object produces. 187 // encoder+decoder object produces.
183 RTC_CHECK_EQ(0, T::SetDecSampRate(isac_state_, config.sample_rate_hz)); 188 RTC_CHECK_EQ(0, T::SetDecSampRate(isac_state_, config.sample_rate_hz));
184 189
185 config_ = config; 190 config_ = config;
186 } 191 }
187 192
188 } // namespace webrtc 193 } // namespace webrtc
189 194
190 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_AUDIO_ENCODER_ISAC_T_IMPL_H_ 195 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_AUDIO_ENCODER_ISAC_T_IMPL_H_
OLDNEW

Powered by Google App Engine