Adopt AVStreamDataParser.audiovisualMIMETypes
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 May 2019 22:22:26 +0000 (22:22 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 May 2019 22:22:26 +0000 (22:22 +0000)
https://bugs.webkit.org/show_bug.cgi?id=197581
<rdar://problem/50458981>

Reviewed by Eric Carlson.

Source/WebCore:

Add a new singleton class, AVStreamDataParserMIMETypeCache, and rename AVFoundationMIMETypeCache to the more precise
AVAssetMIMETypeCache.  Update all the old AVFoundationMIMETypeCache with the new name.

* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.h: Renamed from Source/WebCore/platform/graphics/avfoundation/objc/AVFoundationMIMETypeCache.h.
(WebCore::AVAssetMIMETypeCache::setCacheMIMETypesCallback):
* platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.mm: Renamed from Source/WebCore/platform/graphics/avfoundation/objc/AVFoundationMIMETypeCache.mm.
(WebCore::AVAssetMIMETypeCache::singleton):
(WebCore::AVAssetMIMETypeCache::setSupportedTypes):
(WebCore::AVAssetMIMETypeCache::types):
(WebCore::AVAssetMIMETypeCache::supportsContentType):
(WebCore::AVAssetMIMETypeCache::canDecodeType):
(WebCore::AVAssetMIMETypeCache::isAvailable const):
(WebCore::AVAssetMIMETypeCache::loadMIMETypes):
* platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.h: Added.
* platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.mm: Added.
(WebCore::AVStreamDataParserMIMETypeCache::singleton):
(WebCore::AVStreamDataParserMIMETypeCache::types):
(WebCore::AVStreamDataParserMIMETypeCache::supportsContentType):
(WebCore::AVStreamDataParserMIMETypeCache::canDecodeType):
(WebCore::AVStreamDataParserMIMETypeCache::isAvailable const):
(WebCore::AVStreamDataParserMIMETypeCache::loadMIMETypes):
* platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
(WebCore::ImageDecoderAVFObjC::create):
(WebCore::ImageDecoderAVFObjC::supportsMediaType):
(WebCore::ImageDecoderAVFObjC::supportsContentType):
(WebCore::ImageDecoderAVFObjC::canDecodeType):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine):
(WebCore::MediaPlayerPrivateAVFoundationObjC::getSupportedTypes):
(WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
(WebCore::MediaPlayerPrivateAVFoundationObjC::supportsKeySystem):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::getSupportedTypes):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):

Source/WebKit:

* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
(WebKit::WebProcess::platformTerminate):
(WebKit::WebProcess::setMediaMIMETypes):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244980 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 files changed:
Source/WebCore/ChangeLog
Source/WebCore/SourcesCocoa.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.h [moved from Source/WebCore/platform/graphics/avfoundation/objc/AVFoundationMIMETypeCache.h with 91% similarity]
Source/WebCore/platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.mm [moved from Source/WebCore/platform/graphics/avfoundation/objc/AVFoundationMIMETypeCache.mm with 84% similarity]
Source/WebCore/platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.h [new file with mode: 0644]
Source/WebCore/platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.mm [new file with mode: 0644]
Source/WebCore/platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm

index 6f9318a..db6841e 100644 (file)
@@ -1,3 +1,49 @@
+2019-05-06  Jer Noble  <jer.noble@apple.com>
+
+        Adopt AVStreamDataParser.audiovisualMIMETypes
+        https://bugs.webkit.org/show_bug.cgi?id=197581
+        <rdar://problem/50458981>
+
+        Reviewed by Eric Carlson.
+
+        Add a new singleton class, AVStreamDataParserMIMETypeCache, and rename AVFoundationMIMETypeCache to the more precise
+        AVAssetMIMETypeCache.  Update all the old AVFoundationMIMETypeCache with the new name.
+
+        * SourcesCocoa.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.h: Renamed from Source/WebCore/platform/graphics/avfoundation/objc/AVFoundationMIMETypeCache.h.
+        (WebCore::AVAssetMIMETypeCache::setCacheMIMETypesCallback):
+        * platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.mm: Renamed from Source/WebCore/platform/graphics/avfoundation/objc/AVFoundationMIMETypeCache.mm.
+        (WebCore::AVAssetMIMETypeCache::singleton):
+        (WebCore::AVAssetMIMETypeCache::setSupportedTypes):
+        (WebCore::AVAssetMIMETypeCache::types):
+        (WebCore::AVAssetMIMETypeCache::supportsContentType):
+        (WebCore::AVAssetMIMETypeCache::canDecodeType):
+        (WebCore::AVAssetMIMETypeCache::isAvailable const):
+        (WebCore::AVAssetMIMETypeCache::loadMIMETypes):
+        * platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.h: Added.
+        * platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.mm: Added.
+        (WebCore::AVStreamDataParserMIMETypeCache::singleton):
+        (WebCore::AVStreamDataParserMIMETypeCache::types):
+        (WebCore::AVStreamDataParserMIMETypeCache::supportsContentType):
+        (WebCore::AVStreamDataParserMIMETypeCache::canDecodeType):
+        (WebCore::AVStreamDataParserMIMETypeCache::isAvailable const):
+        (WebCore::AVStreamDataParserMIMETypeCache::loadMIMETypes):
+        * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
+        (WebCore::ImageDecoderAVFObjC::create):
+        (WebCore::ImageDecoderAVFObjC::supportsMediaType):
+        (WebCore::ImageDecoderAVFObjC::supportsContentType):
+        (WebCore::ImageDecoderAVFObjC::canDecodeType):
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine):
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::getSupportedTypes):
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsKeySystem):
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
+        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine):
+        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::getSupportedTypes):
+        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):
+
 2019-05-06  Youenn Fablet  <youenn@apple.com>
 
         WebAudio Node JS wrappers should not be collected if events can be fired
