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

Unified Diff: webrtc/modules/audio_coding/main/acm2/codec_owner.h

Issue 1208993010: iSAC: Make separate AudioEncoder and AudioDecoder objects (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: review fixes Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/main/acm2/codec_owner.h
diff --git a/webrtc/modules/audio_coding/main/acm2/codec_owner.h b/webrtc/modules/audio_coding/main/acm2/codec_owner.h
index 2468c3ce00ebd2baf362e9db167c2929bd6060a3..2c5e942ef56da9f16b71ee1cd39be6fe2ac9d700 100644
--- a/webrtc/modules/audio_coding/main/acm2/codec_owner.h
+++ b/webrtc/modules/audio_coding/main/acm2/codec_owner.h
@@ -53,21 +53,17 @@ class CodecOwner {
const AudioEncoderMutable* SpeechEncoder() const;
private:
- // There are three main cases for the state of the encoder members below:
- // 1. An external encoder is used. |external_speech_encoder_| points to it.
- // |speech_encoder_| is null, and |isac_is_encoder_| is false.
- // 2. The internal iSAC codec is used as encoder. |isac_codec_| points to it
- // and |isac_is_encoder_| is true. |external_speech_encoder_| and
- // |speech_encoder_| are null.
- // 3. Another internal encoder is used. |speech_encoder_| points to it.
- // |external_speech_encoder_| is null, and |isac_is_encoder_| is false.
- // In addition to case 2, |isac_codec_| is valid when GetIsacDecoder has been
- // called.
+ // At most one of these is non-null:
rtc::scoped_ptr<AudioEncoderMutable> speech_encoder_;
- rtc::scoped_ptr<AudioEncoderDecoderMutableIsac> isac_codec_;
- bool isac_is_encoder_;
AudioEncoderMutable* external_speech_encoder_;
+ // If we've created an iSAC decoder because someone called GetIsacDecoder,
+ // store it here.
+ rtc::scoped_ptr<AudioDecoder> isac_decoder_;
+
+ // iSAC bandwidth estimation info, for use with iSAC encoders and decoders.
+ LockedIsacBandwidthInfo isac_bandwidth_info_;
+
// |cng_encoder_| and |red_encoder_| are valid iff CNG or RED, respectively,
// are active.
rtc::scoped_ptr<AudioEncoder> cng_encoder_;

Powered by Google App Engine
This is Rietveld 408576698