Add support for parsing FairPlayStreaming PSSH boxes.
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Apr 2019 22:07:56 +0000 (22:07 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Apr 2019 22:07:56 +0000 (22:07 +0000)
commit6148bfdb69a2d20239a73e51fcb2524ae742e7fc
treea69e43e147c72651fb688cff272615d748bb273a
parentca49a5b3a2d1d4ebceeb15900b533e2ed441a7d2
Add support for parsing FairPlayStreaming PSSH boxes.
https://bugs.webkit.org/show_bug.cgi?id=197064

Reviewed by Eric Carlson.

Source/WebCore:

API Tests: ISO.ISOFairPlayStreamingPsshBox

Add a new set of ISOBox classes for parsing the contents of a FairPlayStreaming PSSH box,
and add support for this new box to CDMFairPlayStreaming.

Drive-by fix: add an explicit include for MainThread.h to LibWebRTCProviderCocoa.cpp.

* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/FourCC.h:
* platform/graphics/avfoundation/CDMFairPlayStreaming.cpp:
(WebCore::CDMPrivateFairPlayStreaming::cencName):
(WebCore::fairPlaySystemID):
(WebCore::extractSchemeAndKeyIdFromCenc):
(WebCore::CDMPrivateFairPlayStreaming::extractKeyIDsCenc):
(WebCore::CDMPrivateFairPlayStreaming::sanitizeCenc):
(WebCore::validInitDataTypes):
(WebCore::CDMFactory::platformRegisterFactories):
* platform/graphics/avfoundation/CDMFairPlayStreaming.h:
* platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.cpp: Added.
(WebCore::ISOFairPlayStreamingPsshBox::fairPlaySystemID):
(WebCore::ISOFairPlayStreamingInfoBox::parse):
(WebCore::ISOFairPlayStreamingKeyRequestInfoBox::parse):
(WebCore::ISOFairPlayStreamingKeyAssetIdBox::parse):
(WebCore::ISOFairPlayStreamingKeyContextBox::parse):
(WebCore::ISOFairPlayStreamingKeyVersionListBox::parse):
(WebCore::ISOFairPlayStreamingKeyRequestBox::parse):
(WebCore::ISOFairPlayStreamingInitDataBox::parse):
(WebCore::ISOFairPlayStreamingPsshBox::parse):
* platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h: Added.
* platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:

Source/WTF:

* wtf/Platform.h:

Tools:

* TestWebKitAPI/Tests/WebCore/ISOBox.cpp:
(TestWebKitAPI::TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244439 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/WTF/ChangeLog
Source/WTF/wtf/Platform.h
Source/WebCore/ChangeLog
Source/WebCore/SourcesCocoa.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/platform/graphics/FourCC.h
Source/WebCore/platform/graphics/avfoundation/CDMFairPlayStreaming.cpp
Source/WebCore/platform/graphics/avfoundation/CDMFairPlayStreaming.h
Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h [new file with mode: 0644]
Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebCore/ISOBox.cpp