Log Message
[MSE] Increase the SourceBuffer "fudge factor" https://bugs.webkit.org/show_bug.cgi?id=159813 <rdar://problem/27372033>
Reviewed by Jon Lee. Source/WebCore: Some media encoding/conversion pipelines are sloppy when doing sample time/timescale math, and the error accumulation results in small gaps in the media timeline. r202641 increased the maximum allowable gap from 0.01 second to one 24fps frame, but it turns out that at least one large provider has a significant amount of content encoded with up to two 24fps frames. No new tests, updated media/media-source/media-source-small-gap.html. * Modules/mediasource/SourceBuffer.cpp: (WebCore::currentTimeFudgeFactor): Increase maximum gap to 2002 / 24000 frames. LayoutTests: * media/media-source/media-source-small-gap-expected.txt: * media/media-source/media-source-small-gap.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (203276 => 203277)
--- trunk/LayoutTests/ChangeLog 2016-07-15 14:52:47 UTC (rev 203276)
+++ trunk/LayoutTests/ChangeLog 2016-07-15 16:42:21 UTC (rev 203277)
@@ -1,3 +1,14 @@
+2016-07-15 Eric Carlson <[email protected]>
+
+ [MSE] Increase the SourceBuffer "fudge factor"
+ https://bugs.webkit.org/show_bug.cgi?id=159813
+ <rdar://problem/27372033>
+
+ Reviewed by Jon Lee.
+
+ * media/media-source/media-source-small-gap-expected.txt:
+ * media/media-source/media-source-small-gap.html:
+
2016-07-14 Yoav Weiss <[email protected]>
Change CSSParser::sourceSize returning Optional<CSSParser::SourceSize>
Modified: trunk/LayoutTests/media/media-source/media-source-small-gap-expected.txt (203276 => 203277)
--- trunk/LayoutTests/media/media-source/media-source-small-gap-expected.txt 2016-07-15 14:52:47 UTC (rev 203276)
+++ trunk/LayoutTests/media/media-source/media-source-small-gap-expected.txt 2016-07-15 16:42:21 UTC (rev 203277)
@@ -1,4 +1,4 @@
-This tests the SourceBuffer.buffered() API. This test will add 8 samples with a small gap (0.01s) between each sample. The SourceBuffer should coalesce such small gaps to make a single contiguous range. The video element should also play continuously from the beginning to the end.
+This tests the SourceBuffer.buffered() API. This test will add 8 samples with a small gap (0.01s .. 0.083s) between each sample. The SourceBuffer should coalesce such small gaps to make a single contiguous range. The video element should also play continuously from the beginning to the end.
RUN(video.src = ""
EVENT(sourceopen)
Modified: trunk/LayoutTests/media/media-source/media-source-small-gap.html (203276 => 203277)
--- trunk/LayoutTests/media/media-source/media-source-small-gap.html 2016-07-15 14:52:47 UTC (rev 203276)
+++ trunk/LayoutTests/media/media-source/media-source-small-gap.html 2016-07-15 16:42:21 UTC (rev 203277)
@@ -28,16 +28,19 @@
}
function loadSamples() {
+ const maximumGap = Math.floor(2002 / 24000 * 1000) / 1000;
+
samples = concatenateSamples([
- makeASample(0, 0, 0.99, 1, SAMPLE_FLAG.SYNC),
- makeASample(1, 1, 0.99, 1, SAMPLE_FLAG.NONE),
- makeASample(2, 2, 0.99, 1, SAMPLE_FLAG.NONE),
- makeASample(3, 3, 0.99, 1, SAMPLE_FLAG.NONE),
- makeASample(4, 4, 0.99, 1, SAMPLE_FLAG.SYNC),
- makeASample(5, 5, 0.99, 1, SAMPLE_FLAG.NONE),
- makeASample(6, 6, 0.99, 1, SAMPLE_FLAG.NONE),
- makeASample(7, 7, 1, 1, SAMPLE_FLAG.NONE),
+ makeASample(0, 0, 1 - maximumGap, 1, SAMPLE_FLAG.SYNC),
+ makeASample(1, 1, 1 - maximumGap / 2, 1, SAMPLE_FLAG.NONE),
+ makeASample(2, 2, 1 - maximumGap / 3, 1, SAMPLE_FLAG.NONE),
+ makeASample(3, 3, 1, 1, SAMPLE_FLAG.NONE),
+ makeASample(4, 4, 1 - maximumGap, 1, SAMPLE_FLAG.SYNC),
+ makeASample(5, 5, 1 - maximumGap / 10, 1, SAMPLE_FLAG.NONE),
+ makeASample(6, 6, 0.99, 1, SAMPLE_FLAG.NONE),
+ makeASample(7, 7, 1, 1, SAMPLE_FLAG.NONE),
]);
+
waitForEventOn(sourceBuffer, 'updateend', checkBuffered, false, true);
run('sourceBuffer.appendBuffer(samples)');
}
@@ -59,7 +62,7 @@
</script>
</head>
<body _onload_="runTest()">
- <div>This tests the SourceBuffer.buffered() API. This test will add 8 samples with a small gap (0.01s) between each sample. The SourceBuffer should coalesce such small gaps to make a single contiguous range. The video element should also play continuously from the beginning to the end.</div>
+ <div>This tests the SourceBuffer.buffered() API. This test will add 8 samples with a small gap (0.01s .. 0.083s) between each sample. The SourceBuffer should coalesce such small gaps to make a single contiguous range. The video element should also play continuously from the beginning to the end.</div>
<video></video>
</body>
</html>
Modified: trunk/Source/WebCore/ChangeLog (203276 => 203277)
--- trunk/Source/WebCore/ChangeLog 2016-07-15 14:52:47 UTC (rev 203276)
+++ trunk/Source/WebCore/ChangeLog 2016-07-15 16:42:21 UTC (rev 203277)
@@ -1,3 +1,22 @@
+2016-07-15 Eric Carlson <[email protected]>
+
+ [MSE] Increase the SourceBuffer "fudge factor"
+ https://bugs.webkit.org/show_bug.cgi?id=159813
+ <rdar://problem/27372033>
+
+ Reviewed by Jon Lee.
+
+ Some media encoding/conversion pipelines are sloppy when doing sample time/timescale
+ math, and the error accumulation results in small gaps in the media timeline. r202641
+ increased the maximum allowable gap from 0.01 second to one 24fps frame, but it turns
+ out that at least one large provider has a significant amount of content encoded with
+ up to two 24fps frames.
+
+ No new tests, updated media/media-source/media-source-small-gap.html.
+
+ * Modules/mediasource/SourceBuffer.cpp:
+ (WebCore::currentTimeFudgeFactor): Increase maximum gap to 2002 / 24000 frames.
+
2016-07-15 Rawinder Singh <[email protected]>
Add final keyword to WebCore/svg classes
Modified: trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp (203276 => 203277)
--- trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp 2016-07-15 14:52:47 UTC (rev 203276)
+++ trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp 2016-07-15 16:42:21 UTC (rev 203277)
@@ -65,10 +65,10 @@
static const double ExponentialMovingAverageCoefficient = 0.1;
-// Allow hasCurrentTime() to be off by as much as the length of a 24fps video frame
+// Allow hasCurrentTime() to be off by as much as the length of two 24fps video frames
static const MediaTime& currentTimeFudgeFactor()
{
- static NeverDestroyed<MediaTime> fudgeFactor(1, 24);
+ static NeverDestroyed<MediaTime> fudgeFactor(2002, 24000);
return fudgeFactor;
}
_______________________________________________ webkit-changes mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-changes
