Lines Matching refs:constraint

51 // Default resolution. If no constraint is specified, this is the resolution we
91 // Updates |format_upper_limit| from |constraint|.
92 // If constraint.maxFoo is smaller than format_upper_limit.foo,
93 // set format_upper_limit.foo to constraint.maxFoo.
95 const MediaConstraintsInterface::Constraint& constraint,
97 if (constraint.key == MediaConstraintsInterface::kMaxWidth) {
98 int value = rtc::FromString<int>(constraint.value);
100 } else if (constraint.key == MediaConstraintsInterface::kMaxHeight) {
101 int value = rtc::FromString<int>(constraint.value);
124 // Returns true if |constraint| is fulfilled. |format_out| can differ from
125 // |format_in| if the format is changed by the constraint. Ie - the frame rate
128 const MediaConstraintsInterface::Constraint& constraint,
135 if (constraint.key == MediaConstraintsInterface::kMinWidth) {
136 int value = rtc::FromString<int>(constraint.value);
138 } else if (constraint.key == MediaConstraintsInterface::kMaxWidth) {
139 int value = rtc::FromString<int>(constraint.value);
141 } else if (constraint.key == MediaConstraintsInterface::kMinHeight) {
142 int value = rtc::FromString<int>(constraint.value);
144 } else if (constraint.key == MediaConstraintsInterface::kMaxHeight) {
145 int value = rtc::FromString<int>(constraint.value);
147 } else if (constraint.key == MediaConstraintsInterface::kMinFrameRate) {
148 int value = rtc::FromString<int>(constraint.value);
150 } else if (constraint.key == MediaConstraintsInterface::kMaxFrameRate) {
151 int value = rtc::FromString<int>(constraint.value);
154 // TODO(ronghuawu): Convert the constraint value to float when sub-1fps
164 } else if (constraint.key == MediaConstraintsInterface::kMinAspectRatio) {
165 double value = rtc::FromString<double>(constraint.value);
166 // The aspect ratio in |constraint.value| has been converted to a string and
174 } else if (constraint.key == MediaConstraintsInterface::kMaxAspectRatio) {
175 double value = rtc::FromString<double>(constraint.value);
180 } else if (constraint.key == MediaConstraintsInterface::kNoiseReduction) {
185 LOG(LS_WARNING) << "Found unknown MediaStream constraint. Name:"
186 << constraint.key << " Value:" << constraint.value;
190 // Removes cricket::VideoFormats from |formats| that don't meet |constraint|.
192 const MediaConstraintsInterface::Constraint& constraint,
198 // Modify the format_it to fulfill the constraint if possible.
200 if (!NewFormatWithConstraints(constraint, (*format_it),