-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MSE] Remove need for SourceBufferPrivate to query MediaSource duration
https://bugs.webkit.org/show_bug.cgi?id=265778 rdar://119114938 Reviewed by Youenn Fablet. We notify each SourceBufferPrivate that the MediaSource duration has changed and use this cache value instead. Covered by existing tests, no change in observable behaviour. * Source/WebCore/Modules/mediasource/MediaSource.cpp: (WebCore::MediaSource::MediaSource): (WebCore::MediaSource::hasFutureTime): (WebCore::MediaSource::setDurationInternal): * Source/WebCore/Modules/mediasource/MediaSource.h: * Source/WebCore/platform/graphics/MediaSourcePrivate.cpp: (WebCore::MediaSourcePrivate::hasFutureTime const): We don't need to pass the duration nor the buffered range as the MediaSourcePrivate owns this information anyway. (WebCore::MediaSourcePrivate::duration const): (WebCore::MediaSourcePrivate::durationChanged): * Source/WebCore/platform/graphics/MediaSourcePrivate.h: * Source/WebCore/platform/graphics/MediaSourcePrivateClient.h: * Source/WebCore/platform/graphics/SourceBufferPrivate.cpp: (WebCore::SourceBufferPrivate::mediaSourceDuration const): Rename duration() to mediaSourceDuration() to remove ambiguity as to which duration this is related to. (WebCore::SourceBufferPrivate::append): (WebCore::SourceBufferPrivate::duration const): Deleted. * Source/WebCore/platform/graphics/SourceBufferPrivate.h: (WebCore::SourceBufferPrivate::setMediaSourceDuration): * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentMediaTimeMayProgress const): * Source/WebCore/platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm: (WebCore::MediaSourcePrivateAVFObjC::durationChanged): * Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp: (WebCore::MediaPlayerPrivateGStreamerMSE::load): (WebCore::MediaPlayerPrivateGStreamerMSE::doSeek): (WebCore::MediaPlayerPrivateGStreamerMSE::buffered const): (WebCore::MediaPlayerPrivateGStreamerMSE::sourceSetup): (WebCore::MediaPlayerPrivateGStreamerMSE::isTimeBuffered const): (WebCore::MediaPlayerPrivateGStreamerMSE::durationChanged): * Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h: remove need to keep reference to MediaSourcePrivateClient, it was an API violation for the MediaPlayerPrivate to talk to the MediaSourcePrivateClient, this interface is reserved for the MediaSourcePrivate to talk to the MediaSource. The MediaPlayerPrivateGStreamerMSE already contains a strong reference to the MediaSourcePrivate so we query it directly instead. (The MediaSourcePrivateClient would have queried its private anyway) (WebCore::MediaPlayerPrivateGStreamerMSE::mediaSourcePrivateClient): Deleted. * Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp: (WebCore::MockMediaPlayerMediaSource::currentMediaTimeMayProgress const): * Source/WebCore/platform/mock/mediasource/MockMediaSourcePrivate.cpp: (WebCore::MockMediaSourcePrivate::durationChanged): * Source/WebKit/GPUProcess/media/RemoteMediaSourceProxy.cpp: (WebKit::RemoteMediaSourceProxy::durationChanged): (WebKit::RemoteMediaSourceProxy::duration const): Deleted. * Source/WebKit/GPUProcess/media/RemoteMediaSourceProxy.h: Canonical link: https://commits.webkit.org/271514@main
- Loading branch information
Showing
16 changed files
with
48 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters