Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 0df38135ebe566dab57003d891dd1c0cf2355782 https://github.com/WebKit/WebKit/commit/0df38135ebe566dab57003d891dd1c0cf2355782 Author: Enrique Ocaña González <eoca...@igalia.com> Date: 2023-11-15 (Wed, 15 Nov 2023)
Changed paths: M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h Log Message: ----------- [GStreamer] Video goes blank on some platforms after playback ends https://bugs.webkit.org/show_bug.cgi?id=264739 Reviewed by Philippe Normand. On some downstream platforms, the video gets black after playback finishes. This happens because https://bugs.webkit.org/show_bug.cgi?id=89122 used to set the pipeline to NULL, although later https://bugs.webkit.org/show_bug.cgi?id=117354 set it to READY. This change deinitializes a big part of the pipeline, which should otherwise stay in a working state if the state was PAUSED as it should be without those changes. While on desktop platforms the last video frame is still kept and shown, on some downstream platforms using a custom multimedia subsystem the deinitialization destroys internal resources and makes that last video frame not to be visible anymore. The original purpose of the mentioned bugs was to avoid having the audio device opened after the video finished. This was relevant in 2012, when many platforms still used ALSA as a sound system, but it's not so relevant nowadays, when PulseAudio is the usual choice on desktop. This patch reworks the readyTimerHandler and readyTimerFired into pausedTimerHandler and pausedTimerFired, because now the pipeline stays in PAUSED and having a timer to eventually releasing resources by transitioning to NULL still makes sense. The timeout has been increased to 5 minutes and maybe it would eventually need to be even larger. Original author: suresh-khurdiya-epam <skhurdiya.contrac...@libertyglobal.com> See: https://github.com/WebPlatformForEmbedded/WPEWebKit/pull/1205 * Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): Renamed m_readyTimerHandler to m_pausedTimerHandler. (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): Ditto. (WebCore::MediaPlayerPrivateGStreamer::changePipelineState): Ditto, and added extra conditions to only start the timer on PAUSE at end. (WebCore::MediaPlayerPrivateGStreamer::loadingFailed): Ditto. (WebCore::MediaPlayerPrivateGStreamer::didEnd): Set the pipeline to PAUSED on end, instead of setting it to READY. (WebCore::MediaPlayerPrivateGStreamer::pausedTimerFired): Renamed from readyTimerFired. (WebCore::MediaPlayerPrivateGStreamer::readyTimerFired): Deleted. * Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Renamed m_readyTimerHandler to m_pausedTimerHandler and readyTimerFired() to pausedTimerFired(). Canonical link: https://commits.webkit.org/270766@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes