Title: [270708] trunk/Source
Revision
270708
Author
[email protected]
Date
2020-12-11 13:47:46 -0800 (Fri, 11 Dec 2020)

Log Message

[Media in GPU Process][MSE] Implement some required functions with new IPC messages and remove some unneeded functions
https://bugs.webkit.org/show_bug.cgi?id=219788

Reviewed by Eric Carlson.

Source/WebCore:

Change the argument type of sourceBufferPrivateDidReceiveRenderingError() from int to int64_t
so that we can pass it in an IPC message.

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveRenderingError):
* Modules/mediasource/SourceBuffer.h:
* platform/graphics/SourceBufferPrivateClient.h:

Source/WebKit:

Implement unimplemented functions and remove unneeded ones.
This patch also cleans up `RemoteSourceBufferProxy`.

* GPUProcess/media/RemoteSourceBufferProxy.cpp:
(WebKit::RemoteSourceBufferProxy::sourceBufferPrivateStreamEndedWithDecodeError):
(WebKit::RemoteSourceBufferProxy::sourceBufferPrivateAppendError):
(WebKit::RemoteSourceBufferProxy::sourceBufferPrivateDidDropSample):
(WebKit::RemoteSourceBufferProxy::sourceBufferPrivateDidReceiveRenderingError):
* GPUProcess/media/RemoteSourceBufferProxy.h:
* WebProcess/GPU/media/SourceBufferPrivateRemote.cpp:
(WebKit::SourceBufferPrivateRemote::sourceBufferPrivateStreamEndedWithDecodeError):
(WebKit::SourceBufferPrivateRemote::sourceBufferPrivateAppendError):
(WebKit::SourceBufferPrivateRemote::sourceBufferPrivateDidDropSample):
(WebKit::SourceBufferPrivateRemote::sourceBufferPrivateDidReceiveRenderingError):
(WebKit::SourceBufferPrivateRemote::flush): Deleted.
(WebKit::SourceBufferPrivateRemote::isReadyForMoreSamples): Deleted.
(WebKit::SourceBufferPrivateRemote::notifyClientWhenReadyForMoreSamples): Deleted.
(WebKit::SourceBufferPrivateRemote::canSetMinimumUpcomingPresentationTime const): Deleted.
(WebKit::SourceBufferPrivateRemote::setMinimumUpcomingPresentationTime): Deleted.
(WebKit::SourceBufferPrivateRemote::clearMinimumUpcomingPresentationTime): Deleted.
* WebProcess/GPU/media/SourceBufferPrivateRemote.h:
* WebProcess/GPU/media/SourceBufferPrivateRemote.messages.in:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (270707 => 270708)


--- trunk/Source/WebCore/ChangeLog	2020-12-11 21:36:48 UTC (rev 270707)
+++ trunk/Source/WebCore/ChangeLog	2020-12-11 21:47:46 UTC (rev 270708)
@@ -1,3 +1,18 @@
+2020-12-11  Peng Liu  <[email protected]>
+
+        [Media in GPU Process][MSE] Implement some required functions with new IPC messages and remove some unneeded functions
+        https://bugs.webkit.org/show_bug.cgi?id=219788
+
+        Reviewed by Eric Carlson.
+
+        Change the argument type of sourceBufferPrivateDidReceiveRenderingError() from int to int64_t
+        so that we can pass it in an IPC message.
+
+        * Modules/mediasource/SourceBuffer.cpp:
+        (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveRenderingError):
+        * Modules/mediasource/SourceBuffer.h:
+        * platform/graphics/SourceBufferPrivateClient.h:
+
 2020-12-11  Zalan Bujtas  <[email protected]>
 
         [LFC][IFC] InlineTextItem::isCollapsible might be misleading

Modified: trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp (270707 => 270708)


--- trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp	2020-12-11 21:36:48 UTC (rev 270707)
+++ trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp	2020-12-11 21:47:46 UTC (rev 270708)
@@ -590,7 +590,7 @@
     DEBUG_LOG(LOGIDENTIFIER);
 }
 
