Bug 1159171: [MSE] P4. Changing waiting time value. r=edwin. a=lizzard
authorJean-Yves Avenard <jyavenard@mozilla.com>
Tue, 22 Sep 2015 17:02:36 +1000
changeset 296470 9e3e16bf77187e661c71f86d498dce17bc4b0682
parent 296469 816f830d4b6a449bf65a70dd0d597950f0057ee1
child 296471 bc89c77770dfef60767be4f98fb73fee2f243d2c
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersedwin, lizzard
bugs1159171
milestone43.0a2
Bug 1159171: [MSE] P4. Changing waiting time value. r=edwin. a=lizzard When ffmpeg is enabled, it will use the FFmpeg's VPX decoder. FFmpeg appears to always buffer 15 frames before returning one (this is the same with h264) causing the waiting event to be fired much earlier than when using libvpx
dom/media/mediasource/test/test_BufferingWait.html
--- a/dom/media/mediasource/test/test_BufferingWait.html
+++ b/dom/media/mediasource/test/test_BufferingWait.html
@@ -36,24 +36,24 @@ runWithMSE(function(ms, v) {
     fetchWithXHR("seek.webm", function(arrayBuffer) {
       sb.addEventListener('error', (e) => { ok(false, "Got Error: " + e); SimpleTest.finish(); });
       loadSegment.bind(null, sb, new Uint8Array(arrayBuffer, 0, 318))().then(
       loadSegment.bind(null, sb, new Uint8Array(arrayBuffer, 318, 25523-318))).then(
       loadSegment.bind(null, sb, new Uint8Array(arrayBuffer, 25523, 46712-25523))).then(
       /* Note - Missing |46712, 67833 - 46712| segment here corresponding to (0.8, 1.2] */
       /* Note - Missing |67833, 88966 - 67833| segment here corresponding to (1.2, 1.6]  */
       loadSegment.bind(null, sb, new Uint8Array(arrayBuffer, 88966))).then(function() {
-        var promise = waitUntilTime(0.7);
+        var promise = waitUntilTime(0.27);
         info("Playing video. It should play for a bit, then fire 'waiting'");
         v.play();
         return promise;
       }).then(function() {
         window.firstStop = Date.now();
         loadSegment(sb, new Uint8Array(arrayBuffer, 46712, 67833 - 46712));
-        return waitUntilTime(1.0);
+        return waitUntilTime(0.66);
       }).then(function() {
         var waitDuration = (Date.now() - window.firstStop) / 1000;
         ok(waitDuration < 15, "Should not spend an inordinate amount of time buffering: " + waitDuration);
         SimpleTest.finish();
         /* If we allow the rest of the stream to be played, we get stuck at
            around 2s. See bug 1093133.
         once(v, 'ended', SimpleTest.finish.bind(SimpleTest));
         return loadSegment(sb, new Uint8Array(arrayBuffer, 67833, 88966 - 67833));