index 3e0ec4c..c081198 100644 (file)
@@ -231,8 +231,9 @@ platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp @no-unify
 platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm @no-unify
 platform/graphics/avfoundation/WebMediaSessionManagerMac.cpp @no-unify
 
+platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.mm @no-unify
 platform/graphics/avfoundation/objc/AVAssetTrackUtilities.mm @no-unify
-platform/graphics/avfoundation/objc/AVFoundationMIMETypeCache.mm @no-unify
+platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.mm @no-unify
 platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm @no-unify
 platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.cpp @no-unify
 platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm @no-unify
index 6d9f96e..0dcdc87 100644 (file)
                070E09191875EEFC003A1D3C /* PlatformMediaSession.h in Headers */ = {isa = PBXBuildFile; fileRef = 070E09181875ED93003A1D3C /* PlatformMediaSession.h */; settings = {ATTRIBUTES = (Private, ); }; };
                070E81D11BF27656001FDA48 /* VideoTrackPrivateMediaStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 070E81D01BF27656001FDA48 /* VideoTrackPrivateMediaStream.h */; };
                070F549817F12F6B00169E04 /* MediaStreamConstraintsValidationClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 070F549717F12F6B00169E04 /* MediaStreamConstraintsValidationClient.h */; };
-               0719427F1D088F21002AA51D /* AVFoundationMIMETypeCache.mm in Sources */ = {isa = PBXBuildFile; fileRef = 07C8AD111D073D630087C5CE /* AVFoundationMIMETypeCache.mm */; };
+               0719427F1D088F21002AA51D /* AVAssetMIMETypeCache.mm in Sources */ = {isa = PBXBuildFile; fileRef = 07C8AD111D073D630087C5CE /* AVAssetMIMETypeCache.mm */; };
                071A9EC2168FBC43002629F9 /* TextTrackCueGeneric.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 071A9EC0168FB56C002629F9 /* TextTrackCueGeneric.cpp */; };
                071A9EC3168FBC55002629F9 /* TextTrackCueGeneric.h in Headers */ = {isa = PBXBuildFile; fileRef = 071A9EC1168FB56C002629F9 /* TextTrackCueGeneric.h */; settings = {ATTRIBUTES = (Private, ); }; };
                071E496E1AD5AA0D008A50B4 /* MediaPlaybackTargetMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 071E496D1AD5AA0D008A50B4 /* MediaPlaybackTargetMac.mm */; };
                07EE76EC1BE96DB000F89133 /* MockRealtimeVideoSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 07EE76EA1BE96DB000F89133 /* MockRealtimeVideoSource.h */; settings = {ATTRIBUTES = (Private, ); }; };
                07EE76EF1BEA619800F89133 /* MockRealtimeVideoSourceMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 07EE76ED1BEA619800F89133 /* MockRealtimeVideoSourceMac.h */; };
                07F04A942006B1E300AE2A0A /* ApplicationStateChangeListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 07F04A92200684BC00AE2A0A /* ApplicationStateChangeListener.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               07F4E93320B3587F002E3803 /* AVFoundationMIMETypeCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 07C8AD121D073D630087C5CE /* AVFoundationMIMETypeCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               07F4E93320B3587F002E3803 /* AVAssetMIMETypeCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 07C8AD121D073D630087C5CE /* AVAssetMIMETypeCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
                07F876841AD580F900905849 /* MediaPlaybackTargetContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 07F876831AD4A94500905849 /* MediaPlaybackTargetContext.h */; settings = {ATTRIBUTES = (Private, ); }; };
                07F944161864D046005D31CB /* PlatformMediaSessionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = CDAE8C081746B95700532D78 /* PlatformMediaSessionManager.h */; settings = {ATTRIBUTES = (Private, ); }; };
                07FE99DD18807A7D00256648 /* MediaElementSession.h in Headers */ = {isa = PBXBuildFile; fileRef = 07FE99DB18807A7D00256648 /* MediaElementSession.h */; settings = {ATTRIBUTES = (Private, ); }; };
                CD063F821E23FA8900812BE3 /* InitDataRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD063F801E23FA8900812BE3 /* InitDataRegistry.cpp */; };
                CD063F831E23FA8900812BE3 /* InitDataRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = CD063F811E23FA8900812BE3 /* InitDataRegistry.h */; };
                CD0EEE0E14743F39003EAFA2 /* AudioDestinationIOS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD0EEE0B14743E35003EAFA2 /* AudioDestinationIOS.cpp */; };
