Implement RTCRtpEncodingParameters.scaleResolutionDownTo.
Spec: https://w3c.github.io/webrtc-extensions/#dom-rtcrtpencodingparameters-scaleresolutiondownto
Wires up scaleResolutionDownTo[1] to JS behind RuntimeEnabled flag
"RTCRtpScaleResolutionDownTo". This is implemented in third_party/webrtc
where it is called requested_resolution
.
WPTs are added to test basic functionality, including getting the
resolution we expect, changing it on the fly, it being orientation
agnostic and throwing on invalid parameters.
The tests use small resolutions like 120x60 for fast ramp up even on
slow bots (sending HD tends to trigger initial frame dropping and slow
BW ramp up).
The following test coverage is NOT included yet, but will be added in
follow up CL(s):
- Simulcast tests: to be written in a separate CL for reviewability.
- scaleTo maintaining aspect ratio: blocked on a WebRTC fix.
Bug: chromium:363544347
Change-Id: If930ffd686d073d2eb239763e9ea9c1390fbcef1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5828607
Reviewed-by: Dominik Röttsches drott@chromium.org
Commit-Queue: Henrik Boström hbos@chromium.org
Reviewed-by: Harald Alvestrand hta@chromium.org
Cr-Commit-Position: refs/heads/main@{#1355122}