Skip to content

Commit fe9428b

Browse files
committed
[MSE] Move track buffer management from SourceBuffer to SourceBufferPrivate
https://bugs.webkit.org/show_bug.cgi?id=219332 Reviewed by Daniel Bates. Source/WebCore: Currently, the `SourceBuffer` class deals with both the DOM related tasks (providing Javascript interfaces, firing events, handling object properties, etc.) and track buffer management. This patch moves the track buffer management from `SourceBuffer` to `SourceBufferPrivate`. The purpose of this change is to support running the track buffer management in the GPU process so that the callbacks from a media parser regarding a new sample is parsed does not need to cross the process boundary (`SourceBufferPrivate` will run in the GPU process). We have to update the interface `SourceBufferPrivateClient` accordingly. When running the track buffer management in the `SourceBuffer` class, we can get some information related to `MediaSource` directly, such as `isSeeking`, `duration`, and `currentMediaTime`. However, after moving it to `SourceBufferPrivate`, we have to get the information from the corresponding `MediaSourcePrivate`. This patch includes some changes for that. No new tests because this patch does not want to introduce any behavior change. * Modules/mediasource/MediaSource.cpp: (WebCore::MediaSource::seekToTime): (WebCore::MediaSource::completeSeek): * Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::SourceBuffer): (WebCore::SourceBuffer::~SourceBuffer): (WebCore::SourceBuffer::buffered const): (WebCore::SourceBuffer::timestampOffset const): (WebCore::SourceBuffer::setTimestampOffset): (WebCore::SourceBuffer::setAppendWindowStart): (WebCore::SourceBuffer::setAppendWindowEnd): (WebCore::SourceBuffer::resetParserState): (WebCore::SourceBuffer::abort): (WebCore::SourceBuffer::changeType): (WebCore::SourceBuffer::highestPresentationTimestamp const): (WebCore::SourceBuffer::readyStateChanged): (WebCore::SourceBuffer::removedFromMediaSource): (WebCore::SourceBuffer::seekToTime): (WebCore::SourceBuffer::appendBufferInternal): (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): (WebCore::SourceBuffer::removeTimerFired): (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment): (WebCore::SourceBuffer::validateInitializationSegment): (WebCore::SourceBuffer::sourceBufferPrivateAppendError): (WebCore::SourceBuffer::appendError): (WebCore::SourceBuffer::trySignalAllSamplesEnqueued): (WebCore::SourceBuffer::sourceBufferPrivateDidParseSample): (WebCore::SourceBuffer::sourceBufferPrivateDurationChanged): (WebCore::SourceBuffer::sourceBufferPrivateDidDropSample): (WebCore::SourceBuffer::sourceBufferPrivateStreamEndedWithDecodeError): (WebCore::SourceBuffer::extraMemoryCost const): (WebCore::SourceBuffer::bufferedSamplesForTrackID): (WebCore::SourceBuffer::setMode): (WebCore::SourceBuffer::setShouldGenerateTimestamps): (WebCore::SourceBuffer::isBufferedDirty const): (WebCore::SourceBuffer::setBufferedDirty): (): Deleted. (WebCore::SourceBuffer::TrackBuffer::TrackBuffer): Deleted. (WebCore::SourceBuffer::TrackBuffer::enqueueDiscontinuityBoundary): Deleted. (WebCore::SourceBuffer::sourceBufferPrivateFastSeekTimeForMediaTime): Deleted. (WebCore::decodeTimeComparator): Deleted. (WebCore::removeSamplesFromTrackBuffer): Deleted. (WebCore::SourceBuffer::removeCodedFrames): Deleted. (WebCore::SourceBuffer::evictCodedFrames): Deleted. (WebCore::SampleLessThanComparator::operator()): Deleted. (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Deleted. (WebCore::SourceBuffer::sourceBufferPrivateReenqueSamples): Deleted. (WebCore::SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples): Deleted. (WebCore::SourceBuffer::provideMediaData): Deleted. (WebCore::SourceBuffer::updateMinimumUpcomingPresentationTime): Deleted. (WebCore::SourceBuffer::resetMinimumUpcomingPresentationTime): Deleted. (WebCore::SourceBuffer::trySignalAllSamplesInTrackEnqueued): Deleted. (WebCore::SourceBuffer::reenqueueMediaForTime): Deleted. (WebCore::SourceBuffer::didDropSample): Deleted. (WebCore::SourceBuffer::updateBufferedFromTrackBuffers): Deleted. * Modules/mediasource/SourceBuffer.h: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/MediaSourcePrivate.h: (WebCore::MediaSourcePrivate::setIsSeeking): (WebCore::MediaSourcePrivate::isSeeking const): * platform/graphics/SourceBufferPrivate.cpp: Added. (WebCore::SourceBufferPrivate::TrackBuffer::TrackBuffer): (WebCore::enqueueDiscontinuityBoundary): (WebCore::SourceBufferPrivate::SourceBufferPrivate): (WebCore::SourceBufferPrivate::resetTimestampOffsetInTrackBuffers): (WebCore::SourceBufferPrivate::resetTrackBuffers): (WebCore::SourceBufferPrivate::highestPresentationTimestamp const): (WebCore::SourceBufferPrivate::updateBufferedFromTrackBuffers): (WebCore::SourceBufferPrivate::reenqueSamples): (WebCore::SourceBufferPrivate::seekToTime): (WebCore::SourceBufferPrivate::clearTrackBuffers): (WebCore::SourceBufferPrivate::bufferedSamplesForTrackID): (WebCore::SourceBufferPrivate::fastSeekTimeForMediaTime): (WebCore::SourceBufferPrivate::updateMinimumUpcomingPresentationTime): (WebCore::SourceBufferPrivate::trySignalAllSamplesInTrackEnqueued): (WebCore::SourceBufferPrivate::provideMediaData): (WebCore::SourceBufferPrivate::reenqueueMediaForTime): (WebCore::SourceBufferPrivate::reenqueueMediaIfNeeded): (WebCore::decodeTimeComparator): (WebCore::removeSamplesFromTrackBuffer): (WebCore::SourceBufferPrivate::removeCodedFrames): (WebCore::SourceBufferPrivate::evictCodedFrames): (WebCore::SourceBufferPrivate::totalTrackBufferSizeInBytes const): (WebCore::SourceBufferPrivate::addTrackBuffer): (WebCore::SourceBufferPrivate::updateTrackIds): (WebCore::SourceBufferPrivate::setAllTrackBuffersNeedRandomAccess): (WebCore::SourceBufferPrivate::didReceiveInitializationSegment): (WebCore::SourceBufferPrivate::validateInitializationSegment): (WebCore::SourceBufferPrivate::didReceiveSample): * platform/graphics/SourceBufferPrivate.h: (WebCore::SourceBufferPrivate::setActive): (WebCore::SourceBufferPrivate::setClient): (WebCore::SourceBufferPrivate::setIsAttached): (WebCore::SourceBufferPrivate::setCurrentTimeFudgeFactor): (WebCore::SourceBufferPrivate::setAppendWindowStart): (WebCore::SourceBufferPrivate::setAppendWindowEnd): (WebCore::SourceBufferPrivate::bufferFull const): (WebCore::SourceBufferPrivate::buffered const): (WebCore::SourceBufferPrivate::isBufferedDirty const): (WebCore::SourceBufferPrivate::setBufferedDirty): (WebCore::SourceBufferPrivate::timestampOffset const): (WebCore::SourceBufferPrivate::setTimestampOffset): (WebCore::SourceBufferPrivate::startChangingType): (WebCore::SourceBufferPrivate::setShouldGenerateTimestamps): (WebCore::SourceBufferPrivate::setMode): (WebCore::SourceBufferPrivate::setGroupStartTimestamp): (WebCore::SourceBufferPrivate::setGroupStartTimestampToEndTimestamp): (WebCore::SourceBufferPrivate::isActive const): (WebCore::SourceBufferPrivate::isSeeking const): (WebCore::SourceBufferPrivate::currentMediaTime const): (WebCore::SourceBufferPrivate::duration const): (WebCore::SourceBufferPrivate::flush): (WebCore::SourceBufferPrivate::enqueueSample): (WebCore::SourceBufferPrivate::allSamplesInTrackEnqueued): (WebCore::SourceBufferPrivate::isReadyForMoreSamples): (WebCore::SourceBufferPrivate::notifyClientWhenReadyForMoreSamples): (WebCore::SourceBufferPrivate::canSetMinimumUpcomingPresentationTime const): (WebCore::SourceBufferPrivate::setMinimumUpcomingPresentationTime): (WebCore::SourceBufferPrivate::clearMinimumUpcomingPresentationTime): * platform/graphics/SourceBufferPrivateClient.h: * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h: * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm: (WebCore::MediaSourcePrivateAVFObjC::duration const): (WebCore::MediaSourcePrivateAVFObjC::currentMediaTime const): (WebCore::MediaSourcePrivateAVFObjC::duration): Deleted. * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h: * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: (WebCore::SourceBufferPrivateAVFObjC::didParseInitializationData): (WebCore::SourceBufferPrivateAVFObjC::didProvideMediaDataForTrackID): (WebCore::SourceBufferPrivateAVFObjC::removedFromMediaSource): (WebCore::SourceBufferPrivateAVFObjC::setActive): (WebCore::SourceBufferPrivateAVFObjC::isActive const): (WebCore::SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples): (WebCore::SourceBufferPrivateAVFObjC::isSeeking const): (WebCore::SourceBufferPrivateAVFObjC::currentMediaTime const): (WebCore::SourceBufferPrivateAVFObjC::duration const): (WebCore::SourceBufferPrivateAVFObjC::setVideoLayer): (WebCore::SourceBufferPrivateAVFObjC::setDecompressionSession): (WebCore::SourceBufferPrivateAVFObjC::setClient): Deleted. (WebCore::SourceBufferPrivateAVFObjC::fastSeekTimeForMediaTime): Deleted. * platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.cpp: (WebCore::MediaSourcePrivateGStreamer::duration const): (WebCore::MediaSourcePrivateGStreamer::currentMediaTime const): * platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.h: * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp: (WebCore::SourceBufferPrivateGStreamer::append): (WebCore::SourceBufferPrivateGStreamer::removedFromMediaSource): (WebCore::SourceBufferPrivateGStreamer::notifyReadyForMoreSamples): (WebCore::SourceBufferPrivateGStreamer::setActive): (WebCore::SourceBufferPrivateGStreamer::isActive const): (WebCore::SourceBufferPrivateGStreamer::didReceiveInitializationSegment): (WebCore::SourceBufferPrivateGStreamer::didReceiveSample): (WebCore::SourceBufferPrivateGStreamer::didReceiveAllPendingSamples): (WebCore::SourceBufferPrivateGStreamer::appendParsingFailed): (WebCore::SourceBufferPrivateGStreamer::isSeeking const): (WebCore::SourceBufferPrivateGStreamer::currentMediaTime const): (WebCore::SourceBufferPrivateGStreamer::duration const): (WebCore::SourceBufferPrivateGStreamer::setClient): Deleted. * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h: * platform/mock/mediasource/MockMediaPlayerMediaSource.h: * platform/mock/mediasource/MockMediaSourcePrivate.cpp: (WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate): (WebCore::MockMediaSourcePrivate::currentMediaTime const): (WebCore::MockMediaSourcePrivate::logChannel const): (WebCore::MockMediaSourcePrivate::mediaSourceLogger const): Deleted. (WebCore::MockMediaSourcePrivate::mediaSourceLogIdentifier): Deleted. * platform/mock/mediasource/MockMediaSourcePrivate.h: * platform/mock/mediasource/MockSourceBufferPrivate.cpp: (WebCore::MockSourceBufferPrivate::MockSourceBufferPrivate): (WebCore::MockSourceBufferPrivate::didReceiveInitializationSegment): (WebCore::MockSourceBufferPrivate::didReceiveSample): (WebCore::MockSourceBufferPrivate::setActive): (WebCore::MockSourceBufferPrivate::isActive const): (WebCore::MockSourceBufferPrivate::isSeeking const): (WebCore::MockSourceBufferPrivate::currentMediaTime const): (WebCore::MockSourceBufferPrivate::duration const): (WebCore::MockSourceBufferPrivate::logChannel const): (WebCore::MockSourceBufferPrivate::setClient): Deleted. (WebCore::MockSourceBufferPrivate::fastSeekTimeForMediaTime): Deleted. (WebCore::MockSourceBufferPrivate::sourceBufferLogger const): Deleted. (WebCore::MockSourceBufferPrivate::sourceBufferLogIdentifier): Deleted. * platform/mock/mediasource/MockSourceBufferPrivate.h: Source/WebKit: Update `SourceBufferPrivateRemote` and `RemoteSourceBufferProxy` because of the changes on `SourceBufferPrivate` and `SourceBufferPrivateClient`. * GPUProcess/media/RemoteSourceBufferProxy.cpp: (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateAppendError): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateDurationChanged): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateDidParseSample): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateDidDropSample): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateStreamEndedWithDecodeError): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateHasAudio const): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateHasVideo const): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateDidReceiveSample): Deleted. (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateReenqueSamples): Deleted. (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateDidBecomeReadyForMoreSamples): Deleted. (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateFastSeekTimeForMediaTime): Deleted. * GPUProcess/media/RemoteSourceBufferProxy.h: * WebProcess/GPU/media/SourceBufferPrivateRemote.cpp: (WebKit::SourceBufferPrivateRemote::setClient): Deleted. * WebProcess/GPU/media/SourceBufferPrivateRemote.h: Canonical link: https://commits.webkit.org/232118@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270435 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 7a5001a commit fe9428b

28 files changed

Lines changed: 1902 additions & 1355 deletions

Source/WebCore/ChangeLog

Lines changed: 208 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,211 @@
1+
2020-12-04 Peng Liu <peng.liu6@apple.com>
2+
3+
[MSE] Move track buffer management from SourceBuffer to SourceBufferPrivate
4+
https://bugs.webkit.org/show_bug.cgi?id=219332
5+
6+
Reviewed by Daniel Bates.
7+
8+
Currently, the `SourceBuffer` class deals with both the DOM related tasks (providing
9+
Javascript interfaces, firing events, handling object properties, etc.) and track
10+
buffer management. This patch moves the track buffer management from `SourceBuffer`
11+
to `SourceBufferPrivate`. The purpose of this change is to support running the track
12+
buffer management in the GPU process so that the callbacks from a media parser regarding
13+
a new sample is parsed does not need to cross the process boundary (`SourceBufferPrivate`
14+
will run in the GPU process). We have to update the interface `SourceBufferPrivateClient`
15+
accordingly.
16+
17+
When running the track buffer management in the `SourceBuffer` class, we can get
18+
some information related to `MediaSource` directly, such as `isSeeking`, `duration`,
19+
and `currentMediaTime`. However, after moving it to `SourceBufferPrivate`, we have to
20+
get the information from the corresponding `MediaSourcePrivate`. This patch includes
21+
some changes for that.
22+
23+
No new tests because this patch does not want to introduce any behavior change.
24+
25+
* Modules/mediasource/MediaSource.cpp:
26+
(WebCore::MediaSource::seekToTime):
27+
(WebCore::MediaSource::completeSeek):
28+
* Modules/mediasource/SourceBuffer.cpp:
29+
(WebCore::SourceBuffer::SourceBuffer):
30+
(WebCore::SourceBuffer::~SourceBuffer):
31+
(WebCore::SourceBuffer::buffered const):
32+
(WebCore::SourceBuffer::timestampOffset const):
33+
(WebCore::SourceBuffer::setTimestampOffset):
34+
(WebCore::SourceBuffer::setAppendWindowStart):
35+
(WebCore::SourceBuffer::setAppendWindowEnd):
36+
(WebCore::SourceBuffer::resetParserState):
37+
(WebCore::SourceBuffer::abort):
38+
(WebCore::SourceBuffer::changeType):
39+
(WebCore::SourceBuffer::highestPresentationTimestamp const):
40+
(WebCore::SourceBuffer::readyStateChanged):
41+
(WebCore::SourceBuffer::removedFromMediaSource):
42+
(WebCore::SourceBuffer::seekToTime):
43+
(WebCore::SourceBuffer::appendBufferInternal):
44+
(WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
45+
(WebCore::SourceBuffer::removeTimerFired):
46+
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
47+
(WebCore::SourceBuffer::validateInitializationSegment):
48+
(WebCore::SourceBuffer::sourceBufferPrivateAppendError):
49+
(WebCore::SourceBuffer::appendError):
50+
(WebCore::SourceBuffer::trySignalAllSamplesEnqueued):
51+
(WebCore::SourceBuffer::sourceBufferPrivateDidParseSample):
52+
(WebCore::SourceBuffer::sourceBufferPrivateDurationChanged):
53+
(WebCore::SourceBuffer::sourceBufferPrivateDidDropSample):
54+
(WebCore::SourceBuffer::sourceBufferPrivateStreamEndedWithDecodeError):
55+
(WebCore::SourceBuffer::extraMemoryCost const):
56+
(WebCore::SourceBuffer::bufferedSamplesForTrackID):
57+
(WebCore::SourceBuffer::setMode):
58+
(WebCore::SourceBuffer::setShouldGenerateTimestamps):
59+
(WebCore::SourceBuffer::isBufferedDirty const):
60+
(WebCore::SourceBuffer::setBufferedDirty):
61+
(): Deleted.
62+
(WebCore::SourceBuffer::TrackBuffer::TrackBuffer): Deleted.
63+
(WebCore::SourceBuffer::TrackBuffer::enqueueDiscontinuityBoundary): Deleted.
64+
(WebCore::SourceBuffer::sourceBufferPrivateFastSeekTimeForMediaTime): Deleted.
65+
(WebCore::decodeTimeComparator): Deleted.
66+
(WebCore::removeSamplesFromTrackBuffer): Deleted.
67+
(WebCore::SourceBuffer::removeCodedFrames): Deleted.
68+
(WebCore::SourceBuffer::evictCodedFrames): Deleted.
69+
(WebCore::SampleLessThanComparator::operator()): Deleted.
70+
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Deleted.
71+
(WebCore::SourceBuffer::sourceBufferPrivateReenqueSamples): Deleted.
72+
(WebCore::SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples): Deleted.
73+
(WebCore::SourceBuffer::provideMediaData): Deleted.
74+
(WebCore::SourceBuffer::updateMinimumUpcomingPresentationTime): Deleted.
75+
(WebCore::SourceBuffer::resetMinimumUpcomingPresentationTime): Deleted.
76+
(WebCore::SourceBuffer::trySignalAllSamplesInTrackEnqueued): Deleted.
77+
(WebCore::SourceBuffer::reenqueueMediaForTime): Deleted.
78+
(WebCore::SourceBuffer::didDropSample): Deleted.
79+
(WebCore::SourceBuffer::updateBufferedFromTrackBuffers): Deleted.
80+
* Modules/mediasource/SourceBuffer.h:
81+
* Sources.txt:
82+
* WebCore.xcodeproj/project.pbxproj:
83+
* platform/graphics/MediaSourcePrivate.h:
84+
(WebCore::MediaSourcePrivate::setIsSeeking):
85+
(WebCore::MediaSourcePrivate::isSeeking const):
86+
* platform/graphics/SourceBufferPrivate.cpp: Added.
87+
(WebCore::SourceBufferPrivate::TrackBuffer::TrackBuffer):
88+
(WebCore::enqueueDiscontinuityBoundary):
89+
(WebCore::SourceBufferPrivate::SourceBufferPrivate):
90+
(WebCore::SourceBufferPrivate::resetTimestampOffsetInTrackBuffers):
91+
(WebCore::SourceBufferPrivate::resetTrackBuffers):
92+
(WebCore::SourceBufferPrivate::highestPresentationTimestamp const):
93+
(WebCore::SourceBufferPrivate::updateBufferedFromTrackBuffers):
94+
(WebCore::SourceBufferPrivate::reenqueSamples):
95+
(WebCore::SourceBufferPrivate::seekToTime):
96+
(WebCore::SourceBufferPrivate::clearTrackBuffers):
97+
(WebCore::SourceBufferPrivate::bufferedSamplesForTrackID):
98+
(WebCore::SourceBufferPrivate::fastSeekTimeForMediaTime):
99+
(WebCore::SourceBufferPrivate::updateMinimumUpcomingPresentationTime):
100+
(WebCore::SourceBufferPrivate::trySignalAllSamplesInTrackEnqueued):
101+
(WebCore::SourceBufferPrivate::provideMediaData):
102+
(WebCore::SourceBufferPrivate::reenqueueMediaForTime):
103+
(WebCore::SourceBufferPrivate::reenqueueMediaIfNeeded):
104+
(WebCore::decodeTimeComparator):
105+
(WebCore::removeSamplesFromTrackBuffer):
106+
(WebCore::SourceBufferPrivate::removeCodedFrames):
107+
(WebCore::SourceBufferPrivate::evictCodedFrames):
108+
(WebCore::SourceBufferPrivate::totalTrackBufferSizeInBytes const):
109+
(WebCore::SourceBufferPrivate::addTrackBuffer):
110+
(WebCore::SourceBufferPrivate::updateTrackIds):
111+
(WebCore::SourceBufferPrivate::setAllTrackBuffersNeedRandomAccess):
112+
(WebCore::SourceBufferPrivate::didReceiveInitializationSegment):
113+
(WebCore::SourceBufferPrivate::validateInitializationSegment):
114+
(WebCore::SourceBufferPrivate::didReceiveSample):
115+
* platform/graphics/SourceBufferPrivate.h:
116+
(WebCore::SourceBufferPrivate::setActive):
117+
(WebCore::SourceBufferPrivate::setClient):
118+
(WebCore::SourceBufferPrivate::setIsAttached):
119+
(WebCore::SourceBufferPrivate::setCurrentTimeFudgeFactor):
120+
(WebCore::SourceBufferPrivate::setAppendWindowStart):
121+
(WebCore::SourceBufferPrivate::setAppendWindowEnd):
122+
(WebCore::SourceBufferPrivate::bufferFull const):
123+
(WebCore::SourceBufferPrivate::buffered const):
124+
(WebCore::SourceBufferPrivate::isBufferedDirty const):
125+
(WebCore::SourceBufferPrivate::setBufferedDirty):
126+
(WebCore::SourceBufferPrivate::timestampOffset const):
127+
(WebCore::SourceBufferPrivate::setTimestampOffset):
128+
(WebCore::SourceBufferPrivate::startChangingType):
129+
(WebCore::SourceBufferPrivate::setShouldGenerateTimestamps):
130+
(WebCore::SourceBufferPrivate::setMode):
131+
(WebCore::SourceBufferPrivate::setGroupStartTimestamp):
132+
(WebCore::SourceBufferPrivate::setGroupStartTimestampToEndTimestamp):
133+
(WebCore::SourceBufferPrivate::isActive const):
134+
(WebCore::SourceBufferPrivate::isSeeking const):
135+
(WebCore::SourceBufferPrivate::currentMediaTime const):
136+
(WebCore::SourceBufferPrivate::duration const):
137+
(WebCore::SourceBufferPrivate::flush):
138+
(WebCore::SourceBufferPrivate::enqueueSample):
139+
(WebCore::SourceBufferPrivate::allSamplesInTrackEnqueued):
140+
(WebCore::SourceBufferPrivate::isReadyForMoreSamples):
141+
(WebCore::SourceBufferPrivate::notifyClientWhenReadyForMoreSamples):
142+
(WebCore::SourceBufferPrivate::canSetMinimumUpcomingPresentationTime const):
143+
(WebCore::SourceBufferPrivate::setMinimumUpcomingPresentationTime):
144+
(WebCore::SourceBufferPrivate::clearMinimumUpcomingPresentationTime):
145+
* platform/graphics/SourceBufferPrivateClient.h:
146+
* platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
147+
* platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
148+
(WebCore::MediaSourcePrivateAVFObjC::duration const):
149+
(WebCore::MediaSourcePrivateAVFObjC::currentMediaTime const):
150+
(WebCore::MediaSourcePrivateAVFObjC::duration): Deleted.
151+
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
152+
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
153+
(WebCore::SourceBufferPrivateAVFObjC::didParseInitializationData):
154+
(WebCore::SourceBufferPrivateAVFObjC::didProvideMediaDataForTrackID):
155+
(WebCore::SourceBufferPrivateAVFObjC::removedFromMediaSource):
156+
(WebCore::SourceBufferPrivateAVFObjC::setActive):
157+
(WebCore::SourceBufferPrivateAVFObjC::isActive const):
158+
(WebCore::SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples):
159+
(WebCore::SourceBufferPrivateAVFObjC::isSeeking const):
160+
(WebCore::SourceBufferPrivateAVFObjC::currentMediaTime const):
161+
(WebCore::SourceBufferPrivateAVFObjC::duration const):
162+
(WebCore::SourceBufferPrivateAVFObjC::setVideoLayer):
163+
(WebCore::SourceBufferPrivateAVFObjC::setDecompressionSession):
164+
(WebCore::SourceBufferPrivateAVFObjC::setClient): Deleted.
165+
(WebCore::SourceBufferPrivateAVFObjC::fastSeekTimeForMediaTime): Deleted.
166+
* platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.cpp:
167+
(WebCore::MediaSourcePrivateGStreamer::duration const):
168+
(WebCore::MediaSourcePrivateGStreamer::currentMediaTime const):
169+
* platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.h:
170+
* platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:
171+
(WebCore::SourceBufferPrivateGStreamer::append):
172+
(WebCore::SourceBufferPrivateGStreamer::removedFromMediaSource):
173+
(WebCore::SourceBufferPrivateGStreamer::notifyReadyForMoreSamples):
174+
(WebCore::SourceBufferPrivateGStreamer::setActive):
175+
(WebCore::SourceBufferPrivateGStreamer::isActive const):
176+
(WebCore::SourceBufferPrivateGStreamer::didReceiveInitializationSegment):
177+
(WebCore::SourceBufferPrivateGStreamer::didReceiveSample):
178+
(WebCore::SourceBufferPrivateGStreamer::didReceiveAllPendingSamples):
179+
(WebCore::SourceBufferPrivateGStreamer::appendParsingFailed):
180+
(WebCore::SourceBufferPrivateGStreamer::isSeeking const):
181+
(WebCore::SourceBufferPrivateGStreamer::currentMediaTime const):
182+
(WebCore::SourceBufferPrivateGStreamer::duration const):
183+
(WebCore::SourceBufferPrivateGStreamer::setClient): Deleted.
184+
* platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h:
185+
* platform/mock/mediasource/MockMediaPlayerMediaSource.h:
186+
* platform/mock/mediasource/MockMediaSourcePrivate.cpp:
187+
(WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate):
188+
(WebCore::MockMediaSourcePrivate::currentMediaTime const):
189+
(WebCore::MockMediaSourcePrivate::logChannel const):
190+
(WebCore::MockMediaSourcePrivate::mediaSourceLogger const): Deleted.
191+
(WebCore::MockMediaSourcePrivate::mediaSourceLogIdentifier): Deleted.
192+
* platform/mock/mediasource/MockMediaSourcePrivate.h:
193+
* platform/mock/mediasource/MockSourceBufferPrivate.cpp:
194+
(WebCore::MockSourceBufferPrivate::MockSourceBufferPrivate):
195+
(WebCore::MockSourceBufferPrivate::didReceiveInitializationSegment):
196+
(WebCore::MockSourceBufferPrivate::didReceiveSample):
197+
(WebCore::MockSourceBufferPrivate::setActive):
198+
(WebCore::MockSourceBufferPrivate::isActive const):
199+
(WebCore::MockSourceBufferPrivate::isSeeking const):
200+
(WebCore::MockSourceBufferPrivate::currentMediaTime const):
201+
(WebCore::MockSourceBufferPrivate::duration const):
202+
(WebCore::MockSourceBufferPrivate::logChannel const):
203+
(WebCore::MockSourceBufferPrivate::setClient): Deleted.
204+
(WebCore::MockSourceBufferPrivate::fastSeekTimeForMediaTime): Deleted.
205+
(WebCore::MockSourceBufferPrivate::sourceBufferLogger const): Deleted.
206+
(WebCore::MockSourceBufferPrivate::sourceBufferLogIdentifier): Deleted.
207+
* platform/mock/mediasource/MockSourceBufferPrivate.h:
208+
1209
2020-12-04 Zalan Bujtas <zalan@apple.com>
2210

3211
[LFC][IFC] Only shrink the line with the float when it is intrusive

Source/WebCore/Modules/mediasource/MediaSource.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ void MediaSource::seekToTime(const MediaTime& time)
231231
// https://rawgit.com/w3c/media-source/45627646344eea0170dd1cbc5a3d508ca751abb8/media-source-respec.html#mediasource-seeking
232232

233233
m_pendingSeekTime = time;
234+
m_private->setIsSeeking(true);
234235

235236
// Run the following steps as part of the "Wait until the user agent has established whether or not the
236237
// media data for the new playback position is available, and, if it is, until it has decoded enough data
@@ -275,6 +276,7 @@ void MediaSource::completeSeek()
275276
// with the closest random access point before the new playback position.
276277
MediaTime pendingSeekTime = m_pendingSeekTime;
277278
m_pendingSeekTime = MediaTime::invalidTime();
279+
m_private->setIsSeeking(false);
278280
for (auto& sourceBuffer : *m_activeSourceBuffers)
279281
sourceBuffer->seekToTime(pendingSeekTime);
280282

0 commit comments

Comments
 (0)