[Win] Update MediaPlayerPrivateAVFoundationCF::supportsType
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Jun 2015 19:37:43 +0000 (19:37 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Jun 2015 19:37:43 +0000 (19:37 +0000)
commit4d66195d20752096c4da5a7142ea0035f1c17ae5
treea4754572cf40edbd5b33df9b0c7f012338e3bbfb
parent4fa380b5aafdf716a6d8c2c53527f2d57771c975
[Win] Update MediaPlayerPrivateAVFoundationCF::supportsType
https://bugs.webkit.org/show_bug.cgi?id=146302
<rdar://problem/19726553>

Reviewed by Eric Carlson.

Tested by existing media tests.

Update the AVFoundationCF version of 'supportsType' to more closely match the AVFoundation
version. Use this new code when the necessary AVFoundationCF functions are present.

* AVFoundationSupport.py: Check for presence of AVCFURLAssetIsPlayableExtendedMIMEType.
(fileContains): Added helper function.
* WebCore.vcxproj/WebCoreGenerated.vcxproj: Add AVFoundationSupport.py to project file to make
maintenance easier.
* WebCore.vcxproj/WebCoreGenerated.vcxproj.filters: Ditto.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::isUnsupportedMIMEType): Moved from ObjC version.
(WebCore::MediaPlayerPrivateAVFoundation::staticMIMETypeList): Ditto.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Add missing declaration.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::avfMIMETypes): Added CF version of AVFoundation code.
(WebCore::MediaPlayerPrivateAVFoundationCF::supportsType): Update to use new AVCF
method if it is available.
(WebCore::MediaPlayerPrivateAVFoundationCF::languageOfPrimaryAudioTrack): Handle case of a
null language locale. This is a drive-by fix of a bug found during testing.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::isUnsupportedMIMEType): Deleted.
(WebCore::staticMIMETypeList): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185958 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/AVFoundationSupport.py
Source/WebCore/ChangeLog
Source/WebCore/WebCore.vcxproj/WebCoreGenerated.vcxproj
Source/WebCore/WebCore.vcxproj/WebCoreGenerated.vcxproj.filters
Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp
Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h
Source/WebCore/platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h
Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm