-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
https://bugs.webkit.org/show_bug.cgi?id=268911 rdar://122463053 Reviewed by Eric Carlson and Youenn Fablet. Simplify and move the emulated time progress management to its own class. Fly-by: the time would have continued to progress when pause() was called (until we got a new time update from the GPU process), reading the time following a call to pause() would have temporarily returned the wrong value. When seeking, the time should have stopped until the GPU process signalled we had completed the seek. The class is thread-safe when used with MediaSource, when used with CRABS it will only be called from the main thread. Covered by existing tests. * Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::TimeProgressEstimator::TimeProgressEstimator): (WebKit::MediaPlayerPrivateRemote::TimeProgressEstimator::currentTime const): (WebKit::MediaPlayerPrivateRemote::TimeProgressEstimator::cachedTime const): (WebKit::MediaPlayerPrivateRemote::TimeProgressEstimator::timeIsProgressing const): (WebKit::MediaPlayerPrivateRemote::TimeProgressEstimator::pause): (WebKit::MediaPlayerPrivateRemote::TimeProgressEstimator::setTime): (WebKit::MediaPlayerPrivateRemote::TimeProgressEstimator::setRate): (WebKit::MediaPlayerPrivateRemote::MediaPlayerPrivateRemote): (WebKit::MediaPlayerPrivateRemote::pause): (WebKit::MediaPlayerPrivateRemote::durationMediaTime const): (WebKit::MediaPlayerPrivateRemote::currentMediaTime const): (WebKit::MediaPlayerPrivateRemote::seekToTarget): (WebKit::MediaPlayerPrivateRemote::seeked): (WebKit::MediaPlayerPrivateRemote::rateChanged): (WebKit::MediaPlayerPrivateRemote::playbackStateChanged): (WebKit::MediaPlayerPrivateRemote::currentTimeChanged): (WebKit::MediaPlayerPrivateRemote::performTaskAtMediaTime): fly-by: completionHandler wasn't called under some circumstances. * Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h: Canonical link: https://commits.webkit.org/274278@main
- Loading branch information
Showing
2 changed files
with
94 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters