Title: [288549] trunk/Source/WebCore
Revision
288549
Author
[email protected]
Date
2022-01-25 07:59:17 -0800 (Tue, 25 Jan 2022)

Log Message

Unreviewed, reverting r282374.
https://bugs.webkit.org/show_bug.cgi?id=235587

Introduced perf regression

Reverted changeset:

"Playback stops although the progress bar moves"
https://bugs.webkit.org/show_bug.cgi?id=230210
https://commits.webkit.org/r282374

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (288548 => 288549)


--- trunk/Source/WebCore/ChangeLog	2022-01-25 15:52:38 UTC (rev 288548)
+++ trunk/Source/WebCore/ChangeLog	2022-01-25 15:59:17 UTC (rev 288549)
@@ -1,3 +1,16 @@
+2022-01-25  Commit Queue  <[email protected]>
+
+        Unreviewed, reverting r282374.
+        https://bugs.webkit.org/show_bug.cgi?id=235587
+
+        Introduced perf regression
+
+        Reverted changeset:
+
+        "Playback stops although the progress bar moves"
+        https://bugs.webkit.org/show_bug.cgi?id=230210
+        https://commits.webkit.org/r282374
+
 2022-01-25  Alan Bujtas  <[email protected]>
 
         (REGRESSION r287485) [LFC][IFC] Incorrect RTL content position when intrusive float is present

Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (288548 => 288549)


--- trunk/Source/WebCore/html/HTMLMediaElement.cpp	2022-01-25 15:52:38 UTC (rev 288548)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp	2022-01-25 15:59:17 UTC (rev 288549)
@@ -3551,7 +3551,7 @@
 void HTMLMediaElement::updatePlaybackRate()
 {
     double requestedRate = requestedPlaybackRate();
-    if (m_player && potentiallyPlaying() && m_player->rate() != requestedRate)
+    if (m_player && potentiallyPlaying() && m_player->effectiveRate() != requestedRate)
         m_player->setRate(requestedRate);
 }
 

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (288548 => 288549)


--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2022-01-25 15:52:38 UTC (rev 288548)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2022-01-25 15:59:17 UTC (rev 288549)
@@ -1233,18 +1233,10 @@
         return MediaPlayerPrivateAVFoundation::MediaPlayerAVPlayerItemStatusFailed;
     if (m_cachedLikelyToKeepUp)
         return MediaPlayerPrivateAVFoundation::MediaPlayerAVPlayerItemStatusPlaybackLikelyToKeepUp;
-    // From AVPlayer.h:
-    // AVPlayerTimeControlStatusWaitingToPlayAtSpecifiedRate
-    // This state is entered when
-    // 1) the playback buffer becomes empty and playback stalls in AVPlayerTimeControlStatusPlaying,
-    // 2) when rate is set from zero to non-zero in AVPlayerTimeControlStatusPaused and insufficient media data has been buffered for playback to occur, or
-    // 3) when the player has no item to play, i.e. when the receiver's currentItem is nil.
-    // In this state, the value of the rate property is not currently effective but instead indicates the rate at which playback will start or resume.
-    // We can't rely on just m_cachedBufferFull and m_cachedBufferEmpty due to rdar://83048005.
-    if (m_cachedTimeControlStatus == AVPlayerTimeControlStatusWaitingToPlayAtSpecifiedRate || m_cachedBufferEmpty)
-        return MediaPlayerAVPlayerItemStatusPlaybackBufferEmpty;
     if (m_cachedBufferFull)
         return MediaPlayerPrivateAVFoundation::MediaPlayerAVPlayerItemStatusPlaybackBufferFull;
+    if (m_cachedBufferEmpty)
+        return MediaPlayerPrivateAVFoundation::MediaPlayerAVPlayerItemStatusPlaybackBufferEmpty;
 
     return MediaPlayerPrivateAVFoundation::MediaPlayerAVPlayerItemStatusReadyToPlay;
 }
@@ -1651,7 +1643,7 @@
     if (!metaDataAvailable())
         return 0;
 
-    return m_cachedTimeControlStatus == AVPlayerTimeControlStatusWaitingToPlayAtSpecifiedRate ? 0.0 : m_cachedRate;
+    return m_cachedRate;
 }
 
 double MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesLastModifiedTime() const
@@ -3573,7 +3565,6 @@
         return;
 
     m_cachedTimeControlStatus = timeControlStatus;
-    updateStates();
     rateChanged();
     m_wallClockAtCachedCurrentTime = std::nullopt;
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to