Commit 2b361c9
committed
[GStreamer] Account for internal pauses because of buffering
https://bugs.webkit.org/show_bug.cgi?id=287881
Reviewed by Xabier Rodriguez-Calvar and Philippe Normand.
The PlaybackRatePausedState in MediaPlayerPrivateGStreamer only accounts
for different pause reasons because of manual pause and playbackRate ==
0, but pauses because of low buffering level should also be accounted.
Currently they aren't (but the player can get paused because of it) and
that's confusing the code that deals with pauses/unpauses because of
playbackRate.
See: #1455
This downstream PR proposes to "abuse"
PlaybackRatePausedState::RatePaused to keep tack of pauses because of
buffering, but that's conceptually wrong. A new BufferingPaused state
should be created to keep track of this pause reason and be able to
recover from it (unpause) later.
This commit creates that new BufferingPaused state and keeps track of
it in a similar way to how ManuallyPaused is managed (but pauses for
buffering aren't explicit manual pauses).
Co-authored by: suresh-khurdiya-infosys <skhurdiya.ext@libertyglobal.com>
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::play): Also set RatePaused when we're in the BufferingPaused state and playbackRate is zero.
(WebCore::MediaPlayerPrivateGStreamer::updateStates): Set m_playbackRatePausedState to RatePaused when the rate is actually zero, and to BufferingPaused when the pause happens because of buffering.
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Added new PlaybackRatePausedState::BufferingPaused state and explanation.
Canonical link: https://commits.webkit.org/290606@main1 parent 1e741d4 commit 2b361c9
2 files changed
Lines changed: 12 additions & 3 deletions
File tree
- Source/WebCore/platform/graphics/gstreamer
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
437 | | - | |
| 437 | + | |
| 438 | + | |
438 | 439 | | |
439 | 440 | | |
440 | 441 | | |
| |||
2620 | 2621 | | |
2621 | 2622 | | |
2622 | 2623 | | |
2623 | | - | |
2624 | | - | |
| 2624 | + | |
| 2625 | + | |
| 2626 | + | |
| 2627 | + | |
| 2628 | + | |
| 2629 | + | |
| 2630 | + | |
2625 | 2631 | | |
2626 | 2632 | | |
2627 | 2633 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
316 | 319 | | |
317 | 320 | | |
318 | 321 | | |
| |||
0 commit comments