Commit eda256c
[GStreamer] Buffer end equals video duration for progressive video
https://bugs.webkit.org/show_bug.cgi?id=269203
Reviewed by Philippe Normand.
On some long regular videos, the current buffer management mechanism
reports 100% of the video as loaded when that's not actually happening.
This causes document.getElementsByTagName('video')[0].buffered.end(0) to
be equal to document.getElementsByTagName('video')[0].duration when that
should clearly not the case.
The current default way of computing m_maxTimeLoaded isn't working
properly because oftern, when the buffering messages are received by
MediaPlayerPrivateGStreamer, the duration is still unknown and the code
in charge of computing the fill status bails out.
The WebKitWebSrc network downloading statistics provide a much more
accurate source of information for the buffered data, and should be used
in more cases when available. The download statistics tend to arrive
later than the buffer fill messages and at that moment duration is
already available, leading to a proper computation of m_maxTimeLoaded.
See: #1238
This patch calls updateMaxTimeLoaded() when the network statistics are
received. That update must be done here because the current system in
place to perform such update is based on m_fillTimer, and when the
network stats are received the timer is usually already stopped. This
method works fine both with on-disk cache and without it (the typical
use case on set-top-box devices).
Original patch authored by: suresh-khurdiya-epam <skhurdiya.contractor@libertyglobal.com>
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::handleMessage): When a webkit-network-statistics message is received, compute the fill status and update m_maxTimeLoaded.
Canonical link: https://commits.webkit.org/274643@main1 parent 8447e6a commit eda256c
1 file changed
Lines changed: 11 additions & 1 deletion
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2040 | 2040 | | |
2041 | 2041 | | |
2042 | 2042 | | |
2043 | | - | |
| 2043 | + | |
2044 | 2044 | | |
| 2045 | + | |
| 2046 | + | |
| 2047 | + | |
| 2048 | + | |
| 2049 | + | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
2045 | 2055 | | |
2046 | 2056 | | |
2047 | 2057 | | |
| |||
0 commit comments