Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b21ca994422189fda3531665277ca37c366f26b9
https://github.com/WebKit/WebKit/commit/b21ca994422189fda3531665277ca37c366f26b9
Author: Jean-Yves Avenard <[email protected]>
Date: 2023-11-08 (Wed, 08 Nov 2023)
Changed paths:
M Source/WebCore/Modules/mediasource/MediaSource.cpp
M Source/WebCore/Modules/mediasource/SourceBuffer.cpp
M Source/WebCore/Modules/mediasource/SourceBuffer.h
M Source/WebCore/platform/graphics/SourceBufferPrivate.cpp
M Source/WebCore/platform/graphics/SourceBufferPrivate.h
M
Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm
M
Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp
M Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp
M Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.cpp
M Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.h
M Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.messages.in
M Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp
M Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.h
Log Message:
-----------
[MSE] MediaSource::isEnded is unnecessarily passed to all methods
https://bugs.webkit.org/show_bug.cgi?id=264146
rdar://problem/117899460
Reviewed by Youenn Fablet.
There were two existing methods used to notify the SourceBufferPrivate
that the MediaSource was ended (through a call to MediaSource::endOfStream()):
- SourceBuffer::readyStateChanged
- SourceBuffer::setMediaSourceEnded
and both were duplicated in SourceBufferPrivate classes, though the
SourceBufferPrivateGStreamer used setMediaSourceEnded, while the others
used readyStateChanged.
They conveyed the same information.
We remove SourceBuffer::readyStateChanged and adopt setMediaSourceEnded
everywhere.
Also, by recalculating the buffered range when SourceBufferPrivate is notified
we can remove the two IPC loops between the GPU process and the content process
simply to update at the end the buffered ranges.
Covered by existing tests, no change in observable behaviour.
* Source/WebCore/Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::streamEndedWithError):
(WebCore::MediaSource::onReadyStateChange): No longer needs to notify the
SourceBuffers.
* Source/WebCore/Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::appendBufferInternal):
(WebCore::SourceBuffer::removeTimerFired):
(WebCore::SourceBuffer::memoryPressure):
(WebCore::SourceBuffer::readyStateChanged): Deleted.
* Source/WebCore/Modules/mediasource/SourceBuffer.h:
* Source/WebCore/platform/graphics/SourceBufferPrivate.cpp:
(WebCore::SourceBufferPrivate::updateBufferedFromTrackBuffers):
(WebCore::SourceBufferPrivate::appendCompleted):
(WebCore::SourceBufferPrivate::processAppendCompletedOperation):
(WebCore::SourceBufferPrivate::clearTrackBuffers):
(WebCore::SourceBufferPrivate::setMediaSourceEnded):
(WebCore::SourceBufferPrivate::removeCodedFrames):
(WebCore::SourceBufferPrivate::evictCodedFrames):
(WebCore::SourceBufferPrivate::memoryPressure):
(WebCore::SourceBufferPrivate::evictFrames):
(WebCore::SourceBufferPrivate::clientReadyStateChanged): Deleted.
* Source/WebCore/platform/graphics/SourceBufferPrivate.h:
(WebCore::SourceBufferPrivate::removeCodedFrames):
(WebCore::SourceBufferPrivate::updateBufferedFromTrackBuffers):
(WebCore::SourceBufferPrivate::appendCompleted):
*
Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::appendCompleted):
*
Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:
(WebCore::SourceBufferPrivateGStreamer::didReceiveAllPendingSamples):
(WebCore::SourceBufferPrivateGStreamer::appendParsingFailed):
* Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp:
(WebCore::MockSourceBufferPrivate::appendInternal):
* Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.cpp:
(WebKit::RemoteSourceBufferProxy::removeCodedFrames):
(WebKit::RemoteSourceBufferProxy::evictCodedFrames):
(WebKit::RemoteSourceBufferProxy::memoryPressure):
(WebKit::RemoteSourceBufferProxy::clientReadyStateChanged): Deleted.
* Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.h:
* Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.messages.in:
* Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp:
(WebKit::SourceBufferPrivateRemote::setMediaSourceEnded):
(WebKit::SourceBufferPrivateRemote::removeCodedFrames):
(WebKit::SourceBufferPrivateRemote::evictCodedFrames):
(WebKit::SourceBufferPrivateRemote::memoryPressure):
(WebKit::SourceBufferPrivateRemote::clientReadyStateChanged): Deleted.
* Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.h:
Canonical link: https://commits.webkit.org/270390@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes