Commit 0f34f220 authored by jeffm@apple.com's avatar jeffm@apple.com

MediaPlayerPrivateAVFoundationCF should use...

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.


git-svn-id: svn://svn.chromium.org/blink/trunk@93459 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 4d7b340d
2011-08-19 Jeff Miller <jeffm@apple.com>
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-19 Adrienne Walker <enne@google.com>
[chromium] Regression: Fix clang errors from r93424
......@@ -171,6 +171,9 @@ SOFT_LINK_DLL_IMPORT(AVFoundationCF, AVCFPlayerSetRate, void, __cdecl, (AVCFPlay
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
......
......@@ -704,20 +704,16 @@ static HashSet<String> mimeTypeCache()
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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment