Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 0a735f7311a8081347fcbefc679791cf325cd37e https://github.com/WebKit/WebKit/commit/0a735f7311a8081347fcbefc679791cf325cd37e Author: Jean-Yves Avenard <j...@apple.com> Date: 2023-11-16 (Thu, 16 Nov 2023)
Changed paths: M LayoutTests/media/media-source/media-webm-opus-partial-abort-expected.txt M LayoutTests/media/media-source/media-webm-opus-partial-abort.html M Source/WTF/wtf/NativePromise.h 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/SourceBufferPrivateClient.h M Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h M Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm M Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp M Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.h M Source/WebCore/testing/Internals.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 M Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.messages.in M Source/WebKit/WebProcess/cocoa/RemoteRealtimeMediaSourceProxy.cpp Log Message: ----------- [MSE] Make SourceBufferPrivate return NativePromise https://bugs.webkit.org/show_bug.cgi?id=264855 rdar://118430680 Reviewed by Jer Noble. Make public SourceBufferPrivate's APIs return NativePromise. We can simplify how SourceBuffer::appendBuffer and SourceBuffer::remove operates. * LayoutTests/media/media-source/media-webm-opus-partial-abort-expected.txt: * LayoutTests/media/media-source/media-webm-opus-partial-abort.html: The test made assumptions about how much appendBuffer had progressed at the time abort() was called. Following this refactoring, only a single event loop could be used to append data as we no longer rely on a timer to ensure asynchronicity. * Source/WTF/wtf/NativePromise.h: Add promise() method so we can take the consumer promise from a producer without the style checker complaining about the name * Source/WebCore/Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::SourceBuffer): (WebCore::SourceBuffer::~SourceBuffer): (WebCore::SourceBuffer::abort): (WebCore::SourceBuffer::rangeRemoval): (WebCore::SourceBuffer::abortIfUpdating): (WebCore::SourceBuffer::removedFromMediaSource): (WebCore::SourceBuffer::appendBufferInternal): (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): (WebCore::SourceBuffer::bufferedSamplesForTrackId): (WebCore::SourceBuffer::enqueuedSamplesForTrackID): (WebCore::SourceBuffer::stop): Deleted. (WebCore::SourceBuffer::appendBufferTimerFired): Deleted. (WebCore::SourceBuffer::removeTimerFired): Deleted. * Source/WebCore/Modules/mediasource/SourceBuffer.h: * Source/WebCore/platform/graphics/SourceBufferPrivate.cpp: (WebCore::SourceBufferPrivate::bufferedSamplesForTrackId): (WebCore::SourceBufferPrivate::enqueuedSamplesForTrackID): (WebCore::SourceBufferPrivate::removeCodedFrames): (WebCore::SourceBufferPrivate::append): * Source/WebCore/platform/graphics/SourceBufferPrivate.h: (WebCore::SourceBufferPrivate::removeCodedFrames): Deleted. * Source/WebCore/platform/graphics/SourceBufferPrivateClient.h: * Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp: (WebCore::MockSourceBufferPrivate::enqueuedSamplesForTrackID): * Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.h: * Source/WebCore/testing/Internals.cpp: (WebCore::Internals::bufferedSamplesForTrackId): (WebCore::Internals::enqueuedSamplesForTrackID): * Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.cpp: (kWebKit::RemoteSourceBufferProxy::append): (WebKit::RemoteSourceBufferProxy::removeCodedFrames): (WebKit::RemoteSourceBufferProxy::bufferedSamplesForTrackId): (WebKit::RemoteSourceBufferProxy::enqueuedSamplesForTrackID): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateAppendComplete): Deleted. * Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.h: * Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.messages.in: * Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp: (WebKit::SourceBufferPrivateRemote::append): (WebKit::SourceBufferPrivateRemote::takeOwnershipOfMemory): (WebKit::SourceBufferPrivateRemote::removeCodedFrames): (WebKit::SourceBufferPrivateRemote::bufferedSamplesForTrackId): (WebKit::SourceBufferPrivateRemote::enqueuedSamplesForTrackID): (WebKit::SourceBufferPrivateRemote::sourceBufferPrivateAppendComplete): Deleted. * Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.h: * Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.messages.in: Add call to change memory ownership Canonical link: https://commits.webkit.org/270865@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes