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

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

Issue 1764583003: Renamed new EncodeInternal to EncodeImpl to ensure proper backwards compatibility. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Clarified doc comments in AudioEncoder. Created 4 years, 9 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } 107 }
108 108
109 template <typename T> 109 template <typename T>
110 int AudioEncoderIsacT<T>::GetTargetBitrate() const { 110 int AudioEncoderIsacT<T>::GetTargetBitrate() const {
111 if (config_.adaptive_mode) 111 if (config_.adaptive_mode)
112 return -1; 112 return -1;
113 return config_.bit_rate == 0 ? kDefaultBitRate : config_.bit_rate; 113 return config_.bit_rate == 0 ? kDefaultBitRate : config_.bit_rate;
114 } 114 }
115 115
116 template <typename T> 116 template <typename T>
117 AudioEncoder::EncodedInfo AudioEncoderIsacT<T>::EncodeInternal( 117 AudioEncoder::EncodedInfo AudioEncoderIsacT<T>::EncodeImpl(
118 uint32_t rtp_timestamp, 118 uint32_t rtp_timestamp,
119 rtc::ArrayView<const int16_t> audio, 119 rtc::ArrayView<const int16_t> audio,
120 rtc::Buffer* encoded) { 120 rtc::Buffer* encoded) {
121 if (!packet_in_progress_) { 121 if (!packet_in_progress_) {
122 // Starting a new packet; remember the timestamp for later. 122 // Starting a new packet; remember the timestamp for later.
123 packet_in_progress_ = true; 123 packet_in_progress_ = true;
124 packet_timestamp_ = rtp_timestamp; 124 packet_timestamp_ = rtp_timestamp;
125 } 125 }
126 if (bwinfo_) { 126 if (bwinfo_) {
127 IsacBandwidthInfo bwinfo = bwinfo_->Get(); 127 IsacBandwidthInfo bwinfo = bwinfo_->Get();
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 // we get an encoding that isn't bit-for-bit identical with what a combined 185 // we get an encoding that isn't bit-for-bit identical with what a combined
186 // encoder+decoder object produces. 186 // encoder+decoder object produces.
187 RTC_CHECK_EQ(0, T::SetDecSampRate(isac_state_, config.sample_rate_hz)); 187 RTC_CHECK_EQ(0, T::SetDecSampRate(isac_state_, config.sample_rate_hz));
188 188
189 config_ = config; 189 config_ = config;
190 } 190 }
191 191
192 } // namespace webrtc 192 } // namespace webrtc
193 193
194 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_AUDIO_ENCODER_ISAC_T_IMPL_H_ 194 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_AUDIO_ENCODER_ISAC_T_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698