-void SourceBuffer::sourceBufferPrivateDidReceiveRenderingError(int error)
+void SourceBuffer::sourceBufferPrivateDidReceiveRenderingError(int64_t error)
 {
 #if RELEASE_LOG_DISABLED
     UNUSED_PARAM(error);

Modified: trunk/Source/WebCore/Modules/mediasource/SourceBuffer.h (270707 => 270708)


--- trunk/Source/WebCore/Modules/mediasource/SourceBuffer.h	2020-12-11 21:36:48 UTC (rev 270707)
+++ trunk/Source/WebCore/Modules/mediasource/SourceBuffer.h	2020-12-11 21:47:46 UTC (rev 270708)
@@ -157,7 +157,7 @@
     void sourceBufferPrivateDidDropSample() final;
     void sourceBufferPrivateBufferedDirtyChanged(bool) final;
     void sourceBufferPrivateBufferedRangesChanged(const PlatformTimeRanges&) final;
-    void sourceBufferPrivateDidReceiveRenderingError(int errorCode) final;
+    void sourceBufferPrivateDidReceiveRenderingError(int64_t errorCode) final;
 
     // AudioTrackClient
     void audioTrackEnabledChanged(AudioTrack&) final;

Modified: trunk/Source/WebCore/platform/graphics/SourceBufferPrivateClient.h (270707 => 270708)


--- trunk/Source/WebCore/platform/graphics/SourceBufferPrivateClient.h	2020-12-11 21:36:48 UTC (rev 270707)
+++ trunk/Source/WebCore/platform/graphics/SourceBufferPrivateClient.h	2020-12-11 21:47:46 UTC (rev 270708)
@@ -80,7 +80,7 @@
     virtual void sourceBufferPrivateBufferedDirtyChanged(bool) = 0;
     virtual void sourceBufferPrivateBufferedRangesChanged(const PlatformTimeRanges&) = 0;
 
-    virtual void sourceBufferPrivateDidReceiveRenderingError(int errorCode) = 0;
+    virtual void sourceBufferPrivateDidReceiveRenderingError(int64_t errorCode) = 0;
 };
 
 } // namespace WebCore

Modified: trunk/Source/WebKit/ChangeLog (270707 => 270708)


--- trunk/Source/WebKit/ChangeLog	2020-12-11 21:36:48 UTC (rev 270707)
+++ trunk/Source/WebKit/ChangeLog	2020-12-11 21:47:46 UTC (rev 270708)
@@ -1,3 +1,33 @@
+2020-12-11  Peng Liu  <[email protected]>
+
+        [Media in GPU Process][MSE] Implement some required functions with new IPC messages and remove some unneeded functions
+        https://bugs.webkit.org/show_bug.cgi?id=219788
+
+        Reviewed by Eric Carlson.
+
+        Implement unimplemented functions and remove unneeded ones.
+        This patch also cleans up `RemoteSourceBufferProxy`.
+
+        * GPUProcess/media/RemoteSourceBufferProxy.cpp:
+        (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateStreamEndedWithDecodeError):
+        (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateAppendError):
+        (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateDidDropSample):
+        (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateDidReceiveRenderingError):
+        * GPUProcess/media/RemoteSourceBufferProxy.h:
+        * WebProcess/GPU/media/SourceBufferPrivateRemote.cpp:
+        (WebKit::SourceBufferPrivateRemote::sourceBufferPrivateStreamEndedWithDecodeError):
+        (WebKit::SourceBufferPrivateRemote::sourceBufferPrivateAppendError):
+        (WebKit::SourceBufferPrivateRemote::sourceBufferPrivateDidDropSample):
+        (WebKit::SourceBufferPrivateRemote::sourceBufferPrivateDidReceiveRenderingError):
+        (WebKit::SourceBufferPrivateRemote::flush): Deleted.
+        (WebKit::SourceBufferPrivateRemote::isReadyForMoreSamples): Deleted.
+        (WebKit::SourceBufferPrivateRemote::notifyClientWhenReadyForMoreSamples): Deleted.
+        (WebKit::SourceBufferPrivateRemote::canSetMinimumUpcomingPresentationTime const): Deleted.
+        (WebKit::SourceBufferPrivateRemote::setMinimumUpcomingPresentationTime): Deleted.
+        (WebKit::SourceBufferPrivateRemote::clearMinimumUpcomingPresentationTime): Deleted.
+        * WebProcess/GPU/media/SourceBufferPrivateRemote.h:
+        * WebProcess/GPU/media/SourceBufferPrivateRemote.messages.in:
+
 2020-12-11  Chris Dumez  <[email protected]>
 
         [GPUProcess] WebAudio rendering quantum is 15 instead of 128 when the GPU Process is enabled

Modified: trunk/Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.cpp (270707 => 270708)


