Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 40cfa6a6170658709d2eafdc10657bc67a6ec207
      
https://github.com/WebKit/WebKit/commit/40cfa6a6170658709d2eafdc10657bc67a6ec207
  Author: Enrique Ocaña González <[email protected]>
  Date:   2024-04-16 (Tue, 16 Apr 2024)

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

  Log Message:
  -----------
  [GStreamer] Ignore sinks position while seeking
https://bugs.webkit.org/show_bug.cgi?id=272167

Reviewed by Alicia Boya Garcia.

After removing MSE data, sinks get flushed and are not able to return
valid playback time. Some implementation return invalid time, 0.00 or
even some random value. This value may be then reported up to
HTMLMediaElement and that may be confusing to web applications.

This commit doesn't trust sinks position when pipeline is not prerolled,
as behavor is different across devices. The last cached position is used
instead.

To reflect better what's actually happening, isPipelineSeeking() has been
renamed as isPipelineWaitingPreroll() and the condition now also includes
pending states higher than paused.

Original author: Andrzej Surdej (https://github.com/asurdej-comcast)

See: https://github.com/WebPlatformForEmbedded/WPEWebKit/pull/1302

* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::isPipelineWaitingPreroll const): Renamed 
from isPipelineSeeking().
(WebCore::MediaPlayerPrivateGStreamer::play): isPipelineSeeking() now named as 
isPipelineWaitingPreroll().
(WebCore::MediaPlayerPrivateGStreamer::paused const): Ditto.
(WebCore::MediaPlayerPrivateGStreamer::changePipelineState): Ditto.
(WebCore::MediaPlayerPrivateGStreamer::playbackPosition const): Use 
GST_CLOCK_TIME_NONE when the pipeline isn't prerolled. This will force the 
usage of the target seek time (if possible) or the last cached position (in the 
worst case).
(WebCore::MediaPlayerPrivateGStreamer::isPipelineSeeking const): Deleted. 
Renamed to isPipelineWaitingPreroll().
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: 
isPipelineSeeking() now named as isPipelineWaitingPreroll().
* 
Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
(WebCore::MediaPlayerPrivateGStreamerMSE::updateStates): isPipelineSeeking() 
now named as isPipelineWaitingPreroll().

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to