+               CD11B3E1227CE6F30023AFC7 /* AVStreamDataParserMIMETypeCache.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD11B3E0227CAAA90023AFC7 /* AVStreamDataParserMIMETypeCache.mm */; };
                CD127DEE14F3098400E84779 /* WebCoreFullScreenWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = CD127DEA14F3097900E84779 /* WebCoreFullScreenWindow.h */; settings = {ATTRIBUTES = (Private, ); }; };
                CD17A45D213740810079EC7B /* UnifiedSource62-mm.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD17A459213740160079EC7B /* UnifiedSource62-mm.mm */; };
                CD19A2681A13E700008D650E /* DiagnosticLoggingClient.h in Headers */ = {isa = PBXBuildFile; fileRef = CD19A2671A13E700008D650E /* DiagnosticLoggingClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
                07C1C0E01BFB600100BD2256 /* MediaTrackSupportedConstraints.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaTrackSupportedConstraints.h; sourceTree = "<group>"; };
                07C1C0E11BFB600100BD2256 /* MediaTrackSupportedConstraints.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaTrackSupportedConstraints.idl; sourceTree = "<group>"; };
                07C1C0E41BFB60ED00BD2256 /* RealtimeMediaSourceSupportedConstraints.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RealtimeMediaSourceSupportedConstraints.h; sourceTree = "<group>"; };
-               07C8AD111D073D630087C5CE /* AVFoundationMIMETypeCache.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AVFoundationMIMETypeCache.mm; sourceTree = "<group>"; };
-               07C8AD121D073D630087C5CE /* AVFoundationMIMETypeCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AVFoundationMIMETypeCache.h; sourceTree = "<group>"; };
+               07C8AD111D073D630087C5CE /* AVAssetMIMETypeCache.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AVAssetMIMETypeCache.mm; sourceTree = "<group>"; };
+               07C8AD121D073D630087C5CE /* AVAssetMIMETypeCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AVAssetMIMETypeCache.h; sourceTree = "<group>"; };
                07CE77D416712A6A00C55A47 /* InbandTextTrackPrivateClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InbandTextTrackPrivateClient.h; sourceTree = "<group>"; };
                07D60924214C5BFB00E7396C /* WindowDisplayCaptureSourceMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WindowDisplayCaptureSourceMac.mm; sourceTree = "<group>"; };
                07D60926214C5BFC00E7396C /* WindowDisplayCaptureSourceMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WindowDisplayCaptureSourceMac.h; sourceTree = "<group>"; };
                CD0C8B582141C8CA0062F59D /* MediaCapabilitiesInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MediaCapabilitiesInfo.h; sourceTree = "<group>"; };
                CD0EEE0A14743E34003EAFA2 /* AudioDestinationIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioDestinationIOS.h; sourceTree = "<group>"; };
                CD0EEE0B14743E35003EAFA2 /* AudioDestinationIOS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AudioDestinationIOS.cpp; sourceTree = "<group>"; };
+               CD11B3DF227CAAA90023AFC7 /* AVStreamDataParserMIMETypeCache.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AVStreamDataParserMIMETypeCache.h; sourceTree = "<group>"; };
+               CD11B3E0227CAAA90023AFC7 /* AVStreamDataParserMIMETypeCache.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = AVStreamDataParserMIMETypeCache.mm; sourceTree = "<group>"; };
                CD127DEA14F3097900E84779 /* WebCoreFullScreenWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreFullScreenWindow.h; sourceTree = "<group>"; };
                CD127DEB14F3097900E84779 /* WebCoreFullScreenWindow.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreFullScreenWindow.mm; sourceTree = "<group>"; };
                CD17A459213740160079EC7B /* UnifiedSource62-mm.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = "UnifiedSource62-mm.mm"; path = "DerivedSources/WebCore/unified-sources/UnifiedSource62-mm.mm"; sourceTree = BUILT_PRODUCTS_DIR; };
                                CD54A761180F9F7000B076C9 /* AudioTrackPrivateMediaSourceAVFObjC.h */,
                                CDECA8991EDF447D00DCB08B /* AVAssetTrackUtilities.h */,
                                CDECA8981EDF447D00DCB08B /* AVAssetTrackUtilities.mm */,
-                               07C8AD121D073D630087C5CE /* AVFoundationMIMETypeCache.h */,
-                               07C8AD111D073D630087C5CE /* AVFoundationMIMETypeCache.mm */,
+                               07C8AD121D073D630087C5CE /* AVAssetMIMETypeCache.h */,
+                               07C8AD111D073D630087C5CE /* AVAssetMIMETypeCache.mm */,
+                               CD11B3DF227CAAA90023AFC7 /* AVStreamDataParserMIMETypeCache.h */,
+                               CD11B3E0227CAAA90023AFC7 /* AVStreamDataParserMIMETypeCache.mm */,
                                CD78A2EE1F75648600DE371B /* CDMInstanceFairPlayStreamingAVFObjC.h */,
                                CD78A2EC1F75648600DE371B /* CDMInstanceFairPlayStreamingAVFObjC.mm */,
                                CDE595941BF166D100A1CBE8 /* CDMSessionAVContentKeySession.h */,
                                CDC675271EAEA9D400727C84 /* AVAudioSessionCaptureDevice.h in Headers */,
                                CDC675231EAEA9B700727C84 /* AVAudioSessionCaptureDeviceManager.h in Headers */,
                                070363E2181A1CDC00C074A5 /* AVCaptureDeviceManager.h in Headers */,
-                               07F4E93320B3587F002E3803 /* AVFoundationMIMETypeCache.h in Headers */,
+                               07F4E93320B3587F002E3803 /* AVAssetMIMETypeCache.h in Headers */,
                                CD336F6217F9F64700DDDCD0 /* AVTrackPrivateAVFObjCImpl.h in Headers */,
                                070363E6181A1CDC00C074A5 /* AVVideoCaptureSource.h in Headers */,
                                29AE212D21AB9EEB00869283 /* AXIsolatedTree.h in Headers */,
                                CDECA89A1EDF447D00DCB08B /* AVAssetTrackUtilities.mm in Sources */,
                                CDC675221EAEA9B700727C84 /* AVAudioSessionCaptureDeviceManager.mm in Sources */,
                                070363E3181A1CDC00C074A5 /* AVCaptureDeviceManager.mm in Sources */,
-                               0719427F1D088F21002AA51D /* AVFoundationMIMETypeCache.mm in Sources */,
+                               0719427F1D088F21002AA51D /* AVAssetMIMETypeCache.mm in Sources */,
                                CD336F6117F9F64700DDDCD0 /* AVTrackPrivateAVFObjCImpl.mm in Sources */,
                                070363E7181A1CDC00C074A5 /* AVVideoCaptureSource.mm in Sources */,
                                7A45032F18DB717200377B34 /* BufferedLineReader.cpp in Sources */,
                                DECA80391F9FED6A00E3B661 /* UnifiedSource248.cpp in Sources */,
                                DECA803A1F9FED6A00E3B661 /* UnifiedSource249.cpp in Sources */,
                                DECA803B1F9FED6A00E3B661 /* UnifiedSource250.cpp in Sources */,
+                               CD11B3E1227CE6F30023AFC7 /* AVStreamDataParserMIMETypeCache.mm in Sources */,
                                DECA803C1F9FED6A00E3B661 /* UnifiedSource251.cpp in Sources */,
                                DECA803D1F9FED6A00E3B661 /* UnifiedSource252.cpp in Sources */,
                                DECA803E1F9FED6A00E3B661 /* UnifiedSource253.cpp in Sources */,
@@ -35,9 +35,9 @@ namespace WebCore {
 
 class ContentType;
 
-class AVFoundationMIMETypeCache {
+class AVAssetMIMETypeCache {
 public:
-    WEBCORE_EXPORT static AVFoundationMIMETypeCache& singleton();
+    WEBCORE_EXPORT static AVAssetMIMETypeCache& singleton();
 
     bool supportsContentType(const ContentType&);
     bool canDecodeType(const String&);
@@ -52,8 +52,8 @@ public:
     WEBCORE_EXPORT void setSupportedTypes(const Vector<String>&);
 
 private:
-    friend NeverDestroyed<AVFoundationMIMETypeCache>;
-    AVFoundationMIMETypeCache() = default;
+    friend NeverDestroyed<AVAssetMIMETypeCache>;
+    AVAssetMIMETypeCache() = default;
 
     void loadMIMETypes();
 
  */
 
 #import "config.h"
-#import "AVFoundationMIMETypeCache.h"
+#import "AVAssetMIMETypeCache.h"
 
 #if PLATFORM(COCOA)
 
 #import "ContentType.h"
-#import <wtf/HashSet.h>
-
 #import <pal/cf/CoreMediaSoftLink.h>
 #import <pal/cocoa/AVFoundationSoftLink.h>
+#import <wtf/HashSet.h>
 
 #if !PLATFORM(IOSMAC)
 SOFT_LINK_FRAMEWORK_OPTIONAL_PREFLIGHT(AVFoundation)
@@ -40,13 +39,13 @@ SOFT_LINK_FRAMEWORK_OPTIONAL_PREFLIGHT(AVFoundation)
 
 namespace WebCore {
 
-AVFoundationMIMETypeCache& AVFoundationMIMETypeCache::singleton()
+AVAssetMIMETypeCache& AVAssetMIMETypeCache::singleton()
 {
-    static NeverDestroyed<AVFoundationMIMETypeCache> cache;
+    static NeverDestroyed<AVAssetMIMETypeCache> cache;
     return cache.get();
 }
 
-void AVFoundationMIMETypeCache::setSupportedTypes(const Vector<String>& types)
+void AVAssetMIMETypeCache::setSupportedTypes(const Vector<String>& types)
 {
     if (m_cache)
         return;
@@ -56,7 +55,7 @@ void AVFoundationMIMETypeCache::setSupportedTypes(const Vector<String>& types)
         m_cache->add(type);
 }
 
-const HashSet<String, ASCIICaseInsensitiveHash>& AVFoundationMIMETypeCache::types()
+const HashSet<String, ASCIICaseInsensitiveHash>& AVAssetMIMETypeCache::types()
 {
     if (!m_cache)
         loadMIMETypes();
@@ -64,7 +63,7 @@ const HashSet<String, ASCIICaseInsensitiveHash>& AVFoundationMIMETypeCache::type
     return *m_cache;
 }
 
-bool AVFoundationMIMETypeCache::supportsContentType(const ContentType& contentType)
+bool AVAssetMIMETypeCache::supportsContentType(const ContentType& contentType)
 {
     if (contentType.isEmpty())
         return false;
@@ -72,7 +71,7 @@ bool AVFoundationMIMETypeCache::supportsContentType(const ContentType& contentTy
     return types().contains(contentType.containerType());
 }
 
-bool AVFoundationMIMETypeCache::canDecodeType(const String& mimeType)
+bool AVAssetMIMETypeCache::canDecodeType(const String& mimeType)
 {
     if (mimeType.isEmpty())
         return false;
@@ -87,7 +86,7 @@ bool AVFoundationMIMETypeCache::canDecodeType(const String& mimeType)
     return false;
 }
 
-bool AVFoundationMIMETypeCache::isAvailable() const
+bool AVAssetMIMETypeCache::isAvailable() const
 {
 #if ENABLE(VIDEO) && USE(AVFOUNDATION)
 #if PLATFORM(IOSMAC)
@@ -102,7 +101,7 @@ bool AVFoundationMIMETypeCache::isAvailable() const
 #endif
 }
 
-void AVFoundationMIMETypeCache::loadMIMETypes()
+void AVAssetMIMETypeCache::loadMIMETypes()
 {
     m_cache = HashSet<String, ASCIICaseInsensitiveHash>();
 
diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.h b/Source/WebCore/platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.h
new file mode 100644 (file)
index 0000000..0abcc3d
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2019 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if PLATFORM(COCOA)
+
+#include <wtf/Forward.h>
+#include <wtf/HashSet.h>
+#include <wtf/text/StringHash.h>
+
+namespace WebCore {
+
+class ContentType;
+
+class AVStreamDataParserMIMETypeCache {
+public:
+    WEBCORE_EXPORT static AVStreamDataParserMIMETypeCache& singleton();
+
+    bool supportsContentType(const ContentType&);
+    bool canDecodeType(const String&);
+
+    const HashSet<String, ASCIICaseInsensitiveHash>& types();
+    bool isEmpty();
+    bool isAvailable() const;
+
+private:
+    friend NeverDestroyed<AVStreamDataParserMIMETypeCache>;
+    AVStreamDataParserMIMETypeCache() = default;
+
+    void loadMIMETypes();
+
+    Optional<HashSet<String, ASCIICaseInsensitiveHash>> m_cache;
+};
+
+}
+
+#endif
diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.mm b/Source/WebCore/platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.mm
new file mode 100644 (file)
index 0000000..b91de4d
--- /dev/null
@@ -0,0 +1,126 @@
+/*
+ * Copyright (C) 2019 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "config.h"
+#import "AVStreamDataParserMIMETypeCache.h"
+
+#if PLATFORM(COCOA)
+
+#import "AVAssetMIMETypeCache.h"
+#import "ContentType.h"
+#import <pal/cf/CoreMediaSoftLink.h>
+#import <pal/cocoa/AVFoundationSoftLink.h>
+#import <wtf/HashSet.h>
+
+#if !PLATFORM(IOSMAC)
+SOFT_LINK_FRAMEWORK_OPTIONAL_PREFLIGHT(AVFoundation)
+#endif
+
+namespace WebCore {
+
+AVStreamDataParserMIMETypeCache& AVStreamDataParserMIMETypeCache::singleton()
+{
+    static NeverDestroyed<AVStreamDataParserMIMETypeCache> cache;
+    return cache.get();
+}
+
+const HashSet<String, ASCIICaseInsensitiveHash>& AVStreamDataParserMIMETypeCache::types()
+{
+    if (!m_cache)
+        loadMIMETypes();
+
+    return *m_cache;
+}
+
+bool AVStreamDataParserMIMETypeCache::supportsContentType(const ContentType& contentType)
+{
+    if (contentType.isEmpty())
+        return false;
+
+    return types().contains(contentType.containerType());
+}
+
+bool AVStreamDataParserMIMETypeCache::canDecodeType(const String& mimeType)
+{
+    if (mimeType.isEmpty())
+        return false;
+
+    ContentType type { mimeType };
+
+    if (!isAvailable() || !types().contains(type.containerType()))
+        return false;
+
+#if ENABLE(VIDEO) && USE(AVFOUNDATION)
+    // FIXME(rdar://50502771) AVStreamDataParser does not have an -isPlayableExtendedMIMEType: method, so just replace
+    // the container type with a valid one from AVAssetMIMETypeCache and ask that cache if it can decode this type:
+    auto& assetCache = AVAssetMIMETypeCache::singleton();
+    if (!assetCache.isAvailable() || assetCache.types().isEmpty())
+        return false;
+    String replacementType { mimeType };
+    replacementType.replace(type.containerType(), *assetCache.types().begin());
+    return assetCache.canDecodeType(replacementType);
+#endif
+
+    return false;
+}
+
+bool AVStreamDataParserMIMETypeCache::isAvailable() const
+{
+#if ENABLE(VIDEO) && USE(AVFOUNDATION)
+#if PLATFORM(IOSMAC)
+    // FIXME: This should be using AVFoundationLibraryIsAvailable() instead, but doing so causes soft-linking
+    // to subsequently fail on certain symbols. See <rdar://problem/42224780> for more details.
+    if (!PAL::AVFoundationLibrary())
+        return false;
+#else
+    if (!AVFoundationLibraryIsAvailable())
+        return false;
+#endif
+
+    return [PAL::getAVStreamDataParserClass() respondsToSelector:@selector(audiovisualMIMETypes)];
+#else
+    return false;
+#endif
+}
+
+void AVStreamDataParserMIMETypeCache::loadMIMETypes()
+{
+    m_cache = HashSet<String, ASCIICaseInsensitiveHash>();
+
+#if ENABLE(VIDEO) && USE(AVFOUNDATION)
+    static std::once_flag onceFlag;
+    std::call_once(onceFlag, [this] {
+        if (!isAvailable())
+            return;
+
+        for (NSString* type in [PAL::getAVStreamDataParserClass() audiovisualMIMETypes])
+            m_cache->add(type);
+    });
+#endif
+}
+
+}
+
+#endif
index d3f547f..5fbf505 100644 (file)
@@ -28,7 +28,7 @@
 
 #if HAVE(AVASSETREADER)
 
-#import "AVFoundationMIMETypeCache.h"
+#import "AVAssetMIMETypeCache.h"
 #import "AffineTransform.h"
 #import "ContentType.h"
 #import "FloatQuad.h"
@@ -337,7 +337,7 @@ ImageDecoderAVFObjCSample* toSample(Iterator iter)
 RefPtr<ImageDecoderAVFObjC> ImageDecoderAVFObjC::create(SharedBuffer& data, const String& mimeType, AlphaOption alphaOption, GammaAndColorProfileOption gammaAndColorProfileOption)
 {
     // AVFoundation may not be available at runtime.
-    if (!AVFoundationMIMETypeCache::singleton().isAvailable())
+    if (!AVAssetMIMETypeCache::singleton().isAvailable())
         return nullptr;
 
     if (!canLoad_VideoToolbox_VTCreateCGImageFromCVPixelBuffer())
@@ -368,17 +368,17 @@ ImageDecoderAVFObjC::~ImageDecoderAVFObjC() = default;
 
 bool ImageDecoderAVFObjC::supportsMediaType(MediaType type)
 {
-    return type == MediaType::Video && AVFoundationMIMETypeCache::singleton().isAvailable();
+    return type == MediaType::Video && AVAssetMIMETypeCache::singleton().isAvailable();
 }
 
 bool ImageDecoderAVFObjC::supportsContentType(const ContentType& type)
 {
-    return AVFoundationMIMETypeCache::singleton().supportsContentType(type);
+    return AVAssetMIMETypeCache::singleton().supportsContentType(type);
 }
 
 bool ImageDecoderAVFObjC::canDecodeType(const String& mimeType)
 {
-    return AVFoundationMIMETypeCache::singleton().canDecodeType(mimeType);
+    return AVAssetMIMETypeCache::singleton().canDecodeType(mimeType);
 }
 
 AVAssetTrack *ImageDecoderAVFObjC::firstEnabledTrack()
index a9d7ebe..e7ebcc4 100644 (file)
@@ -28,8 +28,8 @@
 
 #if ENABLE(VIDEO) && USE(AVFOUNDATION)
 
+#import "AVAssetMIMETypeCache.h"
 #import "AVAssetTrackUtilities.h"
-#import "AVFoundationMIMETypeCache.h"
 #import "AVTrackPrivateAVFObjCImpl.h"
 #import "AudioSourceProviderAVFObjC.h"
 #import "AudioTrackPrivateAVFObjC.h"
@@ -240,7 +240,7 @@ void MediaPlayerPrivateAVFoundationObjC::registerMediaEngine(MediaEngineRegistra
 
     registrar([](MediaPlayer* player) { return std::make_unique<MediaPlayerPrivateAVFoundationObjC>(player); },
             getSupportedTypes, supportsType, originsInMediaCache, clearMediaCache, clearMediaCacheForOrigins, supportsKeySystem);
-    ASSERT(AVFoundationMIMETypeCache::singleton().isAvailable());
+    ASSERT(AVAssetMIMETypeCache::singleton().isAvailable());
 }
 
 static AVAssetCache *assetCacheForPath(const String& path)
@@ -1511,8 +1511,8 @@ RetainPtr<CGImageRef> MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRe
 
 void MediaPlayerPrivateAVFoundationObjC::getSupportedTypes(HashSet<String, ASCIICaseInsensitiveHash>& supportedTypes)
 {
-    supportedTypes = AVFoundationMIMETypeCache::singleton().types();
-} 
+    supportedTypes = AVAssetMIMETypeCache::singleton().types();
+}
 
 #if ENABLE(LEGACY_ENCRYPTED_MEDIA)
 static bool keySystemIsSupported(const String& keySystem)
@@ -1538,7 +1538,7 @@ MediaPlayer::SupportsType MediaPlayerPrivateAVFoundationObjC::supportsType(const
     if (isUnsupportedMIMEType(containerType))
         return MediaPlayer::IsNotSupported;
 
-    if (!staticMIMETypeList().contains(containerType) && !AVFoundationMIMETypeCache::singleton().canDecodeType(containerType))
+    if (!staticMIMETypeList().contains(containerType) && !AVAssetMIMETypeCache::singleton().canDecodeType(containerType))
         return MediaPlayer::IsNotSupported;
 
     // The spec says:
@@ -1567,7 +1567,7 @@ bool MediaPlayerPrivateAVFoundationObjC::supportsKeySystem(const String& keySyst
         if (!mimeType.isEmpty() && isUnsupportedMIMEType(mimeType))
             return false;
 
-        if (!mimeType.isEmpty() && !staticMIMETypeList().contains(mimeType) && !AVFoundationMIMETypeCache::singleton().canDecodeType(mimeType))
+        if (!mimeType.isEmpty() && !staticMIMETypeList().contains(mimeType) && !AVAssetMIMETypeCache::singleton().canDecodeType(mimeType))
             return false;
 
         return true;
index 331659d..2513b4b 100644 (file)
@@ -28,8 +28,9 @@
 
 #if ENABLE(MEDIA_SOURCE) && USE(AVFOUNDATION)
 
+#import "AVAssetMIMETypeCache.h"
 #import "AVAssetTrackUtilities.h"
-#import "AVFoundationMIMETypeCache.h"
+#import "AVStreamDataParserMIMETypeCache.h"
 #import "CDMSessionAVStreamSession.h"
 #import "GraphicsContextCG.h"
 #import "Logging.h"
@@ -174,7 +175,7 @@ void MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine(MediaEngineRegist
 
     registrar([](MediaPlayer* player) { return std::make_unique<MediaPlayerPrivateMediaSourceAVFObjC>(player); },
         getSupportedTypes, supportsType, 0, 0, 0, 0);
-    ASSERT(AVFoundationMIMETypeCache::singleton().isAvailable());
+    ASSERT(AVAssetMIMETypeCache::singleton().isAvailable());
 }
 
 bool MediaPlayerPrivateMediaSourceAVFObjC::isAvailable()
@@ -189,7 +190,15 @@ bool MediaPlayerPrivateMediaSourceAVFObjC::isAvailable()
 
 void MediaPlayerPrivateMediaSourceAVFObjC::getSupportedTypes(HashSet<String, ASCIICaseInsensitiveHash>& types)
 {
-    types = AVFoundationMIMETypeCache::singleton().types();
+    auto& streamDataParserCache = AVStreamDataParserMIMETypeCache::singleton();
+    if (streamDataParserCache.isAvailable()) {
+        types = streamDataParserCache.types();
+        return;
+    }
+
+    auto& assetCache = AVAssetMIMETypeCache::singleton();
+    if (assetCache.isAvailable())
+        types = assetCache.types();
 }
 
 MediaPlayer::SupportsType MediaPlayerPrivateMediaSourceAVFObjC::supportsType(const MediaEngineSupportParameters& parameters)
@@ -202,7 +211,16 @@ MediaPlayer::SupportsType MediaPlayerPrivateMediaSourceAVFObjC::supportsType(con
         return MediaPlayer::IsNotSupported;
 #endif
 
-    if (parameters.type.isEmpty() || !AVFoundationMIMETypeCache::singleton().canDecodeType(parameters.type.containerType()))
+    if (parameters.type.isEmpty())
+        return MediaPlayer::IsNotSupported;
+
+    if (AVStreamDataParserMIMETypeCache::singleton().isAvailable()) {
+        if (!AVStreamDataParserMIMETypeCache::singleton().supportsContentType(parameters.type))
+            return MediaPlayer::IsNotSupported;
+    } else if (AVAssetMIMETypeCache::singleton().isAvailable()) {
+        if (!AVAssetMIMETypeCache::singleton().supportsContentType(parameters.type))
+            return MediaPlayer::IsNotSupported;
+    } else
         return MediaPlayer::IsNotSupported;
 
     // The spec says:
@@ -211,15 +229,17 @@ MediaPlayer::SupportsType MediaPlayerPrivateMediaSourceAVFObjC::supportsType(con
     if (codecs.isEmpty())
         return MediaPlayer::MayBeSupported;
 
-    NSString *outputCodecs = codecs;
+    String outputCodecs = codecs;
     if ([PAL::getAVStreamDataParserClass() respondsToSelector:@selector(outputMIMECodecParameterForInputMIMECodecParameter:)])
         outputCodecs = [PAL::getAVStreamDataParserClass() outputMIMECodecParameterForInputMIMECodecParameter:outputCodecs];
 
     if (!contentTypeMeetsHardwareDecodeRequirements(parameters.type, parameters.contentTypesRequiringHardwareSupport))
         return MediaPlayer::IsNotSupported;
 
-    NSString *typeString = [NSString stringWithFormat:@"%@; codecs=\"%@\"", (NSString *)parameters.type.containerType(), (NSString *)outputCodecs];
-    return [PAL::getAVURLAssetClass() isPlayableExtendedMIMEType:typeString] ? MediaPlayer::IsSupported : MediaPlayer::MayBeSupported;;
+    String type = makeString(parameters.type.containerType(), "; codecs=\"", outputCodecs, "\"");
+    if (AVStreamDataParserMIMETypeCache::singleton().isAvailable())
+        return AVStreamDataParserMIMETypeCache::singleton().canDecodeType(type) ? MediaPlayer::IsSupported : MediaPlayer::MayBeSupported;
+    return AVAssetMIMETypeCache::singleton().canDecodeType(type) ? MediaPlayer::IsSupported : MediaPlayer::MayBeSupported;
 }
 
 #pragma mark -
index 59e7ac9..a4000e7 100644 (file)
@@ -1,3 +1,16 @@
+2019-05-06  Jer Noble  <jer.noble@apple.com>
+
+        Adopt AVStreamDataParser.audiovisualMIMETypes
+        https://bugs.webkit.org/show_bug.cgi?id=197581
+        <rdar://problem/50458981>
+
+        Reviewed by Eric Carlson.
+
+        * WebProcess/cocoa/WebProcessCocoa.mm:
+        (WebKit::WebProcess::platformInitializeWebProcess):
+        (WebKit::WebProcess::platformTerminate):
+        (WebKit::WebProcess::setMediaMIMETypes):
+
 2019-05-06  Chris Dumez  <cdumez@apple.com>
 
         Terminate service workers that use too much CPU / power
index e6a7a56..db33c10 100644 (file)
@@ -49,7 +49,7 @@
 #import "WebsiteDataStoreParameters.h"
 #import <JavaScriptCore/ConfigFile.h>
 #import <JavaScriptCore/Options.h>
-#import <WebCore/AVFoundationMIMETypeCache.h>
+#import <WebCore/AVAssetMIMETypeCache.h>
 #import <WebCore/AXObjectCache.h>
 #import <WebCore/CPUMonitor.h>
 #import <WebCore/DisplayRefreshMonitorManager.h>
@@ -207,7 +207,7 @@ void WebProcess::platformInitializeWebProcess(WebProcessCreationParameters& para
     if (!parameters.mediaMIMETypes.isEmpty())
         setMediaMIMETypes(parameters.mediaMIMETypes);
     else {
-        AVFoundationMIMETypeCache::singleton().setCacheMIMETypesCallback([this](const Vector<String>& types) {
+        AVAssetMIMETypeCache::singleton().setCacheMIMETypesCallback([this](const Vector<String>& types) {
             parentProcessConnection()->send(Messages::WebProcessProxy::CacheMediaMIMETypes(types), 0);
         });
     }
@@ -470,7 +470,7 @@ void WebProcess::stopRunLoop()
 
 void WebProcess::platformTerminate()
 {
-    AVFoundationMIMETypeCache::singleton().setCacheMIMETypesCallback(nullptr);
+    AVAssetMIMETypeCache::singleton().setCacheMIMETypesCallback(nullptr);
 }
 
 RetainPtr<CFDataRef> WebProcess::sourceApplicationAuditData() const
@@ -806,7 +806,7 @@ void WebProcess::backlightLevelDidChange(float backlightLevel)
 
 void WebProcess::setMediaMIMETypes(const Vector<String> types)
 {
-    AVFoundationMIMETypeCache::singleton().setSupportedTypes(types);
+    AVAssetMIMETypeCache::singleton().setSupportedTypes(types);
 }
 
 } // namespace WebKit