Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2ef8f77a149ffbe6dcb5026c3988d76c1f1e66d3
https://github.com/WebKit/WebKit/commit/2ef8f77a149ffbe6dcb5026c3988d76c1f1e66d3
Author: Jer Noble <[email protected]>
Date: 2023-04-05 (Wed, 05 Apr 2023)
Changed paths:
A LayoutTests/http/tests/media/fairplay/legacy-eme.js
A LayoutTests/http/tests/media/fairplay/legacy-fairplay-error-expected.txt
A LayoutTests/http/tests/media/fairplay/legacy-fairplay-error.html
A LayoutTests/http/tests/media/fairplay/legacy-fairplay-hls-expected.txt
A LayoutTests/http/tests/media/fairplay/legacy-fairplay-hls.html
A LayoutTests/http/tests/media/fairplay/legacy-fairplay-mse-v2-expected.txt
A LayoutTests/http/tests/media/fairplay/legacy-fairplay-mse-v2.html
A LayoutTests/http/tests/media/fairplay/legacy-fairplay-mse-v3-expected.txt
A LayoutTests/http/tests/media/fairplay/legacy-fairplay-mse-v3.html
M LayoutTests/http/tests/media/fairplay/support.js
M Source/WTF/wtf/PlatformHave.h
M Source/WebCore/Modules/encryptedmedia/legacy/LegacyCDM.cpp
M Source/WebCore/PAL/pal/cocoa/AVFoundationSoftLink.h
M Source/WebCore/PAL/pal/cocoa/AVFoundationSoftLink.mm
M Source/WebCore/SourcesCocoa.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/platform/graphics/LegacyCDMSession.h
M
Source/WebCore/platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm
M
Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.h
M
Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm
R
Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.h
R
Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm
M
Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h
M
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h
M
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm
M
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm
M
Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm
M Source/WebCore/platform/graphics/mac/controls/ImageControlsButtonMac.mm
M Source/WebCore/platform/graphics/mac/controls/MenuListButtonMac.mm
M Tools/TestWebKitAPI/Tests/WebCore/cocoa/AVFoundationSoftLinkTest.mm
Log Message:
-----------
[Cocoa] Transition Legacy Fairplay CDM off AVStreamSession
https://bugs.webkit.org/show_bug.cgi?id=254992
rdar://107202864
Reviewed by Eric Carlson.
Clients of the prefixed WebKit EME APIs using the Fairplay "V2" protocol will
use
a CDM implementation that relies upon AVStreamSession. This implementation will
break when "sampleBufferContentKeySessionSupport" is enabled, as it relies upon
platform changes only available through AVContentKeySession.
Remove the AVStreamSession-based CDM implementation and funnel all support
through
the existing AVContentKeySession-based legacy CDM. At the same time, modify that
AVContentKeySession-based CDM to query the
"sampleBufferContentKeySessionSupport"
setting and opt into the non-legacy AVContentKeySession path when it is enabled.
Drive-by fix: When opting into the non-legacy codepath, the
-contentKeySession:didProvideContentKeyRequest: delegate callbock becomes
asynchronous.
To retain the existing synchronous behavior of the CDM, set an explicit work
queue
for the delegate callbacks, and make the setting and getting of m_keyRequest
thread-safe.
Add a semaphore to be used to detect when the m_keyRequest value changes.
Drive-by fix #2: Fix some unified-build included errors exposed by removing
CDMSessionAVStreamSession.h
Add LayoutTests for basic legacy EME API playback.
* LayoutTests/http/tests/media/fairplay/legacy-eme.js: Added.
(selectKeySystem):
(async startLegacyEME):
(extractContentId):
(concatInitDataIdAndCertificate):
* LayoutTests/http/tests/media/fairplay/legacy-fairplay-error-expected.txt:
Added.
* LayoutTests/http/tests/media/fairplay/legacy-fairplay-error.html: Added.
* LayoutTests/http/tests/media/fairplay/legacy-fairplay-hls-expected.txt: Added.
* LayoutTests/http/tests/media/fairplay/legacy-fairplay-hls.html: Added.
* LayoutTests/http/tests/media/fairplay/legacy-fairplay-mse-v2-expected.txt:
Added.
* LayoutTests/http/tests/media/fairplay/legacy-fairplay-mse-v2.html: Added.
* LayoutTests/http/tests/media/fairplay/legacy-fairplay-mse-v3-expected.txt:
Added.
* LayoutTests/http/tests/media/fairplay/legacy-fairplay-mse-v3.html: Added.
* LayoutTests/http/tests/media/fairplay/support.js:
(uInt16ArrayToString):
(stringToUint16Array):
* Source/WTF/wtf/PlatformHave.h:
* Source/WebCore/Modules/encryptedmedia/legacy/LegacyCDM.cpp:
(WebCore::platformRegisterFactories):
* Source/WebCore/PAL/pal/cocoa/AVFoundationSoftLink.h:
* Source/WebCore/PAL/pal/cocoa/AVFoundationSoftLink.mm:
* Source/WebCore/SourcesCocoa.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/platform/graphics/LegacyCDMSession.h:
* Source/WebCore/platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
(WebCore::queryDecoderAvailability):
(WebCore::CDMPrivateMediaSourceAVFObjC::createSession):
*
Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.h:
*
Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
(-[WebCDMSessionAVContentKeySessionDelegate
contentKeySessionContentProtectionSessionIdentifierDidChange:]):
(WebCore::CDMSessionAVContentKeySession::CDMSessionAVContentKeySession):
(WebCore::CDMSessionAVContentKeySession::update):
(WebCore::CDMSessionAVContentKeySession::hasContentKeyRequest const):
(WebCore::CDMSessionAVContentKeySession::contentKeyRequest):
(WebCore::CDMSessionAVContentKeySession::didProvideContentKeyRequest):
(WebCore::CDMSessionAVContentKeySession::contentKeySession):
*
Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.h:
Removed.
*
Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
Removed.
*
Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
(WebCore::toCDMSessionMediaSourceAVFObjC):
*
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::hasStreamSession): Deleted.
*
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::streamSession): Deleted.
*
Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::didProvideMediaDataForTrackId):
(WebCore::SourceBufferPrivateAVFObjC::willProvideContentKeyRequestInitializationDataForTrackID):
(WebCore::SourceBufferPrivateAVFObjC::destroyStreamDataParser):
(WebCore::copyKeyIDs): Deleted.
* Tools/TestWebKitAPI/Tests/WebCore/cocoa/AVFoundationSoftLinkTest.mm:
(TestWebKitAPI::TEST):
Canonical link: https://commits.webkit.org/262647@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes