WebKit Bugzilla
Attachment 348035 Details for
Bug 188926
: Using Touch Bar to scrub video on Youtube results in video playback freeze
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188926-20180824125601.patch (text/plain), 5.88 KB, created by
Jer Noble
on 2018-08-24 12:56:06 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Jer Noble
Created:
2018-08-24 12:56:06 PDT
Size:
5.88 KB
patch
obsolete
>Subversion Revision: 235225 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 00a62f58cc34e17a164d9d0cd455d960d9ba3f38..97c9f721e99ebaa03f522b4d955fdf008e9260b1 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,20 @@ >+2018-08-24 Jer Noble <jer.noble@apple.com> >+ >+ Using Touch Bar to scrub video on Youtube results in video playback freeze >+ https://bugs.webkit.org/show_bug.cgi?id=188926 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Test: media/media-source/media-source-seek-twice.html >+ >+ When converting from a double-precision float to a MediaTime, a certain amount of precision is lost. If that >+ results in a round-trip between `float in -> MediaTime -> float out` where in != out, we will wait forever for >+ time jump observer to fire. Break the cycle by comparing m_lastSeekTime to the synchronizerTime only after >+ m_lastSeekTime has been normalized into a rational-time value. >+ >+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: >+ (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal): >+ > 2018-07-31 Jer Noble <jer.noble@apple.com> > > Refactoring: Convert HTMLMediaElement::scheduleDelayedAction() to individually schedulable & cancelable tasks >diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm >index d402eaae6f4f6faf26bc919b1d6f8df50bcf87a6..968fc5a087f311d88b239e676948949213b4cba6 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm >+++ b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm >@@ -415,9 +415,12 @@ void MediaPlayerPrivateMediaSourceAVFObjC::seekInternal() > else > m_lastSeekTime = m_mediaSourcePrivate->fastSeekTimeForMediaTime(pendingSeek->targetTime, pendingSeek->positiveThreshold, pendingSeek->negativeThreshold); > >- LOG(MediaSource, "MediaPlayerPrivateMediaSourceAVFObjC::seekInternal(%p) - seekTime(%s)", this, toString(m_lastSeekTime).utf8().data()); >+ if (m_lastSeekTime.hasDoubleValue()) >+ m_lastSeekTime = MediaTime::createWithDouble(m_lastSeekTime.toDouble(), MediaTime::DefaultTimeScale); > > MediaTime synchronizerTime = PAL::toMediaTime(CMTimebaseGetTime([m_synchronizer timebase])); >+ LOG(MediaSource, "MediaPlayerPrivateMediaSourceAVFObjC::seekInternal(%p) - seekTime(%s), synchronizerTime(%s)", this, toString(m_lastSeekTime).utf8().data(), toString(synchronizerTime).utf8().data()); >+ > bool doesNotRequireSeek = synchronizerTime == m_lastSeekTime; > > m_mediaSourcePrivate->willSeek(); >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 51bfbdad17960e9460893fc02de1c30da096a6be..1262640021a7e76773b5e1a94934fcc6f1f05301 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,13 @@ >+2018-08-24 Jer Noble <jer.noble@apple.com> >+ >+ Using Touch Bar to scrub video on Youtube results in video playback freeze >+ https://bugs.webkit.org/show_bug.cgi?id=188926 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * media/media-source/media-source-seek-twice-expected.txt: Added. >+ * media/media-source/media-source-seek-twice.html: Added. >+ > 2018-08-22 John Wilander <wilander@apple.com> > > Further adjustments to http/tests/websocket/connection-refusal-in-frame-resource-load-statistics.html >diff --git a/LayoutTests/media/media-source/media-source-seek-twice-expected.txt b/LayoutTests/media/media-source/media-source-seek-twice-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..14d18d644e9e78046820b11c8d937dd61753a69a >--- /dev/null >+++ b/LayoutTests/media/media-source/media-source-seek-twice-expected.txt >@@ -0,0 +1,14 @@ >+ >+RUN(video.src = URL.createObjectURL(source)) >+EVENT(sourceopen) >+RUN(sourceBuffer = source.addSourceBuffer(loader.type())) >+RUN(sourceBuffer.appendBuffer(loader.initSegment())) >+EVENT(update) >+RUN(sourceBuffer.appendBuffer(loader.mediaSegment(0))) >+EVENT(update) >+RUN(video.currentTime = 0.50000000001) >+EVENT(seeked) >+RUN(video.currentTime = 0.50000000001) >+EVENT(seeked) >+END OF TEST >+ >diff --git a/LayoutTests/media/media-source/media-source-seek-twice.html b/LayoutTests/media/media-source/media-source-seek-twice.html >new file mode 100644 >index 0000000000000000000000000000000000000000..b3b89e046d1da5b3f6f5fa12cd303aba7a1c22a3 >--- /dev/null >+++ b/LayoutTests/media/media-source/media-source-seek-twice.html >@@ -0,0 +1,45 @@ >+<!DOCTYPE html> >+<html> >+<head> >+ <title>media-source-abort-resets-parser</title> >+ <script src="media-source-loader.js"></script> >+ <script src="../video-test.js"></script> >+ <script> >+ var loader; >+ var source; >+ var sourceBuffer; >+ >+ window.addEventListener('load', event => { >+ findMediaElement(); >+ >+ loader = new MediaSourceLoader('content/test-fragmented-manifest.json'); >+ loader.onload = async () => { >+ source = new MediaSource(); >+ run('video.src = URL.createObjectURL(source)'); >+ await waitFor(source, 'sourceopen'); >+ >+ run('sourceBuffer = source.addSourceBuffer(loader.type())'); >+ run('sourceBuffer.appendBuffer(loader.initSegment())'); >+ await waitFor(sourceBuffer, 'update'); >+ >+ run('sourceBuffer.appendBuffer(loader.mediaSegment(0))'); >+ await waitFor(sourceBuffer, 'update'); >+ >+ run('video.currentTime = 0.50000000001'); >+ await waitFor(video, 'seeked'); >+ >+ run('video.currentTime = 0.50000000001'); >+ await waitFor(video, 'seeked'); >+ >+ endTest(); >+ }; >+ loader.onerror = () => { >+ failTest('Media data loading failed'); >+ }; >+ }); >+ </script> >+</head> >+<body> >+ <video controls></video> >+</body> >+</html> >\ No newline at end of file
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188926
:
348035
|
348039