Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: ac3459ad6236a13dcf9c63728c820c6eb722f56d https://github.com/WebKit/WebKit/commit/ac3459ad6236a13dcf9c63728c820c6eb722f56d Author: Jean-Yves Avenard <j...@apple.com> Date: 2024-01-12 (Fri, 12 Jan 2024)
Changed paths: A LayoutTests/media/content/garbage.webm A LayoutTests/media/media-vp8-webm-error-expected.txt A LayoutTests/media/media-vp8-webm-error.html M LayoutTests/platform/glib/TestExpectations M LayoutTests/platform/mac-wk1/TestExpectations M Source/WebCore/PlatformMac.cmake M Source/WebCore/SourcesCocoa.txt M Source/WebCore/WebCore.xcodeproj/project.pbxproj A Source/WebCore/platform/graphics/avfoundation/WebAVSampleBufferListener.h A Source/WebCore/platform/graphics/avfoundation/WebAVSampleBufferListener.mm M Source/WebCore/platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.cpp M Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h M Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.h M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm M Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm Log Message: ----------- MediaPlayerPrivateWebM doesn't handle decoding errors. https://bugs.webkit.org/show_bug.cgi?id=267165 rdar://120570295 Reviewed by Youenn Fablet. The MediaPlayerPrivateWebM didn't listen for error from either the AVSampleBufferDisplayLayer nor the AVSampleBufferAudioRenderer. We extract the code from the SourceBufferPrivateAVFObjC and create a new WebAVSampleBufferListener class. Add test. * LayoutTests/media/content/garbage.webm: Added. * LayoutTests/media/media-vp8-webm-error-expected.txt: Added. * LayoutTests/media/media-vp8-webm-error.html: Added. * Source/WebCore/PlatformMac.cmake: * Source/WebCore/SourcesCocoa.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/platform/graphics/avfoundation/WebAVSampleBufferListener.h: Added. (WebCore::WebAVSampleBufferListenerClient::layerDidReceiveError): (WebCore::WebAVSampleBufferListenerClient::layerRequiresFlushToResumeDecodingChanged): (WebCore::WebAVSampleBufferListenerClient::layerReadyForDisplayChanged): (WebCore::WebAVSampleBufferListenerClient::rendererDidReceiveError): (WebCore::WebAVSampleBufferListenerClient::rendererWasAutomaticallyFlushed): (WebCore::WebAVSampleBufferListenerClient::outputObscuredDueToInsufficientExternalProtectionChanged): * Source/WebCore/platform/graphics/avfoundation/WebAVSampleBufferListener.mm: Added. (-[WebAVSampleBufferListenerPrivate initWithClient:]): (-[WebAVSampleBufferListenerPrivate invalidate]): (-[WebAVSampleBufferListenerPrivate beginObservingLayer:]): (-[WebAVSampleBufferListenerPrivate stopObservingLayer:]): (-[WebAVSampleBufferListenerPrivate beginObservingRenderer:]): (-[WebAVSampleBufferListenerPrivate stopObservingRenderer:]): (-[WebAVSampleBufferListenerPrivate observeValueForKeyPath:ofObject:change:context:]): (-[WebAVSampleBufferListenerPrivate layerFailedToDecode:]): (-[WebAVSampleBufferListenerPrivate layerRequiresFlushToResumeDecodingChanged:]): (-[WebAVSampleBufferListenerPrivate layerReadyForDisplayChanged:]): (-[WebAVSampleBufferListenerPrivate audioRendererWasAutomaticallyFlushed:]): (WebCore::WebAVSampleBufferListener::WebAVSampleBufferListener): (WebCore::WebAVSampleBufferListener::invalidate): (WebCore::WebAVSampleBufferListener::beginObservingLayer): (WebCore::WebAVSampleBufferListener::stopObservingLayer): (WebCore::WebAVSampleBufferListener::beginObservingRenderer): (WebCore::WebAVSampleBufferListener::stopObservingRenderer): * Source/WebCore/platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.cpp: * Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h: * Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: (WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC): (WebCore::SourceBufferPrivateAVFObjC::destroyRenderers): (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled): (WebCore::SourceBufferPrivateAVFObjC::setVideoLayer): (-[WebAVSampleBufferListener initWithParent:]): Deleted. (-[WebAVSampleBufferListener dealloc]): Deleted. (-[WebAVSampleBufferListener invalidate]): Deleted. (-[WebAVSampleBufferListener beginObservingLayer:]): Deleted. (-[WebAVSampleBufferListener stopObservingLayer:]): Deleted. (-[WebAVSampleBufferListener beginObservingRenderer:]): Deleted. (-[WebAVSampleBufferListener stopObservingRenderer:]): Deleted. (-[WebAVSampleBufferListener observeValueForKeyPath:ofObject:change:context:]): Deleted. (-[WebAVSampleBufferListener layerFailedToDecode:]): Deleted. (-[WebAVSampleBufferListener layerRequiresFlushToResumeDecodingChanged:]): Deleted. (-[WebAVSampleBufferListener layerReadyForDisplayChanged:]): Deleted. (-[WebAVSampleBufferListener audioRendererWasAutomaticallyFlushed:]): Deleted. * Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.h: (WebCore::MediaPlayerPrivateWebM::getWeakPtr const): * Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm: (WebCore::MediaPlayerPrivateWebM::MediaPlayerPrivateWebM): (WebCore::MediaPlayerPrivateWebM::~MediaPlayerPrivateWebM): (WebCore::MediaPlayerPrivateWebM::setDuration): (WebCore::MediaPlayerPrivateWebM::notifyClientWhenReadyForMoreSamples): (WebCore::MediaPlayerPrivateWebM::provideMediaData): (WebCore::MediaPlayerPrivateWebM::trackDidChangeSelected): (WebCore::MediaPlayerPrivateWebM::didParseInitializationData): (WebCore::MediaPlayerPrivateWebM::append): (WebCore::MediaPlayerPrivateWebM::ensureLayer): (WebCore::MediaPlayerPrivateWebM::ensureDecompressionSession): (WebCore::MediaPlayerPrivateWebM::addAudioRenderer): (WebCore::MediaPlayerPrivateWebM::destroyLayer): (WebCore::MediaPlayerPrivateWebM::destroyAudioRenderer): (WebCore::MediaPlayerPrivateWebM::registerNotifyWhenHasAvailableVideoFrame): (WebCore::MediaPlayerPrivateWebM::startVideoFrameMetadataGathering): (WebCore::MediaPlayerPrivateWebM::layerDidReceiveError): (WebCore::MediaPlayerPrivateWebM::rendererDidReceiveError): * Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm: (WebCore::WebCoreDecompressionSession::finishCurrentDecodingAndReportError): should we continue to decode data, a new error won't be produced. Canonical link: https://commits.webkit.org/272969@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes