Lines Matching refs:constraints

21 // Constraint keys. Specified by draft-alvestrand-constraints-resolution-00b
53 // Returns true if |constraint| has mandatory constraints.
54 bool HasMandatoryConstraints(const blink::WebMediaConstraints& constraints) {
56 constraints.getMandatoryConstraints(mandatory_constraints);
60 // Retrieve the desired max width and height from |constraints|. If not set,
64 // constraints are not checked.
65 void GetDesiredMaxWidthAndHeight(const blink::WebMediaConstraints& constraints,
71 constraints,
75 constraints,
81 GetOptionalConstraintValueAsInteger(constraints,
84 GetOptionalConstraintValueAsInteger(constraints,
89 // Retrieve the desired max and min aspect ratio from |constraints|. If not set,
93 // optional constraints are not checked.
95 const blink::WebMediaConstraints& constraints,
102 constraints,
106 constraints,
113 constraints,
117 constraints,
137 // These are actually options, not constraints, so they can be satisfied
147 // Ignore Chrome specific Tab capture constraints.
154 // These constraints are handled by cropping if the camera outputs the wrong
220 // Returns the media::VideoCaptureFormats that matches |constraints|.
222 const blink::WebMediaConstraints& constraints,
225 if (constraints.isNull()) {
231 GetDesiredMinAndMaxAspectRatio(constraints,
241 GetMandatoryConstraintValueAsInteger(constraints,
245 GetMandatoryConstraintValueAsInteger(constraints,
250 GetDesiredMaxWidthAndHeight(constraints, &max_width, &max_height);
257 if (GetConstraintValueAsDouble(constraints,
260 GetConstraintValueAsDouble(constraints,
271 constraints.getMandatoryConstraints(mandatory);
272 constraints.getOptionalConstraints(optional);
286 // Let's try filtering using the optional constraints. The optional
287 // constraints must be filtered in the order they occur in |optional|.
321 // constraints are provided. We don't just select the maximum supported
327 const blink::WebMediaConstraints& constraints,
333 GetDesiredMaxWidthAndHeight(constraints, &max_width, &max_height);
372 const blink::WebMediaConstraints& constraints,
375 DCHECK(!constraints.isNull());
381 RequestedConstraints(track, frame_callback, constraints, callback));
388 GetMandatoryConstraintValueAsInteger(constraints, kMaxWidth,
392 GetMandatoryConstraintValueAsInteger(constraints, kMaxHeight,
396 if (!GetConstraintValueAsDouble(constraints, kMaxFrameRate,
432 // Check if |video_track| is waiting for applying new constraints and remove
494 // Find the first constraints that we can fulfill.
499 request_it->constraints;
502 // no mandatory constraints have been specified. That just means that
512 // A request with constraints that can be fulfilled.
556 if (HasMandatoryConstraints(it->constraints) &&
557 FilterFormats(it->constraints, formats,
567 GetDesiredMaxWidthAndHeight(it->constraints, &max_width, &max_height);
570 GetDesiredMinAndMaxAspectRatio(it->constraints,
574 GetConstraintValueAsDouble(it->constraints,
616 const blink::WebMediaConstraints& constraints,
620 constraints(constraints),