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

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: Fix an ambiguous function 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
Index: webrtc/api/localaudiosource.cc
diff --git a/webrtc/api/localaudiosource.cc b/webrtc/api/localaudiosource.cc
index 4b961cf2a9791c218d3156ebdc8d2361a3d7d297..5fcfe73779389146809201e3cf5fa7e95b98ba79 100644
--- a/webrtc/api/localaudiosource.cc
+++ b/webrtc/api/localaudiosource.cc
@@ -77,6 +77,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) {
@@ -93,4 +102,14 @@ void LocalAudioSource::Initialize(
source_state_ = kLive;
}
+void LocalAudioSource::Initialize(
+ const PeerConnectionFactoryInterface::Options& options,
+ const cricket::AudioOptions* audio_options) {
+ if (!audio_options)
perkj_webrtc 2016/02/23 11:40:18 I think you should allow audio_options == nullptr
hta-webrtc 2016/02/23 14:30:34 The constructor sets source_state_(kInitializing).
nisse-webrtc 2016/02/23 15:11:02 If it's possible to delete all code dealing with a
perkj_webrtc 2016/03/01 08:41:26 It is probably correct in the base class since for
hta-webrtc 2016/03/02 09:33:40 It is actually not present in the base class. It's
+ return;
+
+ options_ = *audio_options;
+ source_state_ = kLive;
+}
+
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698