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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 if (encoded_bytes == 0) | 138 if (encoded_bytes == 0) |
139 return EncodedInfo(); | 139 return EncodedInfo(); |
140 | 140 |
141 // Got enough input to produce a packet. Return the saved timestamp from | 141 // Got enough input to produce a packet. Return the saved timestamp from |
142 // the first chunk of input that went into the packet. | 142 // the first chunk of input that went into the packet. |
143 packet_in_progress_ = false; | 143 packet_in_progress_ = false; |
144 EncodedInfo info; | 144 EncodedInfo info; |
145 info.encoded_bytes = encoded_bytes; | 145 info.encoded_bytes = encoded_bytes; |
146 info.encoded_timestamp = packet_timestamp_; | 146 info.encoded_timestamp = packet_timestamp_; |
147 info.payload_type = config_.payload_type; | 147 info.payload_type = config_.payload_type; |
| 148 info.encoder_type = CodecType::kIsac; |
148 return info; | 149 return info; |
149 } | 150 } |
150 | 151 |
151 template <typename T> | 152 template <typename T> |
152 void AudioEncoderIsacT<T>::Reset() { | 153 void AudioEncoderIsacT<T>::Reset() { |
153 RecreateEncoderInstance(config_); | 154 RecreateEncoderInstance(config_); |
154 } | 155 } |
155 | 156 |
156 template <typename T> | 157 template <typename T> |
157 void AudioEncoderIsacT<T>::RecreateEncoderInstance(const Config& config) { | 158 void AudioEncoderIsacT<T>::RecreateEncoderInstance(const Config& config) { |
(...skipping 23 matching lines...) Expand all Loading... |
181 // we get an encoding that isn't bit-for-bit identical with what a combined | 182 // we get an encoding that isn't bit-for-bit identical with what a combined |
182 // encoder+decoder object produces. | 183 // encoder+decoder object produces. |
183 RTC_CHECK_EQ(0, T::SetDecSampRate(isac_state_, config.sample_rate_hz)); | 184 RTC_CHECK_EQ(0, T::SetDecSampRate(isac_state_, config.sample_rate_hz)); |
184 | 185 |
185 config_ = config; | 186 config_ = config; |
186 } | 187 } |
187 | 188 |
188 } // namespace webrtc | 189 } // namespace webrtc |
189 | 190 |
190 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_AUDIO_ENCODER_ISAC_T_IMPL_H_ | 191 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_AUDIO_ENCODER_ISAC_T_IMPL_H_ |
OLD | NEW |