Title: [288413] trunk/Source/WebCore
- Revision
- 288413
- Author
- [email protected]
- Date
- 2022-01-22 19:38:09 -0800 (Sat, 22 Jan 2022)
Log Message
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):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (288412 => 288413)
--- trunk/Source/WebCore/ChangeLog 2022-01-23 01:03:39 UTC (rev 288412)
+++ trunk/Source/WebCore/ChangeLog 2022-01-23 03:38:09 UTC (rev 288413)
@@ -1,3 +1,28 @@
+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-01-22 Said Abou-Hallawa <[email protected]>
[GPU Process] Add the class 'SourceImage' to represent variants of image
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm (288412 => 288413)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm 2022-01-23 01:03:39 UTC (rev 288412)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm 2022-01-23 03:38:09 UTC (rev 288413)
@@ -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