Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c6dd1fbfea75773bdffbf034e532930577168acd
      
https://github.com/WebKit/WebKit/commit/c6dd1fbfea75773bdffbf034e532930577168acd
  Author: Enrique Ocaña González <[email protected]>
  Date:   2023-04-17 (Mon, 17 Apr 2023)

  Changed paths:
    M 
Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp

  Log Message:
  -----------
  [MSE][GStreamer] Avoid unneeded timechanged notifications
https://bugs.webkit.org/show_bug.cgi?id=255452

Reviewed by Philippe Normand.

The YouTube MSE Conformance Tests 2021[1][2] added a check to ensure that the 
initial warm up time
of the player is less than 500 ms in accuracy tests. While these tests pass on 
a fast desktop
computer, they fail on a lower end device (eg: Raspberry Pi 3). This is because 
there's a first
timeupdate event triggered as soon as the appended init segment is processed, 
but the processing
time of the next appended data segment takes too much time, so when playback 
actually starts, the
next timeupdate event comes later than 500ms from the first one, causing the 
test to fail on slow
platforms.

Since the default time of the video element should be 0 from the begining and 
the time reported by
that initial timeupdate is actually 0 (no change), that initial timeupdate 
event is redundant (and
wasn't happening before the WebKitMediaSrc rework[3]).

This patch honors the original source code comment, which states that the 
timeupdate notification
makes sense when currentTime has reached the duration, avoiding the 
notification in other cases,
at least when still waiting for an initial preroll.

[1] https://ytlr-cert.appspot.com/2021/main.html?tests=35,36,37,38&command=run
[2] https://ytlr-cert.appspot.com/2021/media/conformanceTest.js, line 886 (best 
displayed as https://pastebin.com/fPx1EW22)
[3] 
https://github.com/WebKit/WebKit/commit/9382c6ef1a5b64d1701c691c63fe84de22cf932b

* 
Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
(WebCore::MediaPlayerPrivateGStreamerMSE::propagateReadyStateToPlayer): Don't 
notify timeupdate before prerolling unless currentTime has reached the duration.

Canonical link: https://commits.webkit.org/263019@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to