Title: [290912] branches/safari-613-branch/Source/WebCore
- Revision
- 290912
- Author
- [email protected]
- Date
- 2022-03-07 14:08:42 -0800 (Mon, 07 Mar 2022)
Log Message
Cherry-pick r288413. rdar://problem/86287467
REGRESSION (Safari 15?): Blob videos slow to pause, affects CBS and CNN
https://bugs.webkit.org/show_bug.cgi?id=234066
Reviewed by Jer Noble.
`MediaPlayerPrivateMediaSourceAVFObjC::playInternal()` calls `[m_synchronizer setRate:]`,
which will make the return value of `MediaPlayerPrivateMediaSourceAVFObjC::paused()` change
from true to false. But it won't push the new `paused` value back to the Web process.
`RemoteMediaPlayerProxy::play()` does call `sendCachedState()` after calling
`m_player->play()`, but because `MediaPlayerPrivateMediaSourceAVFObjC::playInternal()` is not
called in the same run loop, `sendCachedState()` won't send back the updated `paused` value either.
In most cases, this is not an issue, because other member functions of `RemoteMediaPlayerProxy`
will call `sendCachedState()` to push the updated `paused` value back to the Web process later.
However, we did find some videos need the `paused` value to be pushed back the Web process
in a timely manner.
No new tests, manually tested.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288413 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-613-branch/Source/WebCore/ChangeLog (290911 => 290912)
--- branches/safari-613-branch/Source/WebCore/ChangeLog 2022-03-07 22:08:39 UTC (rev 290911)
+++ branches/safari-613-branch/Source/WebCore/ChangeLog 2022-03-07 22:08:42 UTC (rev 290912)
@@ -1,5 +1,60 @@
2022-03-07 Russell Epstein <[email protected]>
+ Cherry-pick r288413. rdar://problem/86287467
+
+ REGRESSION (Safari 15?): Blob videos slow to pause, affects CBS and CNN
+ https://bugs.webkit.org/show_bug.cgi?id=234066
+
+ Reviewed by Jer Noble.
+
+ `MediaPlayerPrivateMediaSourceAVFObjC::playInternal()` calls `[m_synchronizer setRate:]`,
+ which will make the return value of `MediaPlayerPrivateMediaSourceAVFObjC::paused()` change
+ from true to false. But it won't push the new `paused` value back to the Web process.
+
+ `RemoteMediaPlayerProxy::play()` does call `sendCachedState()` after calling
+ `m_player->play()`, but because `MediaPlayerPrivateMediaSourceAVFObjC::playInternal()` is not
+ called in the same run loop, `sendCachedState()` won't send back the updated `paused` value either.
+
+ In most cases, this is not an issue, because other member functions of `RemoteMediaPlayerProxy`
+ will call `sendCachedState()` to push the updated `paused` value back to the Web process later.
+ However, we did find some videos need the `paused` value to be pushed back the Web process
+ in a timely manner.
+
+ No new tests, manually tested.
+
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
+ (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal):
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288413 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-01-22 Peng Liu <[email protected]>
+
+ REGRESSION (Safari 15?): Blob videos slow to pause, affects CBS and CNN
+ https://bugs.webkit.org/show_bug.cgi?id=234066
+
+ Reviewed by Jer Noble.
+
+ `MediaPlayerPrivateMediaSourceAVFObjC::playInternal()` calls `[m_synchronizer setRate:]`,
+ which will make the return value of `MediaPlayerPrivateMediaSourceAVFObjC::paused()` change
+ from true to false. But it won't push the new `paused` value back to the Web process.
+
+ `RemoteMediaPlayerProxy::play()` does call `sendCachedState()` after calling
+ `m_player->play()`, but because `MediaPlayerPrivateMediaSourceAVFObjC::playInternal()` is not
+ called in the same run loop, `sendCachedState()` won't send back the updated `paused` value either.
+
+ In most cases, this is not an issue, because other member functions of `RemoteMediaPlayerProxy`
+ will call `sendCachedState()` to push the updated `paused` value back to the Web process later.
+ However, we did find some videos need the `paused` value to be pushed back the Web process
+ in a timely manner.
+
+ No new tests, manually tested.
+
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
+ (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal):
+
+2022-03-07 Russell Epstein <[email protected]>
+
Cherry-pick r287986. rdar://problem/87489048
Fix a few Objective-C object leaks due to early returns in `init`
Modified: branches/safari-613-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm (290911 => 290912)
--- branches/safari-613-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm 2022-03-07 22:08:39 UTC (rev 290911)
+++ branches/safari-613-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm 2022-03-07 22:08:42 UTC (rev 290912)
@@ -350,6 +350,8 @@
UNUSED_PARAM(hostTime);
[m_synchronizer setRate:m_rate];
#endif
+
+ m_player->playbackStateChanged();
}
void MediaPlayerPrivateMediaSourceAVFObjC::pause()
@@ -380,6 +382,8 @@
UNUSED_PARAM(hostTime);
[m_synchronizer setRate:0];
#endif
+
+ m_player->playbackStateChanged();
}
bool MediaPlayerPrivateMediaSourceAVFObjC::paused() const
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes