Title: [166282] trunk
- Revision
- 166282
- Author
- jer.no...@apple.com
- Date
- 2014-03-25 21:16:53 -0700 (Tue, 25 Mar 2014)
Log Message
[MSE] Duplicate 'seeked' events.
https://bugs.webkit.org/show_bug.cgi?id=130754
Reviewed by Eric Carlson.
Source/WebCore:
Test: media/media-source/media-source-duplicate-seeked.html
During certain seek operations, HTMLMediaElement::finishSeek() can be called re-entrantly due to
the ready state changing as a result of MediaSource::monitorSourceBuffers(). Move this call to the
end of finishSeek() after m_seeking has been cleared.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
LayoutTests:
* media/media-source/media-source-duplicate-seeked-expected.txt: Added.
* media/media-source/media-source-duplicate-seeked.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (166281 => 166282)
--- trunk/LayoutTests/ChangeLog 2014-03-26 04:08:52 UTC (rev 166281)
+++ trunk/LayoutTests/ChangeLog 2014-03-26 04:16:53 UTC (rev 166282)
@@ -1,3 +1,13 @@
+2014-03-25 Jer Noble <jer.no...@apple.com>
+
+ [MSE] Duplicate 'seeked' events.
+ https://bugs.webkit.org/show_bug.cgi?id=130754
+
+ Reviewed by Eric Carlson.
+
+ * media/media-source/media-source-duplicate-seeked-expected.txt: Added.
+ * media/media-source/media-source-duplicate-seeked.html: Added.
+
2014-03-25 James Craig <jcr...@apple.com>
Web Inspector: AXI: add support for aria-activedescendant and reconcile UI/testing with parentNode
Added: trunk/LayoutTests/media/media-source/media-source-duplicate-seeked-expected.txt (0 => 166282)
--- trunk/LayoutTests/media/media-source/media-source-duplicate-seeked-expected.txt (rev 0)
+++ trunk/LayoutTests/media/media-source/media-source-duplicate-seeked-expected.txt 2014-03-26 04:16:53 UTC (rev 166282)
@@ -0,0 +1,16 @@
+
+EXPECTED (source.readyState == 'closed') OK
+EVENT(sourceopen)
+RUN(sourceBuffer = source.addSourceBuffer("video/mock; codecs=mock"))
+RUN(sourceBuffer.appendBuffer(initSegment))
+EVENT(updateend)
+RUN(sourceBuffer.appendBuffer(samples))
+EVENT(updateend)
+RUN(source.duration = 1)
+RUN(source.endOfStream())
+RUN(video.currentTime = 1)
+EVENT(seeked)
+RUN(video.play())
+EVENT(ended)
+END OF TEST
+
Added: trunk/LayoutTests/media/media-source/media-source-duplicate-seeked.html (0 => 166282)
--- trunk/LayoutTests/media/media-source/media-source-duplicate-seeked.html (rev 0)
+++ trunk/LayoutTests/media/media-source/media-source-duplicate-seeked.html 2014-03-26 04:16:53 UTC (rev 166282)
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>mock-media-source</title>
+ <script src=""
+ <script src=""
+ <script>
+ var source;
+ var sourceBuffer;
+ var initSegment;
+ var samples;
+
+ if (window.internals)
+ internals.initializeMockMediaSource();
+
+ function runTest() {
+ findMediaElement();
+
+ source = new MediaSource();
+ testExpected('source.readyState', 'closed');
+
+ waitForEventOn(source, 'sourceopen', sourceOpen);
+ var videoSource = document.createElement('source');
+ videoSource.type = 'video/mock; codecs=mock';
+ videoSource.src = ""
+ video.appendChild(videoSource);
+ }
+
+ function sourceOpen() {
+ run('sourceBuffer = source.addSourceBuffer("video/mock; codecs=mock")');
+ waitForEventOn(sourceBuffer, 'updateend', loadSamples, false, true);
+ initSegment = makeAInit(8, [makeATrack(1, 'mock', TRACK_KIND.VIDEO)]);
+ run('sourceBuffer.appendBuffer(initSegment)');
+ }
+
+ function loadSamples() {
+ samples = concatenateSamples([
+ makeASample(0, 1, 1, 1, SAMPLE_FLAG.SYNC),
+ ]);
+ waitForEventOn(sourceBuffer, 'updateend', seek, false, true);
+ run('sourceBuffer.appendBuffer(samples)');
+ }
+
+ function seek() {
+ run('source.duration = 1');
+ run('source.endOfStream()');
+ waitForEventOnce('seeked', seeked);
+ run('video.currentTime = 1');
+ }
+
+ function seeked() {
+ waitForEventAndFail('seeked');
+ waitForEventAndEnd('ended');
+ run('video.play()');
+ }
+
+ </script>
+</head>
+<body _onload_="runTest()">
+ <video></video>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (166281 => 166282)
--- trunk/Source/WebCore/ChangeLog 2014-03-26 04:08:52 UTC (rev 166281)
+++ trunk/Source/WebCore/ChangeLog 2014-03-26 04:16:53 UTC (rev 166282)
@@ -1,3 +1,19 @@
+2014-03-25 Jer Noble <jer.no...@apple.com>
+
+ [MSE] Duplicate 'seeked' events.
+ https://bugs.webkit.org/show_bug.cgi?id=130754
+
+ Reviewed by Eric Carlson.
+
+ Test: media/media-source/media-source-duplicate-seeked.html
+
+ During certain seek operations, HTMLMediaElement::finishSeek() can be called re-entrantly due to
+ the ready state changing as a result of MediaSource::monitorSourceBuffers(). Move this call to the
+ end of finishSeek() after m_seeking has been cleared.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::parseAttribute):
+
2014-03-25 James Craig <jcr...@apple.com>
Web Inspector: AXI: add support for aria-activedescendant and reconcile UI/testing with parentNode
Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (166281 => 166282)
--- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2014-03-26 04:08:52 UTC (rev 166281)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2014-03-26 04:16:53 UTC (rev 166282)
@@ -2481,11 +2481,6 @@
{
LOG(Media, "HTMLMediaElement::finishSeek");
-#if ENABLE(MEDIA_SOURCE)
- if (m_mediaSource)
- m_mediaSource->monitorSourceBuffers();
-#endif
-
// 4.8.10.9 Seeking
// 14 - Set the seeking IDL attribute to false.
m_seeking = false;
@@ -2498,6 +2493,11 @@
// 17 - Queue a task to fire a simple event named seeked at the element.
scheduleEvent(eventNames().seekedEvent);
+
+#if ENABLE(MEDIA_SOURCE)
+ if (m_mediaSource)
+ m_mediaSource->monitorSourceBuffers();
+#endif
}
HTMLMediaElement::ReadyState HTMLMediaElement::readyState() const
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes