зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1440040 - Properly apply microphone capture settings. r=padenot
MozReview-Commit-ID: 7TqYvHrltxm --HG-- extra : rebase_source : 5a6d972c6e07b17737c17cfa4827cbe5352c852a
This commit is contained in:
Родитель
60f3567035
Коммит
aecea2a024
|
@ -527,7 +527,7 @@ private:
|
|||
void UpdateAGCSettingsIfNeeded(bool aEnable, webrtc::AgcModes aMode);
|
||||
void UpdateNSSettingsIfNeeded(bool aEnable, webrtc::NsModes aMode);
|
||||
|
||||
void SetLastPrefs(const MediaEnginePrefs& aPrefs);
|
||||
void ApplySettings(const MediaEnginePrefs& aPrefs);
|
||||
|
||||
bool HasEnabledTrack() const;
|
||||
|
||||
|
|
|
@ -514,14 +514,14 @@ MediaEngineWebRTCMicrophoneSource::UpdateSingleSource(
|
|||
config.Set<webrtc::DelayAgnostic>(new webrtc::DelayAgnostic(mDelayAgnostic));
|
||||
mAudioProcessing->SetExtraOptions(config);
|
||||
}
|
||||
SetLastPrefs(prefs);
|
||||
mLastPrefs = prefs;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#undef HANDLE_APM_ERROR
|
||||
|
||||
void
|
||||
MediaEngineWebRTCMicrophoneSource::SetLastPrefs(const MediaEnginePrefs& aPrefs)
|
||||
MediaEngineWebRTCMicrophoneSource::ApplySettings(const MediaEnginePrefs& aPrefs)
|
||||
{
|
||||
AssertIsOnOwningThread();
|
||||
|
||||
|
@ -535,6 +535,7 @@ MediaEngineWebRTCMicrophoneSource::SetLastPrefs(const MediaEnginePrefs& aPrefs)
|
|||
break;
|
||||
}
|
||||
}
|
||||
MOZ_DIAGNOSTIC_ASSERT(graph);
|
||||
NS_DispatchToMainThread(media::NewRunnableFrom([that, graph, aPrefs]() mutable {
|
||||
that->mSettings->mEchoCancellation.Value() = aPrefs.mAecOn;
|
||||
that->mSettings->mAutoGainControl.Value() = aPrefs.mAgcOn;
|
||||
|
@ -711,6 +712,8 @@ MediaEngineWebRTCMicrophoneSource::Start(const RefPtr<const AllocationHandle>& a
|
|||
mState = kStarted;
|
||||
}
|
||||
|
||||
ApplySettings(mLastPrefs);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче