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

Unified Diff: talk/media/webrtc/webrtcvoiceengine.h

Issue 1364753002: Simplify handling of options in WebRtcVoiceMediaEngine. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | talk/media/webrtc/webrtcvoiceengine.cc » ('j') | talk/media/webrtc/webrtcvoiceengine.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/media/webrtc/webrtcvoiceengine.h
diff --git a/talk/media/webrtc/webrtcvoiceengine.h b/talk/media/webrtc/webrtcvoiceengine.h
index 19fefced0b850f674727804a0b6874e46811dc4b..8f933276a5378a7cd5b0590d7d2189a3b45fb1ad 100644
--- a/talk/media/webrtc/webrtcvoiceengine.h
+++ b/talk/media/webrtc/webrtcvoiceengine.h
@@ -114,32 +114,16 @@ class WebRtcVoiceEngine
int CreateMediaVoiceChannel();
private:
- typedef std::vector<WebRtcVoiceMediaChannel*> ChannelList;
-
void Construct();
void ConstructCodecs();
bool GetVoeCodec(int index, webrtc::CodecInst* codec);
bool InitInternal();
void SetTraceFilter(int filter);
void SetTraceOptions(const std::string& options);
- // Applies either options or overrides. Every option that is "set"
- // will be applied. Every option not "set" will be ignored. This
- // allows us to selectively turn on and off different options easily
- // at any time.
+ // Every option that is "set" will be applied. Every option not "set" will be
+ // ignored. This allows us to selectively turn on and off different options
+ // easily at any time.
bool ApplyOptions(const AudioOptions& options);
- // Overrides, when set, take precedence over the options on a
- // per-option basis. For example, if AGC is set in options and AEC
- // is set in overrides, AGC and AEC will be both be set. Overrides
- // can also turn off options. For example, if AGC is set to "on" in
- // options and AGC is set to "off" in overrides, the result is that
- // AGC will be off until different overrides are applied or until
- // the overrides are cleared. Only one set of overrides is present
- // at a time (they do not "stack"). And when the overrides are
- // cleared, the media engine's state reverts back to the options set
- // via SetOptions. This allows us to have both "persistent options"
- // (the normal options) and "temporary options" (overrides).
- bool SetOptionOverrides(const AudioOptions& options);
- bool ClearOptionOverrides();
// webrtc::TraceCallback:
void Print(webrtc::TraceLevel level, const char* trace, int length) override;
@@ -171,7 +155,7 @@ class WebRtcVoiceEngine
bool is_dumping_aec_;
std::vector<AudioCodec> codecs_;
std::vector<RtpHeaderExtension> rtp_header_extensions_;
- ChannelList channels_;
+ std::vector<WebRtcVoiceMediaChannel*> channels_;
// channels_ can be read from WebRtc callback thread. We need a lock on that
// callback as well as the RegisterChannel/UnregisterChannel.
rtc::CriticalSection channels_cs_;
@@ -180,14 +164,7 @@ class WebRtcVoiceEngine
webrtc::Config voe_config_;
bool initialized_;
- // See SetOptions and SetOptionOverrides for a description of the
- // difference between options and overrides.
- // options_ are the base options, which combined with the
- // option_overrides_, create the current options being used.
- // options_ is stored so that when option_overrides_ is cleared, we
- // can restore the options_ without the option_overrides.
AudioOptions options_;
- AudioOptions option_overrides_;
// Cache received extended_filter_aec, delay_agnostic_aec and experimental_ns
// values, and apply them in case they are missing in the audio options. We
« no previous file with comments | « no previous file | talk/media/webrtc/webrtcvoiceengine.cc » ('j') | talk/media/webrtc/webrtcvoiceengine.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698