Chromium Code Reviews| 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 |