--- trunk/Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.cpp	2020-12-11 21:36:48 UTC (rev 270707)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.cpp	2020-12-11 21:47:46 UTC (rev 270708)
@@ -34,7 +34,6 @@
 #include "RemoteSourceBufferProxyMessages.h"
 #include "SourceBufferPrivateRemoteMessages.h"
 #include <WebCore/MediaDescription.h>
-#include <WebCore/NotImplemented.h>
 #include <WebCore/PlatformTimeRanges.h>
 
 namespace WebKit {
@@ -104,11 +103,16 @@
     m_connectionToWebProcess.connection().sendWithAsyncReply(Messages::SourceBufferPrivateRemote::SourceBufferPrivateDidReceiveInitializationSegment(segmentInfo), WTFMove(completionHandler), m_identifier);
 }
 
-void RemoteSourceBufferProxy::sourceBufferPrivateAppendError(bool)
+void RemoteSourceBufferProxy::sourceBufferPrivateStreamEndedWithDecodeError()
 {
-    notImplemented();
+    m_connectionToWebProcess.connection().send(Messages::SourceBufferPrivateRemote::SourceBufferPrivateStreamEndedWithDecodeError(), m_identifier);
 }
 
+void RemoteSourceBufferProxy::sourceBufferPrivateAppendError(bool decodeError)
+{
+    m_connectionToWebProcess.connection().send(Messages::SourceBufferPrivateRemote::SourceBufferPrivateAppendError(decodeError), m_identifier);
+}
+
 void RemoteSourceBufferProxy::sourceBufferPrivateDurationChanged(const MediaTime& duration)
 {
     m_connectionToWebProcess.connection().send(Messages::SourceBufferPrivateRemote::SourceBufferPrivateDurationChanged(duration), m_identifier);
@@ -121,22 +125,17 @@
 
 void RemoteSourceBufferProxy::sourceBufferPrivateDidDropSample()
 {
-    notImplemented();
+    m_connectionToWebProcess.connection().send(Messages::SourceBufferPrivateRemote::SourceBufferPrivateDidDropSample(), m_identifier);
 }
 
-void RemoteSourceBufferProxy::sourceBufferPrivateStreamEndedWithDecodeError()
-{
-    notImplemented();
-}
-
 void RemoteSourceBufferProxy::sourceBufferPrivateAppendComplete(SourceBufferPrivateClient::AppendResult appendResult)
 {
     m_connectionToWebProcess.connection().send(Messages::SourceBufferPrivateRemote::SourceBufferPrivateAppendComplete(appendResult), m_identifier);
 }
 
-void RemoteSourceBufferProxy::sourceBufferPrivateDidReceiveRenderingError(int errorCode)
+void RemoteSourceBufferProxy::sourceBufferPrivateDidReceiveRenderingError(int64_t errorCode)
 {
-    notImplemented();
+    m_connectionToWebProcess.connection().send(Messages::SourceBufferPrivateRemote::SourceBufferPrivateDidReceiveRenderingError(errorCode), m_identifier);
 }
 
 void RemoteSourceBufferProxy::sourceBufferPrivateBufferedDirtyChanged(bool flag)

Modified: trunk/Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.h (270707 => 270708)


--- trunk/Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.h	2020-12-11 21:36:48 UTC (rev 270707)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.h	2020-12-11 21:47:46 UTC (rev 270708)
@@ -62,6 +62,10 @@
     static Ref<RemoteSourceBufferProxy> create(GPUConnectionToWebProcess&, RemoteSourceBufferIdentifier, Ref<WebCore::SourceBufferPrivate>&&, RemoteMediaPlayerProxy&);
     virtual ~RemoteSourceBufferProxy();
 
+private:
+    RemoteSourceBufferProxy(GPUConnectionToWebProcess&, RemoteSourceBufferIdentifier, Ref<WebCore::SourceBufferPrivate>&&, RemoteMediaPlayerProxy&);
+
+    // SourceBufferPrivateClient
     void sourceBufferPrivateDidReceiveInitializationSegment(InitializationSegment&&, CompletionHandler<void()>&&) final;
     void sourceBufferPrivateStreamEndedWithDecodeError() final;
     void sourceBufferPrivateAppendError(bool decodeError) final;
@@ -72,11 +76,8 @@
     void sourceBufferPrivateBufferedDirtyChanged(bool) final;
     void sourceBufferPrivateBufferedRangesChanged(const WebCore::PlatformTimeRanges&) final;
 
-    void sourceBufferPrivateDidReceiveRenderingError(int errorCode) final;
+    void sourceBufferPrivateDidReceiveRenderingError(int64_t errorCode) final;
 
-private:
-    RemoteSourceBufferProxy(GPUConnectionToWebProcess&, RemoteSourceBufferIdentifier, Ref<WebCore::SourceBufferPrivate>&&, RemoteMediaPlayerProxy&);
-
     // IPC::MessageReceiver
     void didReceiveMessage(IPC::Connection&, IPC::Decoder&) final;
     // void didReceiveSyncMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&) final;

Modified: trunk/Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp (270707 => 270708)


--- trunk/Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp	2020-12-11 21:36:48 UTC (rev 270707)
+++ trunk/Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp	2020-12-11 21:47:46 UTC (rev 270708)
@@ -109,16 +109,6 @@
     m_gpuProcessConnection.connection().send(Messages::RemoteSourceBufferProxy::SetReadyState(state), m_remoteSourceBufferIdentifier);
 }
 
