Bug 175167 - Change fast seek logic to prevent ping-ponging.
Summary: Change fast seek logic to prevent ping-ponging.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jeremy Jones
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-08-03 18:00 PDT by Jeremy Jones
Modified: 2017-08-08 12:04 PDT (History)
7 users (show)

See Also:


Attachments
Test Only (3.77 KB, patch)
2017-08-03 18:23 PDT, Jeremy Jones
no flags Details | Formatted Diff | Diff
Patch (6.12 KB, patch)
2017-08-03 18:28 PDT, Jeremy Jones
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews106 for mac-elcapitan-wk2 (1.07 MB, application/zip)
2017-08-03 19:26 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews100 for mac-elcapitan (985.56 KB, application/zip)
2017-08-03 19:30 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews105 for mac-elcapitan-wk2 (1.10 MB, application/zip)
2017-08-03 19:34 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews101 for mac-elcapitan (980.34 KB, application/zip)
2017-08-03 19:39 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews115 for mac-elcapitan (1.78 MB, application/zip)
2017-08-03 19:52 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews113 for mac-elcapitan (1.75 MB, application/zip)
2017-08-03 19:52 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews123 for ios-simulator-wk2 (950.51 KB, application/zip)
2017-08-03 19:57 PDT, Build Bot
no flags Details
Patch (5.85 KB, patch)
2017-08-07 14:42 PDT, Jeremy Jones
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews101 for mac-elcapitan (1.10 MB, application/zip)
2017-08-07 16:24 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews114 for mac-elcapitan (1.76 MB, application/zip)
2017-08-07 16:25 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews104 for mac-elcapitan-wk2 (1.15 MB, application/zip)
2017-08-07 16:50 PDT, Build Bot
no flags Details
Patch (7.15 KB, patch)
2017-08-07 17:01 PDT, Jeremy Jones
no flags Details | Formatted Diff | Diff
Patch for landing. (7.14 KB, patch)
2017-08-07 17:02 PDT, Jeremy Jones
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Jones 2017-08-03 18:00:20 PDT
Change fast seek logic to prevent ping-ponging.
Comment 1 Jeremy Jones 2017-08-03 18:01:06 PDT
rdar://problem/32936116
Comment 2 Jeremy Jones 2017-08-03 18:23:08 PDT
Created attachment 317192 [details]
Test Only
Comment 3 Jeremy Jones 2017-08-03 18:28:13 PDT
Created attachment 317194 [details]
Patch
Comment 4 Build Bot 2017-08-03 19:26:27 PDT
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
Comment 5 Build Bot 2017-08-03 19:26:28 PDT
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 6 Build Bot 2017-08-03 19:30:38 PDT
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
Comment 7 Build Bot 2017-08-03 19:30:40 PDT
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 8 Build Bot 2017-08-03 19:34:30 PDT
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
Comment 9 Build Bot 2017-08-03 19:34:31 PDT
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 10 Build Bot 2017-08-03 19:39:07 PDT
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
Comment 11 Build Bot 2017-08-03 19:39:08 PDT
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 12 Build Bot 2017-08-03 19:52:09 PDT
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
Comment 13 Build Bot 2017-08-03 19:52:11 PDT
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 14 Build Bot 2017-08-03 19:52:12 PDT
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
Comment 15 Build Bot 2017-08-03 19:52:14 PDT
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 16 Build Bot 2017-08-03 19:57:32 PDT
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
Comment 17 Build Bot 2017-08-03 19:57:35 PDT
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
Comment 18 Jer Noble 2017-08-04 08:49:08 PDT
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.
Comment 19 Jeremy Jones 2017-08-04 13:15:15 PDT
(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.
Comment 20 Jeremy Jones 2017-08-07 14:42:24 PDT
Created attachment 317470 [details]
Patch
Comment 21 Build Bot 2017-08-07 16:24:20 PDT
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
Comment 22 Build Bot 2017-08-07 16:24:22 PDT
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 23 Build Bot 2017-08-07 16:25:08 PDT
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
Comment 24 Build Bot 2017-08-07 16:25:10 PDT
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 25 Build Bot 2017-08-07 16:50:24 PDT
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
Comment 26 Build Bot 2017-08-07 16:50:25 PDT
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
Comment 27 Jeremy Jones 2017-08-07 17:01:00 PDT
Created attachment 317511 [details]
Patch
Comment 28 Jeremy Jones 2017-08-07 17:02:56 PDT
Created attachment 317514 [details]
Patch for landing.
Comment 29 WebKit Commit Bot 2017-08-08 12:04:01 PDT
Comment on attachment 317514 [details]
Patch for landing.

Clearing flags on attachment: 317514

Committed r220414: <http://trac.webkit.org/changeset/220414>
Comment 30 WebKit Commit Bot 2017-08-08 12:04:03 PDT
All reviewed patches have been landed.  Closing bug.