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

Unified Diff: content/renderer/media/media_stream_constraints_util_video_content.cc

Issue 2941553003: Reland "SelectSettings algorithm for audio constraints." (Closed)
Patch Set: fix test Created 3 years, 6 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/media_stream_constraints_util_video_content.cc
diff --git a/content/renderer/media/media_stream_constraints_util_video_content.cc b/content/renderer/media/media_stream_constraints_util_video_content.cc
index 82f447ff50ec80bceac6dd9182847e965ebad910..6eac825dc1c82429eaee6a37b7e073da3b545e37 100644
--- a/content/renderer/media/media_stream_constraints_util_video_content.cc
+++ b/content/renderer/media/media_stream_constraints_util_video_content.cc
@@ -45,7 +45,6 @@ using Point = ResolutionSet::Point;
using StringSet = DiscreteSet<std::string>;
using BoolSet = DiscreteSet<bool>;
-
constexpr double kMinScreenCastAspectRatio =
static_cast<double>(kMinScreenCastDimension) /
static_cast<double>(kMaxScreenCastDimension);
@@ -53,24 +52,6 @@ constexpr double kMaxScreenCastAspectRatio =
static_cast<double>(kMaxScreenCastDimension) /
static_cast<double>(kMinScreenCastDimension);
-StringSet StringSetFromConstraint(const blink::StringConstraint& constraint) {
- if (!constraint.HasExact())
- return StringSet::UniversalSet();
-
- std::vector<std::string> elements;
- for (const auto& entry : constraint.Exact())
- elements.push_back(entry.Ascii());
-
- return StringSet(std::move(elements));
-}
-
-BoolSet BoolSetFromConstraint(const blink::BooleanConstraint& constraint) {
- if (!constraint.HasExact())
- return BoolSet::UniversalSet();
-
- return BoolSet({constraint.Exact()});
-}
-
using DoubleRangeSet = NumericRangeSet<double>;
class VideoContentCaptureCandidates {
@@ -79,9 +60,7 @@ class VideoContentCaptureCandidates {
: has_explicit_max_height_(false),
has_explicit_max_width_(false),
has_explicit_min_frame_rate_(false),
- has_explicit_max_frame_rate_(false),
- device_id_set_(StringSet::UniversalSet()),
- noise_reduction_set_(BoolSet::UniversalSet()) {}
+ has_explicit_max_frame_rate_(false) {}
explicit VideoContentCaptureCandidates(
const blink::WebMediaTrackConstraintSet& constraint_set)
: resolution_set_(ResolutionSet::FromConstraintSet(constraint_set)),

Powered by Google App Engine
This is Rietveld 408576698