-void SourceBufferPrivateRemote::flush(const AtomString& trackID)
-{
-    notImplemented();
-}
-
-bool SourceBufferPrivateRemote::isReadyForMoreSamples(const AtomString& trackID)
-{
-    return false;
-}
-
 void SourceBufferPrivateRemote::setActive(bool active)
 {
     if (!m_mediaSourcePrivate)
@@ -128,26 +118,6 @@
     m_gpuProcessConnection.connection().send(Messages::RemoteSourceBufferProxy::SetActive(active), m_remoteSourceBufferIdentifier);
 }
 
-void SourceBufferPrivateRemote::notifyClientWhenReadyForMoreSamples(const AtomString& trackID)
-{
-    notImplemented();
-}
-
-bool SourceBufferPrivateRemote::canSetMinimumUpcomingPresentationTime(const AtomString&) const
-{
-    return false;
-}
-
-void SourceBufferPrivateRemote::setMinimumUpcomingPresentationTime(const AtomString&, const MediaTime&)
-{
-    notImplemented();
-}
-
-void SourceBufferPrivateRemote::clearMinimumUpcomingPresentationTime(const AtomString&)
-{
-    notImplemented();
-}
-
 bool SourceBufferPrivateRemote::canSwitchToType(const ContentType&)
 {
     notImplemented();
@@ -223,6 +193,18 @@
     m_client->sourceBufferPrivateDidReceiveInitializationSegment(WTFMove(segment), WTFMove(completionHandler));
 }
 
+void SourceBufferPrivateRemote::sourceBufferPrivateStreamEndedWithDecodeError()
+{
+    if (m_client)
+        m_client->sourceBufferPrivateStreamEndedWithDecodeError();
+}
+
+void SourceBufferPrivateRemote::sourceBufferPrivateAppendError(bool decodeError)
+{
+    if (m_client)
+        m_client->sourceBufferPrivateAppendError(decodeError);
+}
+
 void SourceBufferPrivateRemote::sourceBufferPrivateAppendComplete(SourceBufferPrivateClient::AppendResult appendResult)
 {
     if (m_client)
@@ -241,6 +223,12 @@
         m_client->sourceBufferPrivateDidParseSample(sampleDuration);
 }
 
+void SourceBufferPrivateRemote::sourceBufferPrivateDidDropSample()
+{
+    if (m_client)
+        m_client->sourceBufferPrivateDidDropSample();
+}
+
 void SourceBufferPrivateRemote::sourceBufferPrivateBufferedDirtyChanged(bool dirty)
 {
     if (m_client)
@@ -253,6 +241,12 @@
         m_client->sourceBufferPrivateBufferedRangesChanged(timeRanges);
 }
 
