[webkit-changes] [WebKit/WebKit] cb6bd9: [iOS] Prefer video sources with hardware accelerat...
Jean-Yves Avenard
noreply at github.com
Sat Jan 20 22:26:21 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: cb6bd9411341625cedfc80e421782d3e47c08fc3
https://github.com/WebKit/WebKit/commit/cb6bd9411341625cedfc80e421782d3e47c08fc3
Author: Jean-Yves Avenard <jya at apple.com>
Date: 2024-01-20 (Sat, 20 Jan 2024)
Changed paths:
A LayoutTests/media/content/h264-aac-good.mp4
A LayoutTests/media/content/h264-aac-good.png
A LayoutTests/media/content/vp8-opus-bad.png
A LayoutTests/media/content/vp8-opus-bad.webm
A LayoutTests/media/ios/media-sources-selection-expected.html
A LayoutTests/media/ios/media-sources-selection.html
A LayoutTests/media/media-sources-selection-expected.html
A LayoutTests/media/media-sources-selection.html
M LayoutTests/platform/ios/TestExpectations
M LayoutTests/platform/mac-wk1/TestExpectations
M Source/WebCore/platform/graphics/MediaPlayer.cpp
M Source/WebCore/platform/graphics/MediaPlayer.h
M Source/WebCore/platform/graphics/MediaPlayerPrivate.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/cocoa/MediaPlayerPrivateWebM.mm
M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp
M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h
M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.messages.in
M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp
M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h
Log Message:
-----------
[iOS] Prefer video sources with hardware accelerated decoder.
https://bugs.webkit.org/show_bug.cgi?id=267753
rdar://120679553
Reviewed by Youenn Fablet.
The MediaPlayer::shouldCheckHardwareSupport got broken when the GPU process was enabled
and the code to ensure that hardware decoding was required to allow playback became
non-functional.
We correct this problem and make use of it with the WebM player so that if a VP8 or VP9 track
is present without a hardware decoder decoding will fail and we will fallback to the next source
alternative.
Adding tests
* LayoutTests/media/content/h264-aac-good.mp4: Added.
* LayoutTests/media/content/h264-aac-good.png: Added.
* LayoutTests/media/content/vp8-opus-bad.png: Added.
* LayoutTests/media/content/vp8-opus-bad.webm: Added.
* LayoutTests/media/ios/media-sources-selection-expected.html: Added.
* LayoutTests/media/ios/media-sources-selection.html: Added.
* LayoutTests/media/media-sources-selection-expected.html: Added.
* LayoutTests/media/media-sources-selection.html: Added.
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac-wk1/TestExpectations:
* Source/WebCore/platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::loadWithNextMediaEngine):
(WebCore::MediaPlayer::setShouldCheckHardwareSupport):
(WebCore::MediaPlayer::shouldCheckHardwareSupport const): Deleted.
* Source/WebCore/platform/graphics/MediaPlayer.h:
* Source/WebCore/platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::setShouldCheckHardwareSupport):
(WebCore::MediaPlayerPrivateInterface::shouldCheckHardwareSupport const):
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::trackIsPlayable const):
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::shouldCheckHardwareSupport const): Deleted.
* Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm:
(WebCore::MediaPlayerPrivateWebM::didParseInitializationData):
* Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp:
(WebKit::RemoteMediaPlayerProxy::mediaPlayerShouldCheckHardwareSupport const):
(WebKit::RemoteMediaPlayerProxy::setShouldCheckHardwareSupport):
* Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h:
* Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.messages.in:
* Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
(WebKit::MediaPlayerPrivateRemote::setShouldCheckHardwareSupport):
* Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
Canonical link: https://commits.webkit.org/273271@main
More information about the webkit-changes
mailing list