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

Unified Diff: webrtc/api/localaudiosource.cc

Issue 2408143003: Added a level controller initialization value to MediaConstraints. (Closed)
Patch Set: Improve documenting comment. 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') | webrtc/api/mediaconstraintsinterface.h » ('J')
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..6f716088b04318cda9ff37230816fec177b416a3 100644
--- a/webrtc/api/localaudiosource.cc
+++ b/webrtc/api/localaudiosource.cc
@@ -66,6 +66,17 @@ void FromConstraints(const MediaConstraintsInterface::Constraints& constraints,
entry.value = rtc::Optional<bool>(value);
}
}
+
+ 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);
+ }
+ }
aleloi 2016/10/12 11:43:09 I'm not sure about this. Maybe we should change th
peah-webrtc 2016/10/13 10:23:48 I think it is fine to have them separated like thi
aleloi 2016/10/13 10:30:47 Acknowledged.
}
} // namespace
« no previous file with comments | « no previous file | webrtc/api/mediaconstraintsinterface.h » ('j') | webrtc/api/mediaconstraintsinterface.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698