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

Unified Diff: webrtc/api/localaudiosource.cc

Issue 1717583002: Non-constraint interfaces for all constrainable interfaces (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Review comments Created 4 years, 10 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 | « webrtc/api/localaudiosource.h ('k') | webrtc/api/localaudiosource_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/localaudiosource.cc
diff --git a/webrtc/api/localaudiosource.cc b/webrtc/api/localaudiosource.cc
index a118655516b810e79d93529a35ced3c408c008a5..3b22ad146ef48ebd729397b97c8417d65b005e04 100644
--- a/webrtc/api/localaudiosource.cc
+++ b/webrtc/api/localaudiosource.cc
@@ -76,6 +76,15 @@ rtc::scoped_refptr<LocalAudioSource> LocalAudioSource::Create(
return source;
}
+rtc::scoped_refptr<LocalAudioSource> LocalAudioSource::Create(
+ const PeerConnectionFactoryInterface::Options& options,
+ const cricket::AudioOptions* audio_options) {
+ rtc::scoped_refptr<LocalAudioSource> source(
+ new rtc::RefCountedObject<LocalAudioSource>());
+ source->Initialize(options, audio_options);
+ return source;
+}
+
void LocalAudioSource::Initialize(
const PeerConnectionFactoryInterface::Options& options,
const MediaConstraintsInterface* constraints) {
@@ -89,7 +98,15 @@ void LocalAudioSource::Initialize(
cricket::AudioOptions mandatory_options;
FromConstraints(constraints->GetMandatory(), &mandatory_options);
options_.SetAll(mandatory_options);
- source_state_ = kLive;
+}
+
+void LocalAudioSource::Initialize(
+ const PeerConnectionFactoryInterface::Options& options,
+ const cricket::AudioOptions* audio_options) {
+ if (!audio_options)
+ return;
+
+ options_ = *audio_options;
}
} // namespace webrtc
« no previous file with comments | « webrtc/api/localaudiosource.h ('k') | webrtc/api/localaudiosource_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698