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

Unified Diff: webrtc/api/localaudiosource.cc

Issue 2408143003: Added a level controller initialization value to MediaConstraints. (Closed)
Patch Set: Rebase. Created 4 years, 2 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
« no previous file with comments | « no previous file | webrtc/api/mediaconstraintsinterface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/localaudiosource.cc
diff --git a/webrtc/api/localaudiosource.cc b/webrtc/api/localaudiosource.cc
index 53c426e01119900d5eeb5fd4a5524f2f619e954a..d91394eebcfca022e1e4b1270dc15985de4ab065 100644
--- a/webrtc/api/localaudiosource.cc
+++ b/webrtc/api/localaudiosource.cc
@@ -66,6 +66,18 @@ void FromConstraints(const MediaConstraintsInterface::Constraints& constraints,
entry.value = rtc::Optional<bool>(value);
}
}
+
+ // Set non-boolean constraints.
+ std::string value;
+ if (constraints.FindFirst(
+ MediaConstraintsInterface::kLevelControlInitialPeakLevelDBFS,
+ &value)) {
+ float level_control_initial_peak_level_dbfs;
+ if (rtc::FromString(value, &level_control_initial_peak_level_dbfs)) {
+ options->level_control_initial_peak_level_dbfs =
+ rtc::Optional<float>(level_control_initial_peak_level_dbfs);
+ }
+ }
}
} // namespace
« no previous file with comments | « no previous file | webrtc/api/mediaconstraintsinterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698