Diff
Modified: trunk/Source/WebCore/ChangeLog (270667 => 270668)
--- trunk/Source/WebCore/ChangeLog 2020-12-11 05:32:04 UTC (rev 270667)
+++ trunk/Source/WebCore/ChangeLog 2020-12-11 07:11:01 UTC (rev 270668)
@@ -1,3 +1,16 @@
+2020-12-10 Peng Liu <[email protected]>
+
+ [Media in GPU Process][MSE] Implement several methods in SourceBufferPrivateRemote to make seeking more reliable
+ https://bugs.webkit.org/show_bug.cgi?id=219757
+
+ Reviewed by Eric Carlson.
+
+ Clean up the code regarding flush audio and video.
+
+ * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
+ * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
+ (WebCore::SourceBufferPrivateAVFObjC::flush):
+
2020-12-10 Chris Dumez <[email protected]>
[GPUProcess] Cut in half amount of IPC needed to do WebAudio
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h (270667 => 270668)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h 2020-12-11 05:32:04 UTC (rev 270667)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h 2020-12-11 07:11:01 UTC (rev 270668)
@@ -172,7 +172,7 @@
void flushVideo();
ALLOW_NEW_API_WITHOUT_GUARDS_BEGIN
- void flush(AVSampleBufferAudioRenderer *);
+ void flushAudio(AVSampleBufferAudioRenderer *);
ALLOW_NEW_API_WITHOUT_GUARDS_END
Vector<RefPtr<VideoTrackPrivate>> m_videoTracks;
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm (270667 => 270668)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm 2020-12-11 05:32:04 UTC (rev 270667)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm 2020-12-11 07:11:01 UTC (rev 270668)
@@ -845,10 +845,14 @@
void SourceBufferPrivateAVFObjC::flush()
{
- flushVideo();
+ if (m_videoTracks.size())
+ flushVideo();
+ if (!m_audioTracks.size())
+ return;
+
for (auto& renderer : m_audioRenderers.values())
- flush(renderer.get());
+ flushAudio(renderer.get());
}
void SourceBufferPrivateAVFObjC::registerForErrorNotifications(SourceBufferPrivateAVFObjCErrorClient* client)
@@ -928,7 +932,7 @@
if (trackID == m_enabledVideoTrackID) {
flushVideo();
} else if (m_audioRenderers.contains(trackID))
- flush(m_audioRenderers.get(trackID).get());
+ flushAudio(m_audioRenderers.get(trackID).get());
}
void SourceBufferPrivateAVFObjC::flushVideo()
@@ -953,7 +957,7 @@
}
ALLOW_NEW_API_WITHOUT_GUARDS_BEGIN
-void SourceBufferPrivateAVFObjC::flush(AVSampleBufferAudioRenderer *renderer)
+void SourceBufferPrivateAVFObjC::flushAudio(AVSampleBufferAudioRenderer *renderer)
ALLOW_NEW_API_WITHOUT_GUARDS_END
{
[renderer flush];
Modified: trunk/Source/WebKit/ChangeLog (270667 => 270668)
--- trunk/Source/WebKit/ChangeLog 2020-12-11 05:32:04 UTC (rev 270667)
+++ trunk/Source/WebKit/ChangeLog 2020-12-11 07:11:01 UTC (rev 270668)
@@ -1,3 +1,23 @@
+2020-12-10 Peng Liu <[email protected]>
+
+ [Media in GPU Process][MSE] Implement several methods in SourceBufferPrivateRemote to make seeking more reliable
+ https://bugs.webkit.org/show_bug.cgi?id=219757
+
+ Reviewed by Eric Carlson.
+
+ Add the required IPC messages and implement three functions of `SourceBufferPrivateRemote`.
+
+ * GPUProcess/media/RemoteSourceBufferProxy.cpp:
+ (WebKit::RemoteSourceBufferProxy::abort):
+ (WebKit::RemoteSourceBufferProxy::resetParserState):
+ (WebKit::RemoteSourceBufferProxy::removedFromMediaSource):
+ * GPUProcess/media/RemoteSourceBufferProxy.h:
+ * GPUProcess/media/RemoteSourceBufferProxy.messages.in:
+ * WebProcess/GPU/media/SourceBufferPrivateRemote.cpp:
+ (WebKit::SourceBufferPrivateRemote::abort):
+ (WebKit::SourceBufferPrivateRemote::resetParserState):
+ (WebKit::SourceBufferPrivateRemote::removedFromMediaSource):
+
2020-12-10 Andy Estes <[email protected]>
[Mac] Create a format reader plug-in for WebM
Modified: trunk/Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.cpp (270667 => 270668)
--- trunk/Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.cpp 2020-12-11 05:32:04 UTC (rev 270667)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.cpp 2020-12-11 07:11:01 UTC (rev 270668)
@@ -154,6 +154,21 @@
m_sourceBufferPrivate->append(data.vector());
}
+void RemoteSourceBufferProxy::abort()
+{
+ m_sourceBufferPrivate->abort();
+}
+
+void RemoteSourceBufferProxy::resetParserState()
+{
+ m_sourceBufferPrivate->resetParserState();
+}
+
+void RemoteSourceBufferProxy::removedFromMediaSource()
+{
+ m_sourceBufferPrivate->removedFromMediaSource();
+}
+
void RemoteSourceBufferProxy::setActive(bool active)
{
m_sourceBufferPrivate->setActive(active);
Modified: trunk/Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.h (270667 => 270668)
--- trunk/Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.h 2020-12-11 05:32:04 UTC (rev 270667)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.h 2020-12-11 07:11:01 UTC (rev 270668)
@@ -83,6 +83,9 @@
void setActive(bool);
void append(const IPC::DataReference&);
+ void abort();
+ void resetParserState();
+ void removedFromMediaSource();
void setReadyState(WebCore::MediaPlayer::ReadyState);
void updateBufferedFromTrackBuffers(bool sourceIsEnded);
void evictCodedFrames(uint64_t newDataSize, uint64_t pendingAppendDataCapacity, uint64_t maximumBufferSize, const MediaTime& currentTime, const MediaTime& duration, bool isEnded);
Modified: trunk/Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.messages.in (270667 => 270668)
--- trunk/Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.messages.in 2020-12-11 05:32:04 UTC (rev 270667)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.messages.in 2020-12-11 07:11:01 UTC (rev 270668)
@@ -28,6 +28,9 @@
messages -> RemoteSourceBufferProxy NotRefCounted {
SetActive(bool active)
Append(IPC::DataReference data)
+ Abort()
+ ResetParserState()
+ RemovedFromMediaSource()
SetReadyState(WebCore::MediaPlayer::ReadyState state)
UpdateBufferedFromTrackBuffers(bool sourceIsEnded)
EvictCodedFrames(uint64_t newDataSize, uint64_t pendingAppendDataCapacity, uint64_t maximumBufferSize, MediaTime currentTime, MediaTime duration, bool isEnded)
Modified: trunk/Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp (270667 => 270668)
--- trunk/Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp 2020-12-11 05:32:04 UTC (rev 270667)
+++ trunk/Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp 2020-12-11 07:11:01 UTC (rev 270668)
@@ -83,17 +83,17 @@
void SourceBufferPrivateRemote::abort()
{
- notImplemented();
+ m_gpuProcessConnection.connection().send(Messages::RemoteSourceBufferProxy::Abort(), m_remoteSourceBufferIdentifier);
}
void SourceBufferPrivateRemote::resetParserState()
{
- notImplemented();
+ m_gpuProcessConnection.connection().send(Messages::RemoteSourceBufferProxy::ResetParserState(), m_remoteSourceBufferIdentifier);
}
void SourceBufferPrivateRemote::removedFromMediaSource()
{
- notImplemented();
+ m_gpuProcessConnection.connection().send(Messages::RemoteSourceBufferProxy::RemovedFromMediaSource(), m_remoteSourceBufferIdentifier);
}
MediaPlayer::ReadyState SourceBufferPrivateRemote::readyState() const