Commit 9b71229
committed
[GStreamer] Premature finishSeek in progressive video
https://bugs.webkit.org/show_bug.cgi?id=287568
Reviewed by Philippe Normand.
The MediaPlayerPrivateGStreamer::finishSeek() call is happening before
the GStreamer seek completes, causing the JavaScript webpage to see the
seek origin position on embedded systems with low CPU power (where seek
takes more time to complete). This has been reproduced on Raspberry Pi
using downstream wpe-2.38 and wpe-2.46, but I haven't been able to
reproduce it on the main branch on desktop with a powerful computer.
That doesn't mean that the problem isn't there.
See: #1456
MediaPlayerPrivateGStreamer::doSeek() calls updateBufferingStatus(),
which in turn calls updateStates(), which notifies the player of a
readyState change and HTMLMediaElement::setReadyState() calls
finishSeek().
This commit prevents the call to updateStates() from
updateBufferingStatus() in this particular case. This doesn't cause any
problem, since a new call to updateStates() will happen when the async
state change in the GStreamer pipeline completes.
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::doSeek): Call updateBufferingStatus() with the shouldUpdateStates parameter set to false.
(WebCore::MediaPlayerPrivateGStreamer::updateBufferingStatus): Added shouldUpdateStates parameter (defaults to true).
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Added shouldUpdateStates parameter to updateBufferingStatus(), with a default value of true..
Canonical link: https://commits.webkit.org/290339@main1 parent 60b7dbc commit 9b71229
2 files changed
Lines changed: 5 additions & 4 deletions
File tree
- Source/WebCore/platform/graphics/gstreamer
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
545 | 545 | | |
546 | 546 | | |
547 | 547 | | |
548 | | - | |
| 548 | + | |
549 | 549 | | |
550 | 550 | | |
551 | 551 | | |
| |||
2214 | 2214 | | |
2215 | 2215 | | |
2216 | 2216 | | |
2217 | | - | |
| 2217 | + | |
2218 | 2218 | | |
2219 | 2219 | | |
2220 | 2220 | | |
| |||
2280 | 2280 | | |
2281 | 2281 | | |
2282 | 2282 | | |
2283 | | - | |
| 2283 | + | |
| 2284 | + | |
2284 | 2285 | | |
2285 | 2286 | | |
2286 | 2287 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
542 | 542 | | |
543 | 543 | | |
544 | 544 | | |
545 | | - | |
| 545 | + | |
546 | 546 | | |
547 | 547 | | |
548 | 548 | | |
| |||
0 commit comments