Changeset 220414 in webkit
- Timestamp:
- Aug 8, 2017 12:03:57 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r220413 r220414 1 2017-08-08 Jeremy Jones <jeremyj@apple.com> 2 3 Change fast seek logic to prevent ping-ponging. 4 https://bugs.webkit.org/show_bug.cgi?id=175167 5 rdar://problem/32936116 6 7 Reviewed by Jer Noble. 8 9 Test now requires forward fast seek result to be between current time and the target time, 10 and a backward seek to be before the seek time. 11 12 * media/video-fast-seek.html: 13 * media/media-source/media-source-fastseek.html: 14 1 15 2017-08-08 Ms2ger <Ms2ger@igalia.com> 2 16 -
trunk/LayoutTests/media/media-source/media-source-fastseek-expected.txt
r159519 r220414 12 12 EVENT(seeked) 13 13 EXPECTED (video.currentTime.toFixed(1) == '1') OK 14 RUN(video.fastSeek( 2))14 RUN(video.fastSeek(5)) 15 15 EVENT(seeked) 16 16 EXPECTED (video.currentTime.toFixed(1) == '4') OK -
trunk/LayoutTests/media/media-source/media-source-fastseek.html
r159519 r220414 60 60 testExpected('video.currentTime.toFixed(1)', 1); 61 61 waitForEventOnce('seeked', seeked2); 62 run('video.fastSeek( 2)');62 run('video.fastSeek(5)'); 63 63 } 64 64 -
trunk/LayoutTests/media/video-fast-seek-expected.txt
r159306 r220414 7 7 EVENT(timeupdate) 8 8 EXPECTED (video.currentTime.toFixed(1) == '2.5') OK 9 Test that fastSeek() past the currentTime will not result in a seek before the currentTime :9 Test that fastSeek() past the currentTime will not result in a seek before the currentTime or past the seek time: 10 10 RUN(video.fastSeek(2.6)) 11 11 EVENT(timeupdate) 12 EXPECTED (video.currentTime >= '2.6') OK 12 EXPECTED (video.currentTime <= '2.6') OK 13 EXPECTED (video.currentTime >= '2.5') OK 13 14 Seek before the 4th sync sample: 14 15 RUN(video.currentTime = 2.3) 15 16 EVENT(timeupdate) 16 17 EXPECTED (video.currentTime.toFixed(1) == '2.3') OK 17 Test that fastSeek() before the currentTime will not result in a seek past the currentTime:18 Test that fastSeek() before the currentTime will not result in a seek past the seek time: 18 19 RUN(video.fastSeek(2.2)) 19 20 EVENT(timeupdate) -
trunk/LayoutTests/media/video-fast-seek.html
r159306 r220414 29 29 { 30 30 testExpected('video.currentTime.toFixed(1)', 2.5); 31 consoleWrite('Test that fastSeek() past the currentTime will not result in a seek before the currentTime :');31 consoleWrite('Test that fastSeek() past the currentTime will not result in a seek before the currentTime or past the seek time:'); 32 32 waitForEventOnce('timeupdate', seek2); 33 33 run('video.fastSeek(2.6)'); … … 36 36 function seek2() 37 37 { 38 testExpected('video.currentTime', 2.6, '>='); 38 testExpected('video.currentTime', 2.6, '<='); 39 testExpected('video.currentTime', 2.5, '>='); 39 40 consoleWrite('Seek before the 4th sync sample:'); 40 41 waitForEventOnce('timeupdate', seek3); … … 45 46 { 46 47 testExpected('video.currentTime.toFixed(1)', 2.3); 47 consoleWrite('Test that fastSeek() before the currentTime will not result in a seek past the currentTime:');48 consoleWrite('Test that fastSeek() before the currentTime will not result in a seek past the seek time:'); 48 49 waitForEventOnce('timeupdate', seek4); 49 50 run('video.fastSeek(2.2)'); -
trunk/Source/WebCore/ChangeLog
r220411 r220414 1 2017-08-08 Jeremy Jones <jeremyj@apple.com> 2 3 Change fast seek logic to prevent ping-ponging. 4 https://bugs.webkit.org/show_bug.cgi?id=175167 5 rdar://problem/32936116 6 7 Reviewed by Jer Noble. 8 9 Updated test: media/video-fast-seek.html 10 11 Changed fast seek behavior to always seek early than seek time; and after current time when seeking forward. 12 This prevents ping-ponging, where a fast seek overshoots the target looking for a keyframe. 13 A subsequent seek will suddenly be on the other side of current time and 14 will search in the opposite direction for a key frame; repeat. 15 16 * html/HTMLMediaElement.cpp: 17 (WebCore::HTMLMediaElement::fastSeek): 18 1 19 2017-08-08 Ms2ger <Ms2ger@igalia.com> 2 20 -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r220085 r220414 2628 2628 // then the adjusted new playback position must also be after the current playback position. 2629 2629 refreshCachedTime(); 2630 2630 2631 MediaTime delta = time - currentMediaTime(); 2631 MediaTime negativeTolerance = delta >= MediaTime::zeroTime() ? delta : MediaTime::positiveInfiniteTime(); 2632 MediaTime positiveTolerance = delta < MediaTime::zeroTime() ? -delta : MediaTime::positiveInfiniteTime(); 2633 2634 seekWithTolerance(time, negativeTolerance, positiveTolerance, true); 2632 MediaTime negativeTolerance = delta < MediaTime::zeroTime() ? MediaTime::positiveInfiniteTime() : delta; 2633 seekWithTolerance(time, negativeTolerance, MediaTime::zeroTime(), true); 2635 2634 } 2636 2635
Note: See TracChangeset
for help on using the changeset viewer.