Bug 1159171: [MSE] P4. Changing waiting time value. r=edwin.
authorJean-Yves Avenard <jyavenard@mozilla.com>
Tue, 22 Sep 2015 17:02:36 +1000
changeset 607026 e234535f96f905970172c0c66fa9db281c5ed1a8
parent 607025 d82c738bdd5401068d08b6df196d2616a9ced23c
child 607027 45ea2a01301e2993d7568989ccd1905e7cd38b3c
child 607254 1f0bed642faa6d6e97b04356539c07d226846971
push id93006
push userjyavenard@mozilla.com
push dateThu, 15 Oct 2015 05:15:33 +0000
treeherdertry@45ea2a01301e [default view] [failures only]
reviewersedwin
bugs1159171
milestone43.0a2
Bug 1159171: [MSE] P4. Changing waiting time value. r=edwin. 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));