Refactoring: MediaEngineSupportParameters should take a ContentType rather than separ...
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Jun 2017 22:15:50 +0000 (22:15 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Jun 2017 22:15:50 +0000 (22:15 +0000)
commit3ab9fa6fb8a0773b6b8f0fd72ccebf5892ec0fe2
treed1407f5c663112e61d6dda90f673a8ea34e44705
parentc2eb69ca422fe468dc5b57588ccb5600d0c200e8
Refactoring: MediaEngineSupportParameters should take a ContentType rather than separate type & codecs strings
https://bugs.webkit.org/show_bug.cgi?id=173038

Reviewed by Eric Carlson.

Source/WebCore:

* Modules/encryptedmedia/CDM.cpp:
(WebCore::CDM::getSupportedCapabilitiesForAudioVideoType):
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::addSourceBuffer):
(WebCore::MediaSource::isTypeSupported):
* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createDocument):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::canPlayType):
(WebCore::HTMLMediaElement::selectNextSourceChild):
* platform/ContentType.cpp:
(WebCore::ContentType::codecsParameter):
(WebCore::ContentType::profilesParameter):
(WebCore::ContentType::containerType):
(WebCore::simplifyWhitespace):
(WebCore::ContentType::codecs):
(WebCore::ContentType::profiles):
(WebCore::ContentType::type): Deleted.
* platform/ContentType.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::bestMediaEngineForSupportParameters):
(WebCore::MediaPlayer::load):
(WebCore::MediaPlayer::nextBestMediaEngine):
(WebCore::MediaPlayer::loadWithNextMediaEngine):
(WebCore::MediaPlayer::supportsType):
(WebCore::MediaPlayer::networkStateChanged):
(WebCore::codecs): Deleted.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayer::contentMIMEType):
(WebCore::MediaPlayer::contentTypeCodecs):
* platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
(WebCore::CDMPrivateMediaSourceAVFObjC::supportsKeySystemAndMimeType):
(WebCore::CDMPrivateMediaSourceAVFObjC::supportsMIMEType):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::supportsType):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
(WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):
* platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
(WebCore::MediaSourcePrivateAVFObjC::addSourceBuffer):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::supportsType):
* platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
(WebCore::MediaPlayerPrivateGStreamerMSE::supportsType):
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::supportsType):
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::MediaPlayerPrivateMediaFoundation::supportsType):
* platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
(WebCore::MockMediaPlayerMediaSource::supportsType):
* platform/mock/mediasource/MockMediaSourcePrivate.cpp:
(WebCore::MockMediaSourcePrivate::addSourceBuffer):

Source/WTF:

Drive by fix: add a version of split that takes a UChar and returns a Vector<String>.

* wtf/text/WTFString.h:
(WTF::String::split):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217905 268f45cc-cd09-0410-ab3c-d52691b4dbfc
22 files changed:
Source/WTF/ChangeLog
Source/WTF/wtf/text/WTFString.h
Source/WebCore/ChangeLog
Source/WebCore/Modules/encryptedmedia/CDM.cpp
Source/WebCore/Modules/mediasource/MediaSource.cpp
Source/WebCore/dom/DOMImplementation.cpp
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/platform/ContentType.cpp
Source/WebCore/platform/ContentType.h
Source/WebCore/platform/graphics/MediaPlayer.cpp
Source/WebCore/platform/graphics/MediaPlayer.h
Source/WebCore/platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm
Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm
Source/WebCore/platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp
Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp
Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp
Source/WebCore/platform/mock/mediasource/MockMediaSourcePrivate.cpp