Bug 1636185: Don't start emitting frames until we can set our initial RID filter. r=jib
authorByron Campen [:bwc] <docfaraday@gmail.com>
Mon, 01 Jun 2020 22:40:32 +0000
changeset 597594 b38d112a2d6ae41c6039edfca99983216656bc3b
parent 597593 c0aab9a91e211045e4505b49be5229d9d31c2e23
child 597595 189c39e5f2d18f87252b670f58bfef39bb765b59
push id13310
push userffxbld-merge
push dateMon, 29 Jun 2020 14:50:06 +0000
treeherdermozilla-beta@15a59a0afa5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjib
bugs1636185
milestone79.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1636185: Don't start emitting frames until we can set our initial RID filter. r=jib This test was flaky because until we set a rid filter, all ssrcs were being received. This meant that the resolution could have been consistent with any of foo, bar, or baz when we started looking for resize events. In some cases, that meant that we would never see the resize event for the transition to bar, because the video element was already at that resolution. Depends on D74279 Differential Revision: https://phabricator.services.mozilla.com/D77712
dom/media/tests/mochitest/test_peerConnection_simulcastOddResolution.html
--- a/dom/media/tests/mochitest/test_peerConnection_simulcastOddResolution.html
+++ b/dom/media/tests/mochitest/test_peerConnection_simulcastOddResolution.html
@@ -106,17 +106,17 @@
     test = new PeerConnectionTest({bundle: false});
     test.setMediaConstraints([{video: true}], [{video: true}]);
 
     test.chain.replace("PC_REMOTE_GUM", [
       function PC_REMOTE_CANVAS_CAPTURESTREAM(test) {
         helper = new VideoStreamHelper();
         emitter = new VideoFrameEmitter(helper.green, helper.red, 705, 528);
         test.pcRemote.attachLocalStream(emitter.stream());
-        emitter.start();
+        // Don't start the emitter yet. Only do that when we're able to set rid filters.
       }
     ]);
 
     test.chain.insertAfter('PC_REMOTE_GET_OFFER', [
       function PC_REMOTE_SET_RIDS(test) {
         const senders = test.pcRemote._pc.getSenders();
         is(senders.length, 1, "We have exactly one RTP sender");
         const sender = senders[0];
@@ -153,16 +153,17 @@
         info(`local offer: ${test._local_offer.sdp}`);
         const extmap_id = test._local_offer.sdp.match(
             "a=extmap:([0-9+])/recvonly urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id");
         ok(extmap_id, `Original answer has extmap id for simulcast: ${extmap_id[1]}`);
         // Cause pcLocal to filter out everything but RID "foo", only
         // allowing one of the simulcast streams through.
         addRIDExtension(test.pcLocal, extmap_id[1]);
         selectRecvRID(test.pcLocal, "foo");
+        emitter.start();
       },
       function SETUP_RESIZE_LISTENERS(test) {
         for(const elem of [...test.pcRemote.localMediaElements,
                            ...test.pcLocal.remoteMediaElements,
                           ]) {
           elem.addEventListener("resize",
             () => info(`element ${elem.id} resized to ${elem.videoWidth}x${elem.videoHeight}`));
         }