[ARRISAPOL-3803][GStreamer] Sometimes progressive playback is not resumed after seek #517
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[ARRISAPOL-3803][GStreamer] Sometimes progressive playback is not resumed after seek
https://bugs.webkit.org/show_bug.cgi?id=300041
Reviewed by Philippe Normand.
Sometimes, in a downstream multimedia player, regular video playback remains paused after seek instead of resuming automatically. It will play normally when play() or another seek operation are manually triggered.
Log analys shows that in the failing case the browser missed the state transition to 'HaveCurrentData', and application can't resume playback after seek. It was missed because it happened the gstreamer pipeline remains in state transition for too long and can't process buffering events. Normally it goes: seek -> Paused pipeline -> buffering (HaveCurrentData) -> finish_buffering(HaveEnoughData) -> start_playback. However, in the failing case, seek takes too long (~2sec) to set the PAUSED state on the pipeline and we are missing the buffering(HaveCurrentData) stage.
See: WebPlatformForEmbedded#1561
This patch returns the player readyState to HaveCurrentData and the networkState to Loading when a seek is being processed. The states will reach their final values as soon as the async state transition caused by the seek finishes.
Original author: Volodymyr Ogorodnik (https://github.com/volodymyr-ogorodnik-red)
(WebCore::MediaPlayerPrivateGStreamer::updateStates): Reset readyState and networkState to HaveCurrentData and Loading while the player is in an async state transition (in a seek) and buffering.
Canonical link: https://commits.webkit.org/300933@main