[webkit-changes] [WebKit/WebKit] fc4da4: MediaPlayer::buffered() & co. should return a Plat...
Jean-Yves Avenard
noreply at github.com
Tue Apr 11 23:19:11 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: fc4da4586f6bbfa2bed7a25a4e8e3f4f6007c596
https://github.com/WebKit/WebKit/commit/fc4da4586f6bbfa2bed7a25a4e8e3f4f6007c596
Author: Jean-Yves Avenard <jya at apple.com>
Date: 2023-04-11 (Tue, 11 Apr 2023)
Changed paths:
M Source/WebCore/Modules/mediasource/ManagedMediaSource.cpp
M Source/WebCore/Modules/mediasource/MediaSource.cpp
M Source/WebCore/Modules/mediasource/MediaSource.h
M Source/WebCore/html/HTMLMediaElement.cpp
M Source/WebCore/html/track/TextTrack.cpp
M Source/WebCore/html/track/TextTrack.h
M Source/WebCore/platform/graphics/MediaPlayer.cpp
M Source/WebCore/platform/graphics/MediaPlayer.h
M Source/WebCore/platform/graphics/MediaPlayerPrivate.cpp
M Source/WebCore/platform/graphics/MediaPlayerPrivate.h
M Source/WebCore/platform/graphics/MediaSourcePrivateClient.h
M Source/WebCore/platform/graphics/PlatformTimeRanges.cpp
M Source/WebCore/platform/graphics/PlatformTimeRanges.h
M Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp
M Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h
M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h
M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h
M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm
M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h
M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm
M Source/WebCore/platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h
M Source/WebCore/platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm
M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.h
M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm
M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h
M Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp
M Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h
M Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.cpp
M Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.h
M Source/WebCore/platform/graphics/holepunch/MediaPlayerPrivateHolePunch.h
M Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp
M Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h
M Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp
M Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.h
M Source/WebCore/platform/mock/mediasource/MockMediaSourcePrivate.cpp
M Source/WebCore/platform/mock/mediasource/MockMediaSourcePrivate.h
M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp
M Source/WebKit/GPUProcess/media/RemoteMediaSourceProxy.cpp
M Source/WebKit/GPUProcess/media/RemoteMediaSourceProxy.h
M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp
M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h
Log Message:
-----------
MediaPlayer::buffered() & co. should return a PlatformTimeRanges
https://bugs.webkit.org/show_bug.cgi?id=255185
rdar://107775841
Reviewed by Youenn Fablet.
We do not need to consistently allocate those on the heap, we can re-use
them, it also removes the need to check for null.
* Source/WebCore/Modules/mediasource/ManagedMediaSource.cpp:
(WebCore::ManagedMediaSource::isBuffered const):
* Source/WebCore/Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::MediaSource):
(WebCore::MediaSource::buffered const):
(WebCore::MediaSource::seekable):
(WebCore::MediaSource::setLiveSeekableRange):
(WebCore::MediaSource::clearLiveSeekableRange):
(WebCore::MediaSource::hasBufferedTime):
(WebCore::MediaSource::monitorSourceBuffers):
(WebCore::MediaSource::updateBufferedIfNeeded):
* Source/WebCore/Modules/mediasource/MediaSource.h:
* Source/WebCore/html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::percentLoaded const):
(WebCore::HTMLMediaElement::buffered const):
(WebCore::HTMLMediaElement::seekable const):
(WebCore::HTMLMediaElement::mediaPlayerBufferedTimeRangesChanged):
* Source/WebCore/html/track/TextTrack.cpp:
(WebCore::TextTrack::removeCuesNotInTimeRanges):
* Source/WebCore/html/track/TextTrack.h:
* Source/WebCore/platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::buffered):
(WebCore::MediaPlayer::seekable):
* Source/WebCore/platform/graphics/MediaPlayer.h:
* Source/WebCore/platform/graphics/MediaPlayerPrivate.cpp:
(WebCore::MediaPlayerPrivateInterface::seekable const):
* Source/WebCore/platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::extraMemoryCost const):
(WebCore::MediaPlayerPrivateInterface::seekable const): Deleted.
* Source/WebCore/platform/graphics/MediaSourcePrivateClient.h:
* Source/WebCore/platform/graphics/PlatformTimeRanges.cpp:
(WebCore::PlatformTimeRanges::PlatformTimeRanges):
(WebCore::PlatformTimeRanges::emptyRanges):
(WebCore::PlatformTimeRanges::start const):
(WebCore::PlatformTimeRanges::end const):
* Source/WebCore/platform/graphics/PlatformTimeRanges.h:
* Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::buffered const):
(WebCore::MediaPlayerPrivateAVFoundation::loadedTimeRangesChanged):
* Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformBufferedTimeRanges const):
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentMediaTimeMayProgress const):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered const):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekable const): Deleted.
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::seekable const):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::buffered const):
* Source/WebCore/platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
* Source/WebCore/platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
(WebCore::MediaSourcePrivateAVFObjC::buffered):
* Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.h:
* Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm:
(WebCore::MediaPlayerPrivateWebM::buffered const):
(WebCore::MediaPlayerPrivateWebM::setBufferedRanges):
(WebCore::MediaPlayerPrivateWebM::seekable const): Deleted.
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::buffered const):
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
* Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
(WebCore::MediaPlayerPrivateGStreamerMSE::buffered const):
(WebCore::MediaPlayerPrivateGStreamerMSE::maxMediaTimeSeekable const):
(WebCore::MediaPlayerPrivateGStreamerMSE::currentMediaTimeMayProgress const):
* Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:
* Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.cpp:
(WebCore::MediaSourcePrivateGStreamer::buffered):
* Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.h:
* Source/WebCore/platform/graphics/holepunch/MediaPlayerPrivateHolePunch.h:
* Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::MediaPlayerPrivateMediaFoundation::currentTime const):
(WebCore::MediaPlayerPrivateMediaFoundation::buffered const):
* Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
* Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
(WebCore::MockMediaPlayerMediaSource::buffered const):
(WebCore::MockMediaPlayerMediaSource::currentMediaTimeMayProgress const):
(WebCore::MockMediaPlayerMediaSource::advanceCurrentTime):
* Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.h:
* Source/WebCore/platform/mock/mediasource/MockMediaSourcePrivate.cpp:
(WebCore::MockMediaSourcePrivate::buffered):
* Source/WebCore/platform/mock/mediasource/MockMediaSourcePrivate.h:
* Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp:
(WebKit::RemoteMediaPlayerProxy::updateCachedState):
* Source/WebKit/GPUProcess/media/RemoteMediaSourceProxy.cpp:
(WebKit::RemoteMediaSourceProxy::buffered const):
* Source/WebKit/GPUProcess/media/RemoteMediaSourceProxy.h:
* Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
(WebKit::MediaPlayerPrivateRemote::buffered const):
(WebKit::MediaPlayerPrivateRemote::updateCachedState):
* Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
Canonical link: https://commits.webkit.org/262863@main
More information about the webkit-changes
mailing list