Title: [289304] branches/safari-613-branch/Source/WebCore
Revision
289304
Author
[email protected]
Date
2022-02-07 18:55:15 -0800 (Mon, 07 Feb 2022)

Log Message

Cherry-pick r288549. rdar://problem/86452550

    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

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288549 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-613-branch/Source/WebCore/ChangeLog (289303 => 289304)


--- branches/safari-613-branch/Source/WebCore/ChangeLog	2022-02-08 02:55:12 UTC (rev 289303)
+++ branches/safari-613-branch/Source/WebCore/ChangeLog	2022-02-08 02:55:15 UTC (rev 289304)
@@ -1,5 +1,35 @@
 2022-02-07  Russell Epstein  <[email protected]>
 
+        Cherry-pick r288549. rdar://problem/86452550
+
+    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
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288549 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    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-02-07  Russell Epstein  <[email protected]>
+
         Cherry-pick r288547. rdar://problem/87824766
 
     (REGRESSION r287485) [LFC][IFC] Incorrect RTL content position when intrusive float is present

Modified: branches/safari-613-branch/Source/WebCore/html/HTMLMediaElement.cpp (289303 => 289304)


--- branches/safari-613-branch/Source/WebCore/html/HTMLMediaElement.cpp	2022-02-08 02:55:12 UTC (rev 289303)
+++ branches/safari-613-branch/Source/WebCore/html/HTMLMediaElement.cpp	2022-02-08 02:55:15 UTC (rev 289304)
@@ -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: branches/safari-613-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (289303 => 289304)


--- branches/safari-613-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2022-02-08 02:55:12 UTC (rev 289303)
+++ branches/safari-613-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2022-02-08 02:55:15 UTC (rev 289304)
@@ -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
@@ -3574,7 +3566,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