mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
Bug 1513973 - Remove mutable keyword from MediaEngineWebRTCMicrophoneSource runnables. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D15220 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
8acabc8a13
commit
fef7f858ef
@ -203,9 +203,8 @@ void MediaEngineWebRTCMicrophoneSource::UpdateAECSettings(
|
|||||||
|
|
||||||
RefPtr<MediaEngineWebRTCMicrophoneSource> that = this;
|
RefPtr<MediaEngineWebRTCMicrophoneSource> that = this;
|
||||||
RefPtr<MediaStreamGraphImpl> gripGraph = mStream->GraphImpl();
|
RefPtr<MediaStreamGraphImpl> gripGraph = mStream->GraphImpl();
|
||||||
NS_DispatchToMainThread(
|
NS_DispatchToMainThread(media::NewRunnableFrom(
|
||||||
media::NewRunnableFrom([that, graph = std::move(gripGraph), aEnable,
|
[that, graph = std::move(gripGraph), aEnable, aUseAecMobile, aLevel]() {
|
||||||
aUseAecMobile, aLevel]() mutable {
|
|
||||||
class Message : public ControlMessage {
|
class Message : public ControlMessage {
|
||||||
public:
|
public:
|
||||||
Message(AudioInputProcessing* aInputProcessing, bool aEnable,
|
Message(AudioInputProcessing* aInputProcessing, bool aEnable,
|
||||||
@ -243,7 +242,7 @@ void MediaEngineWebRTCMicrophoneSource::UpdateAGCSettings(
|
|||||||
RefPtr<MediaEngineWebRTCMicrophoneSource> that = this;
|
RefPtr<MediaEngineWebRTCMicrophoneSource> that = this;
|
||||||
RefPtr<MediaStreamGraphImpl> gripGraph = mStream->GraphImpl();
|
RefPtr<MediaStreamGraphImpl> gripGraph = mStream->GraphImpl();
|
||||||
NS_DispatchToMainThread(media::NewRunnableFrom(
|
NS_DispatchToMainThread(media::NewRunnableFrom(
|
||||||
[that, graph = std::move(gripGraph), aEnable, aMode]() mutable {
|
[that, graph = std::move(gripGraph), aEnable, aMode]() {
|
||||||
class Message : public ControlMessage {
|
class Message : public ControlMessage {
|
||||||
public:
|
public:
|
||||||
Message(AudioInputProcessing* aInputProcessing, bool aEnable,
|
Message(AudioInputProcessing* aInputProcessing, bool aEnable,
|
||||||
@ -279,7 +278,7 @@ void MediaEngineWebRTCMicrophoneSource::UpdateNSSettings(
|
|||||||
RefPtr<MediaEngineWebRTCMicrophoneSource> that = this;
|
RefPtr<MediaEngineWebRTCMicrophoneSource> that = this;
|
||||||
RefPtr<MediaStreamGraphImpl> gripGraph = mStream->GraphImpl();
|
RefPtr<MediaStreamGraphImpl> gripGraph = mStream->GraphImpl();
|
||||||
NS_DispatchToMainThread(media::NewRunnableFrom(
|
NS_DispatchToMainThread(media::NewRunnableFrom(
|
||||||
[that, graph = std::move(gripGraph), aEnable, aLevel]() mutable {
|
[that, graph = std::move(gripGraph), aEnable, aLevel]() {
|
||||||
class Message : public ControlMessage {
|
class Message : public ControlMessage {
|
||||||
public:
|
public:
|
||||||
Message(AudioInputProcessing* aInputProcessing, bool aEnable,
|
Message(AudioInputProcessing* aInputProcessing, bool aEnable,
|
||||||
@ -314,9 +313,8 @@ void MediaEngineWebRTCMicrophoneSource::UpdateAPMExtraOptions(
|
|||||||
|
|
||||||
RefPtr<MediaEngineWebRTCMicrophoneSource> that = this;
|
RefPtr<MediaEngineWebRTCMicrophoneSource> that = this;
|
||||||
RefPtr<MediaStreamGraphImpl> gripGraph = mStream->GraphImpl();
|
RefPtr<MediaStreamGraphImpl> gripGraph = mStream->GraphImpl();
|
||||||
NS_DispatchToMainThread(
|
NS_DispatchToMainThread(media::NewRunnableFrom(
|
||||||
media::NewRunnableFrom([that, graph = std::move(gripGraph),
|
[that, graph = std::move(gripGraph), aExtendedFilter, aDelayAgnostic]() {
|
||||||
aExtendedFilter, aDelayAgnostic]() mutable {
|
|
||||||
class Message : public ControlMessage {
|
class Message : public ControlMessage {
|
||||||
public:
|
public:
|
||||||
Message(AudioInputProcessing* aInputProcessing, bool aExtendedFilter,
|
Message(AudioInputProcessing* aInputProcessing, bool aExtendedFilter,
|
||||||
@ -370,7 +368,7 @@ void MediaEngineWebRTCMicrophoneSource::ApplySettings(
|
|||||||
RefPtr<MediaEngineWebRTCMicrophoneSource> that = this;
|
RefPtr<MediaEngineWebRTCMicrophoneSource> that = this;
|
||||||
RefPtr<MediaStreamGraphImpl> graphImpl = mStream->GraphImpl();
|
RefPtr<MediaStreamGraphImpl> graphImpl = mStream->GraphImpl();
|
||||||
NS_DispatchToMainThread(media::NewRunnableFrom(
|
NS_DispatchToMainThread(media::NewRunnableFrom(
|
||||||
[that, graph = std::move(graphImpl), prefs = aPrefs]() mutable {
|
[that, graph = std::move(graphImpl), prefs = aPrefs]() {
|
||||||
that->mSettings->mEchoCancellation.Value() = prefs.mAecOn;
|
that->mSettings->mEchoCancellation.Value() = prefs.mAecOn;
|
||||||
that->mSettings->mAutoGainControl.Value() = prefs.mAgcOn;
|
that->mSettings->mAutoGainControl.Value() = prefs.mAgcOn;
|
||||||
that->mSettings->mNoiseSuppression.Value() = prefs.mNoiseOn;
|
that->mSettings->mNoiseSuppression.Value() = prefs.mNoiseOn;
|
||||||
@ -428,14 +426,13 @@ nsresult MediaEngineWebRTCMicrophoneSource::Allocate(
|
|||||||
}
|
}
|
||||||
|
|
||||||
RefPtr<MediaEngineWebRTCMicrophoneSource> that = this;
|
RefPtr<MediaEngineWebRTCMicrophoneSource> that = this;
|
||||||
NS_DispatchToMainThread(
|
NS_DispatchToMainThread(media::NewRunnableFrom([that, prefs = outputPrefs]() {
|
||||||
media::NewRunnableFrom([that, prefs = outputPrefs]() mutable {
|
that->mSettings->mEchoCancellation.Value() = prefs.mAecOn;
|
||||||
that->mSettings->mEchoCancellation.Value() = prefs.mAecOn;
|
that->mSettings->mAutoGainControl.Value() = prefs.mAgcOn;
|
||||||
that->mSettings->mAutoGainControl.Value() = prefs.mAgcOn;
|
that->mSettings->mNoiseSuppression.Value() = prefs.mNoiseOn;
|
||||||
that->mSettings->mNoiseSuppression.Value() = prefs.mNoiseOn;
|
that->mSettings->mChannelCount.Value() = prefs.mChannels;
|
||||||
that->mSettings->mChannelCount.Value() = prefs.mChannels;
|
return NS_OK;
|
||||||
return NS_OK;
|
}));
|
||||||
}));
|
|
||||||
|
|
||||||
mCurrentPrefs = outputPrefs;
|
mCurrentPrefs = outputPrefs;
|
||||||
|
|
||||||
@ -473,7 +470,7 @@ nsresult MediaEngineWebRTCMicrophoneSource::Deallocate(
|
|||||||
NS_DispatchToMainThread(media::NewRunnableFrom(
|
NS_DispatchToMainThread(media::NewRunnableFrom(
|
||||||
[stream = std::move(sourceStream),
|
[stream = std::move(sourceStream),
|
||||||
audioInputProcessing = std::move(inputProcessing),
|
audioInputProcessing = std::move(inputProcessing),
|
||||||
trackID = mTrackID]() mutable {
|
trackID = mTrackID]() {
|
||||||
if (stream->IsDestroyed()) {
|
if (stream->IsDestroyed()) {
|
||||||
// This stream has already been destroyed on main thread by its
|
// This stream has already been destroyed on main thread by its
|
||||||
// DOMMediaStream. No cleanup left to do.
|
// DOMMediaStream. No cleanup left to do.
|
||||||
@ -576,7 +573,7 @@ nsresult MediaEngineWebRTCMicrophoneSource::Start(
|
|||||||
RefPtr<MediaStreamGraphImpl> gripGraph = mStream->GraphImpl();
|
RefPtr<MediaStreamGraphImpl> gripGraph = mStream->GraphImpl();
|
||||||
NS_DispatchToMainThread(
|
NS_DispatchToMainThread(
|
||||||
media::NewRunnableFrom([that, graph = std::move(gripGraph), deviceID,
|
media::NewRunnableFrom([that, graph = std::move(gripGraph), deviceID,
|
||||||
stream = mStream, track = mTrackID]() mutable {
|
stream = mStream, track = mTrackID]() {
|
||||||
if (graph) {
|
if (graph) {
|
||||||
graph->AppendMessage(MakeUnique<StartStopMessage>(
|
graph->AppendMessage(MakeUnique<StartStopMessage>(
|
||||||
that->mInputProcessing, StartStopMessage::Start));
|
that->mInputProcessing, StartStopMessage::Start));
|
||||||
@ -612,7 +609,7 @@ nsresult MediaEngineWebRTCMicrophoneSource::Stop(
|
|||||||
RefPtr<MediaStreamGraphImpl> gripGraph = mStream->GraphImpl();
|
RefPtr<MediaStreamGraphImpl> gripGraph = mStream->GraphImpl();
|
||||||
NS_DispatchToMainThread(
|
NS_DispatchToMainThread(
|
||||||
media::NewRunnableFrom([that, graph = std::move(gripGraph),
|
media::NewRunnableFrom([that, graph = std::move(gripGraph),
|
||||||
stream = mStream, track = mTrackID]() mutable {
|
stream = mStream, track = mTrackID]() {
|
||||||
if (graph) {
|
if (graph) {
|
||||||
graph->AppendMessage(MakeUnique<StartStopMessage>(
|
graph->AppendMessage(MakeUnique<StartStopMessage>(
|
||||||
that->mInputProcessing, StartStopMessage::Stop));
|
that->mInputProcessing, StartStopMessage::Stop));
|
||||||
|
Loading…
Reference in New Issue
Block a user