[webkit-changes] [WebKit/WebKit] 0218f0: [GStreamer] Constant CPU usage on autoplaying vide...
Philippe Normand
noreply at github.com
Fri May 12 08:30:44 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0218f0f88a9ca5670d3e9eea1c95903ef8152a68
https://github.com/WebKit/WebKit/commit/0218f0f88a9ca5670d3e9eea1c95903ef8152a68
Author: Philippe Normand <philn at igalia.com>
Date: 2023-05-12 (Fri, 12 May 2023)
Changed paths:
M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h
M Tools/Scripts/webkitpy/port/glib.py
Log Message:
-----------
[GStreamer] Constant CPU usage on autoplaying videos, even when out of viewport
https://bugs.webkit.org/show_bug.cgi?id=256123
Reviewed by Xabier Rodriguez-Calvar.
The GStreamer player now implements the `MediaPlayerPrivate::setVisibleInViewport()` by pausing
invisible autoplaying muted non-mediastream video players. Playback is resumed to previous state
when they become visible again. Metadata loading on invisible players is still allowed.
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::load):
(WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
(WebCore::MediaPlayerPrivateGStreamer::updateStates):
(WebCore::MediaPlayerPrivateGStreamer::triggerRepaint):
(WebCore::MediaPlayerPrivateGStreamer::setVisibleInViewport):
(WebCore::MediaPlayerPrivateGStreamer::paint):
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
Canonical link: https://commits.webkit.org/264017@main
More information about the webkit-changes
mailing list