Change fast seek logic to prevent ping-ponging.
rdar://problem/32936116
Created attachment 317192 [details] Test Only
Created attachment 317194 [details] Patch
Comment on attachment 317194 [details] Patch Attachment 317194 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/4249998 New failing tests: media/media-source/media-source-fastseek.html
Created attachment 317197 [details] Archive of layout-test-results from ews106 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Comment on attachment 317192 [details] Test Only Attachment 317192 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/4250021 New failing tests: media/video-fast-seek.html
Created attachment 317199 [details] Archive of layout-test-results from ews100 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Comment on attachment 317192 [details] Test Only Attachment 317192 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/4250023 New failing tests: media/video-fast-seek.html
Created attachment 317200 [details] Archive of layout-test-results from ews105 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Comment on attachment 317194 [details] Patch Attachment 317194 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/4250055 New failing tests: media/media-source/media-source-fastseek.html
Created attachment 317202 [details] Archive of layout-test-results from ews101 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Comment on attachment 317194 [details] Patch Attachment 317194 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/4250038 New failing tests: media/media-source/media-source-fastseek.html
Created attachment 317206 [details] Archive of layout-test-results from ews115 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews115 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Comment on attachment 317192 [details] Test Only Attachment 317192 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/4250048 New failing tests: media/video-fast-seek.html
Created attachment 317207 [details] Archive of layout-test-results from ews113 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews113 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Comment on attachment 317192 [details] Test Only Attachment 317192 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/4250053 New failing tests: media/video-fast-seek.html
Created attachment 317208 [details] Archive of layout-test-results from ews123 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews123 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.5
FWIW, this doesn't match the behavior of Firefox (which, AFAICT, is the only other browser to implement fastSeek()). Given a .ogg file which has a keyframe at 2.533s: > $0.currentTime = 0 < 0 > $0.fastSeek(2.5) < undefined > $0.currentTime < 0 > $0.fastSeek(2.6) < undefined > $0.currentTime < 2.566667 > $0.fastSeek(2.5) < undefined > $0.currentTime > 0 Looks like they just seek to the previous I-frame from the target time, with a min(0) when seeking backward and min(currentTime) when seeking forward.
(In reply to Jer Noble from comment #18) > FWIW, this doesn't match the behavior of Firefox (which, AFAICT, is the only > other browser to implement fastSeek()). Given a .ogg file which has a > keyframe at 2.533s: > > > $0.currentTime = 0 > < 0 > > $0.fastSeek(2.5) > < undefined > > $0.currentTime > < 0 > > $0.fastSeek(2.6) > < undefined > > $0.currentTime > < 2.566667 > > $0.fastSeek(2.5) > < undefined > > $0.currentTime > > 0 > > Looks like they just seek to the previous I-frame from the target time, with > a min(0) when seeking backward and min(currentTime) when seeking forward. This also solves the problem of switching directions for the I-frame search, but has the advantage that is is much more likely to find an I-frame, especially in the more difficult seek task of seeking backwards.
Created attachment 317470 [details] Patch
Comment on attachment 317470 [details] Patch Attachment 317470 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/4272661 New failing tests: media/media-source/media-source-fastseek.html
Created attachment 317494 [details] Archive of layout-test-results from ews101 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Comment on attachment 317470 [details] Patch Attachment 317470 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/4272506 New failing tests: media/media-source/media-source-fastseek.html
Created attachment 317496 [details] Archive of layout-test-results from ews114 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews114 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Comment on attachment 317470 [details] Patch Attachment 317470 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/4272801 New failing tests: media/media-source/media-source-fastseek.html
Created attachment 317508 [details] Archive of layout-test-results from ews104 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Created attachment 317511 [details] Patch
Created attachment 317514 [details] Patch for landing.
Comment on attachment 317514 [details] Patch for landing. Clearing flags on attachment: 317514 Committed r220414: <http://trac.webkit.org/changeset/220414>
All reviewed patches have been landed. Closing bug.