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

Unified Diff: content/renderer/media/webrtc/peer_connection_dependency_factory.cc

Issue 367923004: Turn audio ducking on by default on Windows again. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 6 years, 5 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: content/renderer/media/webrtc/peer_connection_dependency_factory.cc
diff --git a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
index f2f7f1d109b24b975286dfeeea9a6e48fa2de036..92ea66bde071e455d0af997e4f958a7df71f3425 100644
--- a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
+++ b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
@@ -98,6 +98,14 @@ void HarmonizeConstraintsAndEffects(RTCMediaConstraints* constraints,
}
DVLOG(1) << "Disabling constraint: "
<< kConstraintEffectMap[i].constraint;
+ } else if (kConstraintEffectMap[i].effect ==
+ media::AudioParameters::DUCKING && value && !is_mandatory) {
+ // Special handling of the DUCKING flag that sets the optional
+ // constraint to |false| to match what the device will support.
+ constraints->AddOptional(kConstraintEffectMap[i].constraint,
+ webrtc::MediaConstraintsInterface::kValueFalse, true);
+ // No need to modify |effects| since the ducking flag is already off.
+ DCHECK((*effects & media::AudioParameters::DUCKING) == 0);
}
}
}

Powered by Google App Engine
This is Rietveld 408576698