Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

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

Issue 1967503002: Audio codec usage statistics (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 return info; 148 return info;
149 } 149 }
150 150
151 template <typename T> 151 template <typename T>
152 const char* AudioEncoderIsacT<T>::GetCodecName() const {
153 return "iSAC";
154 }
155
156 template <typename T>
152 void AudioEncoderIsacT<T>::Reset() { 157 void AudioEncoderIsacT<T>::Reset() {
153 RecreateEncoderInstance(config_); 158 RecreateEncoderInstance(config_);
154 } 159 }
155 160
156 template <typename T> 161 template <typename T>
157 void AudioEncoderIsacT<T>::RecreateEncoderInstance(const Config& config) { 162 void AudioEncoderIsacT<T>::RecreateEncoderInstance(const Config& config) {
158 RTC_CHECK(config.IsOk()); 163 RTC_CHECK(config.IsOk());
159 packet_in_progress_ = false; 164 packet_in_progress_ = false;
160 bwinfo_ = config.bwinfo; 165 bwinfo_ = config.bwinfo;
161 if (isac_state_) 166 if (isac_state_)
(...skipping 19 matching lines...) Expand all
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
This is Rietveld 408576698