Title: [244922] trunk/Source/WebCore
- Revision
- 244922
- Author
- eric.carl...@apple.com
- Date
- 2019-05-03 14:47:37 -0700 (Fri, 03 May 2019)
Log Message
AVFoundation framework isn't always installed
https://bugs.webkit.org/show_bug.cgi?id=197577
<rdar://problem/50447841>
Reviewed by Jer Noble.
Use PAL::isAVFoundationFrameworkAvailable() to check to see if AVFoundation is
installed, not PAL::AVFoundationLibrary().
* platform/graphics/avfoundation/objc/AVFoundationMIMETypeCache.mm:
(WebCore::AVFoundationMIMETypeCache::isAvailable const):
(WebCore::AVFoundationMIMETypeCache::loadMIMETypes):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::isAvailable):
(WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetType const):
(WebCore::exernalDeviceDisplayNameForPlayer):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::isAvailable):
* platform/graphics/cocoa/HEVCUtilitiesCocoa.mm:
(WebCore::validateHEVCParameters):
* platform/mediastream/mac/AVCaptureDeviceManager.mm:
(WebCore::AVCaptureDeviceManager::isAvailable):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (244921 => 244922)
--- trunk/Source/WebCore/ChangeLog 2019-05-03 21:24:06 UTC (rev 244921)
+++ trunk/Source/WebCore/ChangeLog 2019-05-03 21:47:37 UTC (rev 244922)
@@ -1,3 +1,30 @@
+2019-05-03 Eric Carlson <eric.carl...@apple.com>
+
+ AVFoundation framework isn't always installed
+ https://bugs.webkit.org/show_bug.cgi?id=197577
+ <rdar://problem/50447841>
+
+ Reviewed by Jer Noble.
+
+ Use PAL::isAVFoundationFrameworkAvailable() to check to see if AVFoundation is
+ installed, not PAL::AVFoundationLibrary().
+
+ * platform/graphics/avfoundation/objc/AVFoundationMIMETypeCache.mm:
+ (WebCore::AVFoundationMIMETypeCache::isAvailable const):
+ (WebCore::AVFoundationMIMETypeCache::loadMIMETypes):
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+ (WebCore::MediaPlayerPrivateAVFoundationObjC::isAvailable):
+ (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetType const):
+ (WebCore::exernalDeviceDisplayNameForPlayer):
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
+ (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable):
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
+ (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::isAvailable):
+ * platform/graphics/cocoa/HEVCUtilitiesCocoa.mm:
+ (WebCore::validateHEVCParameters):
+ * platform/mediastream/mac/AVCaptureDeviceManager.mm:
+ (WebCore::AVCaptureDeviceManager::isAvailable):
+
2019-05-03 Sihui Liu <sihui_...@apple.com>
Add assertion to check whether shm files have maximum FileProtection of CompleteUnlessOpen
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/AVFoundationMIMETypeCache.mm (244921 => 244922)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/AVFoundationMIMETypeCache.mm 2019-05-03 21:24:06 UTC (rev 244921)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/AVFoundationMIMETypeCache.mm 2019-05-03 21:47:37 UTC (rev 244922)
@@ -93,7 +93,7 @@
#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.
- return PAL::AVFoundationLibrary();
+ return PAL::isAVFoundationFrameworkAvailable();
#else
return AVFoundationLibraryIsAvailable();
#endif
@@ -109,7 +109,7 @@
#if ENABLE(VIDEO) && USE(AVFOUNDATION)
static std::once_flag onceFlag;
std::call_once(onceFlag, [this] {
- if (!PAL::AVFoundationLibrary())
+ if (!PAL::isAVFoundationFrameworkAvailable())
return;
for (NSString* type in [PAL::getAVURLAssetClass() audiovisualMIMETypes])
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (244921 => 244922)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm 2019-05-03 21:24:06 UTC (rev 244921)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm 2019-05-03 21:47:37 UTC (rev 244922)
@@ -1696,7 +1696,7 @@
bool MediaPlayerPrivateAVFoundationObjC::isAvailable()
{
- return PAL::AVFoundationLibrary() && isCoreMediaFrameworkAvailable();
+ return PAL::isAVFoundationFrameworkAvailable() && isCoreMediaFrameworkAvailable();
}
MediaTime MediaPlayerPrivateAVFoundationObjC::mediaTimeForTimeValue(const MediaTime& timeValue) const
@@ -2576,7 +2576,7 @@
return MediaPlayer::TargetTypeNone;
#if PLATFORM(IOS_FAMILY)
- if (!PAL::AVFoundationLibrary())
+ if (!PAL::isAVFoundationFrameworkAvailable())
return MediaPlayer::TargetTypeNone;
switch ([m_avPlayer externalPlaybackType]) {
@@ -2600,7 +2600,7 @@
static NSString *exernalDeviceDisplayNameForPlayer(AVPlayer *player)
{
#if HAVE(CELESTIAL)
- if (!PAL::AVFoundationLibrary())
+ if (!PAL::isAVFoundationFrameworkAvailable())
return nil;
if ([PAL::getAVOutputContextClass() respondsToSelector:@selector(sharedAudioPresentationOutputContext)]) {
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm (244921 => 244922)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm 2019-05-03 21:24:06 UTC (rev 244921)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm 2019-05-03 21:47:37 UTC (rev 244922)
@@ -179,7 +179,7 @@
bool MediaPlayerPrivateMediaSourceAVFObjC::isAvailable()
{
- return PAL::AVFoundationLibrary()
+ return PAL::isAVFoundationFrameworkAvailable()
&& isCoreMediaFrameworkAvailable()
&& getAVStreamDataParserClass()
&& getAVSampleBufferAudioRendererClass()
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm (244921 => 244922)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm 2019-05-03 21:24:06 UTC (rev 244921)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm 2019-05-03 21:47:37 UTC (rev 244922)
@@ -226,7 +226,7 @@
bool MediaPlayerPrivateMediaStreamAVFObjC::isAvailable()
{
- return PAL::AVFoundationLibrary() && isCoreMediaFrameworkAvailable() && getAVSampleBufferDisplayLayerClass();
+ return isAVFoundationFrameworkAvailable() && isCoreMediaFrameworkAvailable() && getAVSampleBufferDisplayLayerClass();
}
void MediaPlayerPrivateMediaStreamAVFObjC::getSupportedTypes(HashSet<String, ASCIICaseInsensitiveHash>& types)
Modified: trunk/Source/WebCore/platform/graphics/cocoa/HEVCUtilitiesCocoa.mm (244921 => 244922)
--- trunk/Source/WebCore/platform/graphics/cocoa/HEVCUtilitiesCocoa.mm 2019-05-03 21:24:06 UTC (rev 244921)
+++ trunk/Source/WebCore/platform/graphics/cocoa/HEVCUtilitiesCocoa.mm 2019-05-03 21:47:37 UTC (rev 244922)
@@ -41,7 +41,7 @@
{
CMVideoCodecType codec = kCMVideoCodecType_HEVC;
if (hasAlphaChannel) {
- if (!PAL::AVFoundationLibrary() || !PAL::canLoad_AVFoundation_AVVideoCodecTypeHEVCWithAlpha())
+ if (!PAL::isAVFoundationFrameworkAvailable() || !PAL::canLoad_AVFoundation_AVVideoCodecTypeHEVCWithAlpha())
return false;
auto codecCode = FourCC::fromString(AVVideoCodecTypeHEVCWithAlpha);
Modified: trunk/Source/WebCore/platform/mediastream/mac/AVCaptureDeviceManager.mm (244921 => 244922)
--- trunk/Source/WebCore/platform/mediastream/mac/AVCaptureDeviceManager.mm 2019-05-03 21:24:06 UTC (rev 244921)
+++ trunk/Source/WebCore/platform/mediastream/mac/AVCaptureDeviceManager.mm 2019-05-03 21:47:37 UTC (rev 244922)
@@ -160,7 +160,7 @@
bool AVCaptureDeviceManager::isAvailable()
{
- return PAL::AVFoundationLibrary();
+ return PAL::isAVFoundationFrameworkAvailable();
}
AVCaptureDeviceManager& AVCaptureDeviceManager::singleton()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes