Chromium Code Reviews
DescriptionSerialize processing of getUserMedia() requests.
This is in anticipation to using the spec-compliant algorithm for
constraints processing.
The standard algorithm requires knowing the capabilities of all devices
before selecting the settings to be used. If two requests are processed
in parallel this can lead to races that would result in unexpected
errors. For example, there may be two requests that require the same
camera but prefer (though not require) different resolutions.
If the requests are handled in parallel and the camera has not been
opened yet, both requests will see that all resolutions are supported
and both will try to open the camera with different resolutions and one
of the requests will fail unxpectedly.
If the requests are handled sequentially, the camera will be opened with
the resolution selected by the first request, and the second request will
see that that resolution is the only available one. If that resolution
satisfies the constraints for the second request, the request will
succeed. Otherwise, it will fail in a spec-compliant way.
This CL also includes:
* A minor refactoring to expose fewer implementation details to the
unit test.
* Removal of some unnecessary includes and logging statements.
* More consistent naming of variables. request_info for
UserMediaRequestInfo and request or user_media_request for
WebUserMediaRequest.
BUG=657733
Review-Url: https://codereview.chromium.org/2764043002
Cr-Commit-Position: refs/heads/master@{#458560}
Committed: https://chromium.googlesource.com/chromium/src/+/d727ed27c3dde3c85195625b97e79472eda73508
Patch Set 1 #
Total comments: 2
Patch Set 2 : Address tommi's comments #
Messages
Total messages: 17 (11 generated)
|
|||||||||||||||||||||||||||||||||||||