+void SourceBufferPrivateRemote::sourceBufferPrivateDidReceiveRenderingError(int64_t errorCode)
+{
+    if (m_client)
+        m_client->sourceBufferPrivateDidReceiveRenderingError(errorCode);
+}
+
 #if !RELEASE_LOG_DISABLED
 WTFLogChannel& SourceBufferPrivateRemote::logChannel() const
 {

Modified: trunk/Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.h (270707 => 270708)


--- trunk/Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.h	2020-12-11 21:36:48 UTC (rev 270707)
+++ trunk/Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.h	2020-12-11 21:47:46 UTC (rev 270708)
@@ -72,6 +72,7 @@
     SourceBufferPrivateRemote(GPUProcessConnection&, RemoteSourceBufferIdentifier, const MediaSourcePrivateRemote&, const MediaPlayerPrivateRemote&);
 
     // SourceBufferPrivate overrides
+    void setActive(bool) final;
     void append(Vector<unsigned char>&&) final;
     void abort() final;
     void resetParserState() final;
@@ -78,22 +79,16 @@
     void removedFromMediaSource() final;
     WebCore::MediaPlayer::ReadyState readyState() const final;
     void setReadyState(WebCore::MediaPlayer::ReadyState) final;
-    void flush(const AtomString& trackID) final;
-    bool isReadyForMoreSamples(const AtomString& trackID) final;
-    void setActive(bool) final;
-    bool isActive() const final { return m_isActive; }
-    void notifyClientWhenReadyForMoreSamples(const AtomString& trackID) final;
-    bool canSetMinimumUpcomingPresentationTime(const AtomString&) const final;
-    void setMinimumUpcomingPresentationTime(const AtomString&, const MediaTime&) final;
-    void clearMinimumUpcomingPresentationTime(const AtomString&) final;
     bool canSwitchToType(const WebCore::ContentType&) final;
+    void reenqueueMediaIfNeeded(const MediaTime& currentMediaTime, uint64_t pendingAppendDataCapacity, uint64_t maximumBufferSize) final;
+    void addTrackBuffer(const AtomString& trackId, RefPtr<WebCore::MediaDescription>&&) final;
+    void trySignalAllSamplesInTrackEnqueued() final;
     void updateBufferedFromTrackBuffers(bool sourceIsEnded) final;
     void evictCodedFrames(uint64_t newDataSize, uint64_t pendingAppendDataCapacity, uint64_t maximumBufferSize, const MediaTime& currentTime, const MediaTime& duration, bool isEnded) final;
-    void addTrackBuffer(const AtomString& trackId, RefPtr<WebCore::MediaDescription>&&) final;
-    void reenqueueMediaIfNeeded(const MediaTime& currentMediaTime, uint64_t pendingAppendDataCapacity, uint64_t maximumBufferSize) final;
-    void trySignalAllSamplesInTrackEnqueued() final;
     void seekToTime(const MediaTime&) final;
 
+    bool isActive() const final { return m_isActive; }
+
     void didReceiveMessage(IPC::Connection&, IPC::Decoder&) final;
     void sourceBufferPrivateDidReceiveInitializationSegment(InitializationSegmentInfo&&, CompletionHandler<void()>&&);
     void sourceBufferPrivateStreamEndedWithDecodeError();
@@ -102,7 +97,7 @@
     void sourceBufferPrivateDurationChanged(const MediaTime&);
     void sourceBufferPrivateDidParseSample(double sampleDuration);
     void sourceBufferPrivateDidDropSample();
-    void sourceBufferPrivateDidReceiveRenderingError(int errorCode);
+    void sourceBufferPrivateDidReceiveRenderingError(int64_t errorCode);
     void sourceBufferPrivateBufferedDirtyChanged(bool dirty);
     void sourceBufferPrivateBufferedRangesChanged(const WebCore::PlatformTimeRanges&);
 

Modified: trunk/Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.messages.in (270707 => 270708)


--- trunk/Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.messages.in	2020-12-11 21:36:48 UTC (rev 270707)
+++ trunk/Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.messages.in	2020-12-11 21:47:46 UTC (rev 270708)
@@ -27,11 +27,15 @@
 
 messages -> SourceBufferPrivateRemote NotRefCounted {
     SourceBufferPrivateDidReceiveInitializationSegment(struct WebKit::InitializationSegmentInfo segmentConfiguration) -> () Async
+    SourceBufferPrivateStreamEndedWithDecodeError()
+    SourceBufferPrivateAppendError(bool decodeError)
     SourceBufferPrivateAppendComplete(WebCore::SourceBufferPrivateClient::AppendResult appendResult)
     SourceBufferPrivateDurationChanged(MediaTime duration)
     SourceBufferPrivateDidParseSample(double sampleDuration)
+    SourceBufferPrivateDidDropSample()
     SourceBufferPrivateBufferedDirtyChanged(bool dirty)
     SourceBufferPrivateBufferedRangesChanged(WebCore::PlatformTimeRanges timeRanges)
+    SourceBufferPrivateDidReceiveRenderingError(int64_t errorCode)
 }
 
 #endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to