Changeset 264930 in webkit


Ignore:
Timestamp:
Jul 27, 2020 10:31:00 AM (4 years ago)
Author:
youenn@apple.com
Message:

scaleResolutionDownBy has no effect on RTCRtpSender
https://bugs.webkit.org/show_bug.cgi?id=214783
<rdar://problem/66108346>

Reviewed by Eric Carlson.

Source/WebCore:

Covered by updated test.

  • Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:

(WebCore::updateRTCRtpSendParameters):
Allow to change scaleResolutionDownBy.

LayoutTests:

  • webrtc/video-expected.txt:
  • webrtc/video.html:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r264927 r264930  
     12020-07-27  Youenn Fablet  <youenn@apple.com>
     2
     3        scaleResolutionDownBy has no effect on RTCRtpSender
     4        https://bugs.webkit.org/show_bug.cgi?id=214783
     5        <rdar://problem/66108346>
     6
     7        Reviewed by Eric Carlson.
     8
     9        * webrtc/video-expected.txt:
     10        * webrtc/video.html:
     11
    1122020-07-27  Hector Lopez  <hector_i_lopez@apple.com>
    213
  • trunk/LayoutTests/webrtc/video-expected.txt

    r239252 r264930  
    44PASS Call setParameters to disable sending a given encoding
    55PASS Call setParameters to reenable sending a given encoding
     6PASS Call setParameters to reduce size by two
    67
  • trunk/LayoutTests/webrtc/video.html

    r239532 r264930  
    122122    await checkVideoIsUpdated(true);
    123123}, "Call setParameters to reenable sending a given encoding");
     124
     125promise_test(async (test) => {
     126    const sender = pc1.getSenders()[0];
     127    let p = sender.getParameters();
     128    p.encodings[0].scaleResolutionDownBy = 2;
     129    await sender.setParameters(p);
     130
     131    assert_equals(sender.getParameters().encodings[0].scaleResolutionDownBy, 2, "encodings[0].scaleResolutionDownBy should be 2");
     132    assert_equals(video.videoWidth, 640);
     133    assert_equals(video.videoHeight, 480);
     134
     135    let counter = 0;
     136    while (++counter < 20 && video.videoWidth == 640)
     137        await waitFor(200);
     138
     139    assert_equals(video.videoWidth, 320);
     140    assert_equals(video.videoHeight, 240);
     141}, "Call setParameters to reduce size by two");
    124142        </script>
    125143    </body>
  • trunk/Source/WebCore/ChangeLog

    r264908 r264930  
     12020-07-27  Youenn Fablet  <youenn@apple.com>
     2
     3        scaleResolutionDownBy has no effect on RTCRtpSender
     4        https://bugs.webkit.org/show_bug.cgi?id=214783
     5        <rdar://problem/66108346>
     6
     7        Reviewed by Eric Carlson.
     8
     9        Covered by updated test.
     10
     11        * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
     12        (WebCore::updateRTCRtpSendParameters):
     13        Allow to change scaleResolutionDownBy.
     14
    1152020-07-25  Simon Fraser  <simon.fraser@apple.com>
    216
  • trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp

    r259345 r264930  
    163163        if (parameters.encodings[i].maxFramerate)
    164164            rtcParameters.encodings[i].max_framerate = parameters.encodings[i].maxFramerate;
     165        if (parameters.encodings[i].scaleResolutionDownBy)
     166            rtcParameters.encodings[i].scale_resolution_down_by = parameters.encodings[i].scaleResolutionDownBy;
    165167    }
    166168
Note: See TracChangeset for help on using the changeset viewer.