Title: [94218] branches/safari-534.51-branch/Source/WebCore

Diff

Modified: branches/safari-534.51-branch/Source/WebCore/ChangeLog (94217 => 94218)


--- branches/safari-534.51-branch/Source/WebCore/ChangeLog	2011-08-31 19:29:06 UTC (rev 94217)
+++ branches/safari-534.51-branch/Source/WebCore/ChangeLog	2011-08-31 19:42:49 UTC (rev 94218)
@@ -1,5 +1,22 @@
 2011-08-29  Lucas Forschler  <[email protected]>
 
+    Merged 93459
+
+    2011-08-19  Jeff Miller  <[email protected]>
+
+            MediaPlayerPrivateAVFoundationCF should use AVCFURLAssetCopyAudiovisualMIMETypes() to get list of supported MIME types
+            https://bugs.webkit.org/show_bug.cgi?id=66612
+
+            Reviewed by Darin Adler.
+
+            No new tests, should be covered by existing media tests.
+
+            * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Added AVCFURLAssetCopyAudiovisualMIMETypes().
+            * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
+            (WebCore::mimeTypeCache): Use AVCFURLAssetCopyAudiovisualMIMETypes() to build the cache of supported MIME types.
+
+2011-08-29  Lucas Forschler  <[email protected]>
+
     Merged 93900
 
     2011-08-26  Darin Adler  <[email protected]>

Modified: branches/safari-534.51-branch/Source/WebCore/platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h (94217 => 94218)


--- branches/safari-534.51-branch/Source/WebCore/platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h	2011-08-31 19:29:06 UTC (rev 94217)
+++ branches/safari-534.51-branch/Source/WebCore/platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h	2011-08-31 19:42:49 UTC (rev 94218)
@@ -171,6 +171,9 @@
 SOFT_LINK_DLL_IMPORT(AVFoundationCF, AVCFPlayerSetVolume, void, __cdecl, (AVCFPlayerRef player, Float32 volume), (player, volume))
 #define AVCFPlayerSetVolume softLink_AVCFPlayerSetVolume
 
+SOFT_LINK_DLL_IMPORT(AVFoundationCF, AVCFURLAssetCopyAudiovisualMIMETypes, CFArrayRef, __cdecl, (), ())
+#define AVCFURLAssetCopyAudiovisualMIMETypes softLink_AVCFURLAssetCopyAudiovisualMIMETypes
+
 SOFT_LINK_DLL_IMPORT(AVFoundationCF, AVCFURLAssetCreateWithURLAndOptions, AVCFURLAssetRef, __cdecl, (CFAllocatorRef allocator, CFURLRef URL, CFDictionaryRef options, dispatch_queue_t notificationQueue), (allocator, URL, options, notificationQueue))
 #define AVCFURLAssetCreateWithURLAndOptions softLink_AVCFURLAssetCreateWithURLAndOptions
 

Modified: branches/safari-534.51-branch/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp (94217 => 94218)


--- branches/safari-534.51-branch/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp	2011-08-31 19:29:06 UTC (rev 94217)
+++ branches/safari-534.51-branch/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp	2011-08-31 19:42:49 UTC (rev 94218)
@@ -702,20 +702,16 @@
     if (typeListInitialized)
         return cache;
     typeListInitialized = true;
+    
+    RetainPtr<CFArrayRef> supportedTypes(AdoptCF, AVCFURLAssetCopyAudiovisualMIMETypes());
+    
+    ASSERT(supportedTypes);
+    if (!supportedTypes)
+        return cache;
 
-    // Not possible to query AVFoundation for supported MIME types, <rdar://problem/8721693>, so
-    // hard code some types for now.
-    cache.add("video/quicktime");
-    cache.add("video/mp4");
-    cache.add("video/mpeg");
-    cache.add("audio/3gpp");
-    cache.add("audio/mp3");
-    cache.add("audio/mp4");
-    cache.add("audio/mp4");
-    cache.add("audio/m4a");
-    cache.add("audio/aac");
-    cache.add("audio/wav");
-    cache.add("application/vnd.apple.mpegurl");
+    CFIndex typeCount = CFArrayGetCount(supportedTypes.get());
+    for (CFIndex i = 0; i < typeCount; i++)
+        cache.add(static_cast<CFStringRef>(CFArrayGetValueAtIndex(supportedTypes.get(), i)));
 
     return cache;
 } 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to