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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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> | |
88 int AudioEncoderIsacT<T>::SampleRateHz() const { | 83 int AudioEncoderIsacT<T>::SampleRateHz() const { |
89 return T::EncSampRate(isac_state_); | 84 return T::EncSampRate(isac_state_); |
90 } | 85 } |
91 | 86 |
92 template <typename T> | 87 template <typename T> |
93 size_t AudioEncoderIsacT<T>::NumChannels() const { | 88 size_t AudioEncoderIsacT<T>::NumChannels() const { |
94 return 1; | 89 return 1; |
95 } | 90 } |
96 | 91 |
97 template <typename T> | 92 template <typename T> |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 // we get an encoding that isn't bit-for-bit identical with what a combined | 181 // we get an encoding that isn't bit-for-bit identical with what a combined |
187 // encoder+decoder object produces. | 182 // encoder+decoder object produces. |
188 RTC_CHECK_EQ(0, T::SetDecSampRate(isac_state_, config.sample_rate_hz)); | 183 RTC_CHECK_EQ(0, T::SetDecSampRate(isac_state_, config.sample_rate_hz)); |
189 | 184 |
190 config_ = config; | 185 config_ = config; |
191 } | 186 } |
192 | 187 |
193 } // namespace webrtc | 188 } // namespace webrtc |
194 | 189 |
195 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_AUDIO_ENCODER_ISAC_T_IMPL_H_ | 190 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_AUDIO_ENCODER_ISAC_T_IMPL_H_ |
OLD | NEW |