Diff
Modified: trunk/Source/WTF/ChangeLog (261423 => 261424)
--- trunk/Source/WTF/ChangeLog 2020-05-08 23:11:38 UTC (rev 261423)
+++ trunk/Source/WTF/ChangeLog 2020-05-08 23:20:01 UTC (rev 261424)
@@ -1,3 +1,12 @@
+2020-05-08 Darin Adler <da...@apple.com>
+
+ Remove now-unneeded HAVE(AVFOUNDATION_LOADER_DELEGATE)
+ https://bugs.webkit.org/show_bug.cgi?id=211646
+
+ Reviewed by Eric Carlson.
+
+ * wtf/PlatformHave.h: Don't set HAVE_AVFOUNDATION_LOADER_DELEGATE.
+
2020-05-08 Don Olmstead <don.olmst...@sony.com>
[clang-tidy] Run modernize-use-nullptr over WTF
Modified: trunk/Source/WTF/wtf/PlatformHave.h (261423 => 261424)
--- trunk/Source/WTF/wtf/PlatformHave.h 2020-05-08 23:11:38 UTC (rev 261423)
+++ trunk/Source/WTF/wtf/PlatformHave.h 2020-05-08 23:20:01 UTC (rev 261424)
@@ -277,10 +277,6 @@
#define HAVE_MEDIA_ACCESSIBILITY_FRAMEWORK 1
#endif
-#if PLATFORM(COCOA)
-#define HAVE_AVFOUNDATION_LOADER_DELEGATE 1
-#endif
-
#if PLATFORM(MAC) || PLATFORM(MACCATALYST)
#define HAVE_APPLE_GRAPHICS_CONTROL 1
#endif
Modified: trunk/Source/WebCore/ChangeLog (261423 => 261424)
--- trunk/Source/WebCore/ChangeLog 2020-05-08 23:11:38 UTC (rev 261423)
+++ trunk/Source/WebCore/ChangeLog 2020-05-08 23:20:01 UTC (rev 261424)
@@ -1,3 +1,25 @@
+2020-05-08 Darin Adler <da...@apple.com>
+
+ Remove now-unneeded HAVE(AVFOUNDATION_LOADER_DELEGATE)
+ https://bugs.webkit.org/show_bug.cgi?id=211646
+
+ Reviewed by Eric Carlson.
+
+ * loader/MediaResourceLoader.cpp:
+ (WebCore::MediaResourceLoader::requestResource): Remove check of
+ HAVE(AVFOUNDATION_LOADER_DELEGATE) in a place where it also checks PLATFORM(MAC).
+
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
+ Remove HAVE(AVFOUNDATION_LOADER_DELEGATE) in Cocoa-only code.
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: Ditto.
+ (WebCore::globalLoaderDelegateQueue): Ditto.
+ (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Ditto.
+ (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC): Ditto.
+ (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Ditto.
+ (WebCore::MediaPlayerPrivateAVFoundationObjC::didStopLoadingRequest): Ditto.
+ * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h: Ditto.
+ * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm: Ditto.
+
2020-05-08 Tomoki Imai <tomoki.i...@sony.com>
TextureMapper should skip clipping a content layer if it's not needed
Modified: trunk/Source/WebCore/loader/MediaResourceLoader.cpp (261423 => 261424)
--- trunk/Source/WebCore/loader/MediaResourceLoader.cpp 2020-05-08 23:11:38 UTC (rev 261423)
+++ trunk/Source/WebCore/loader/MediaResourceLoader.cpp 2020-05-08 23:20:01 UTC (rev 261424)
@@ -81,7 +81,7 @@
if (m_mediaElement)
request.setInspectorInitiatorNodeIdentifier(InspectorInstrumentation::identifierForNode(*m_mediaElement));
-#if HAVE(AVFOUNDATION_LOADER_DELEGATE) && PLATFORM(MAC)
+#if PLATFORM(MAC)
// FIXME: Workaround for <rdar://problem/26071607>. We are not able to do CORS checking on 304 responses because they are usually missing the headers we need.
if (!m_crossOriginMode.isNull())
request.makeUnconditional();
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h (261423 => 261424)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h 2020-05-08 23:11:38 UTC (rev 261423)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h 2020-05-08 23:20:01 UTC (rev 261424)
@@ -80,11 +80,9 @@
void processCue(NSArray *, NSArray *, const MediaTime&);
void flushCues();
-#if HAVE(AVFOUNDATION_LOADER_DELEGATE)
bool shouldWaitForLoadingOfResource(AVAssetResourceLoadingRequest *);
void didCancelLoadingRequest(AVAssetResourceLoadingRequest *);
void didStopLoadingRequest(AVAssetResourceLoadingRequest *);
-#endif
#if ENABLE(LEGACY_ENCRYPTED_MEDIA)
RetainPtr<AVAssetResourceLoadingRequest> takeRequestForKeyURI(const String&);
@@ -351,13 +349,11 @@
std::unique_ptr<PixelBufferConformerCV> m_pixelBufferConformer;
#endif
-#if HAVE(AVFOUNDATION_LOADER_DELEGATE)
friend class WebCoreAVFResourceLoader;
HashMap<RetainPtr<CFTypeRef>, RefPtr<WebCoreAVFResourceLoader>> m_resourceLoaderMap;
RetainPtr<WebCoreAVFLoaderDelegate> m_loaderDelegate;
HashMap<String, RetainPtr<AVAssetResourceLoadingRequest>> m_keyURIToRequestMap;
HashMap<String, RetainPtr<AVAssetResourceLoadingRequest>> m_sessionIDToRequestMap;
-#endif
RetainPtr<AVPlayerItemLegibleOutput> m_legibleOutput;
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (261423 => 261424)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm 2020-05-08 23:11:38 UTC (rev 261423)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm 2020-05-08 23:20:01 UTC (rev 261424)
@@ -190,7 +190,6 @@
- (void)metadataOutput:(AVPlayerItemMetadataOutput *)output didOutputTimedMetadataGroups:(NSArray<AVTimedMetadataGroup *> *)groups fromPlayerItemTrack:(AVPlayerItemTrack *)track;
@end
-#if HAVE(AVFOUNDATION_LOADER_DELEGATE)
@interface WebCoreAVFLoaderDelegate : NSObject<AVAssetResourceLoaderDelegate> {
WeakPtr<MediaPlayerPrivateAVFoundationObjC> m_player;
GenericTaskQueue<Timer> m_taskQueue;
@@ -198,7 +197,6 @@
- (id)initWithPlayer:(WeakPtr<MediaPlayerPrivateAVFoundationObjC>&&)player;
- (BOOL)resourceLoader:(AVAssetResourceLoader *)resourceLoader shouldWaitForLoadingOfRequestedResource:(AVAssetResourceLoadingRequest *)loadingRequest;
@end
-#endif
@interface WebCoreAVFPullDelegate : NSObject<AVPlayerItemOutputPullDelegate> {
BinarySemaphore m_semaphore;
@@ -247,7 +245,6 @@
static NSArray *playerKVOProperties();
static AVAssetTrack* firstEnabledTrack(NSArray* tracks);
-#if HAVE(AVFOUNDATION_LOADER_DELEGATE)
static dispatch_queue_t globalLoaderDelegateQueue()
{
static dispatch_queue_t globalQueue;
@@ -257,7 +254,6 @@
});
return globalQueue;
}
-#endif
static dispatch_queue_t globalPullDelegateQueue()
{
@@ -433,9 +429,7 @@
: MediaPlayerPrivateAVFoundation(player)
, m_videoLayerManager(makeUnique<VideoLayerManagerObjC>(logger(), logIdentifier()))
, m_objcObserver(adoptNS([[WebCoreAVFMovieObserver alloc] initWithPlayer:makeWeakPtr(*this)]))
-#if HAVE(AVFOUNDATION_LOADER_DELEGATE)
, m_loaderDelegate(adoptNS([[WebCoreAVFLoaderDelegate alloc] initWithPlayer:makeWeakPtr(*this)]))
-#endif
, m_cachedItemStatus(MediaPlayerAVPlayerItemStatusDoesNotExist)
{
}
@@ -444,12 +438,10 @@
{
weakPtrFactory().revokeAll();
-#if HAVE(AVFOUNDATION_LOADER_DELEGATE)
[[m_avAsset.get() resourceLoader] setDelegate:nil queue:0];
for (auto& pair : m_resourceLoaderMap)
pair.value->invalidate();
-#endif
[m_videoOutput setDelegate:nil queue:0];
@@ -851,7 +843,6 @@
NSURL *cocoaURL = canonicalURL(url);
m_avAsset = adoptNS([PAL::allocAVURLAssetInstance() initWithURL:cocoaURL options:options.get()]);
-#if HAVE(AVFOUNDATION_LOADER_DELEGATE)
AVAssetResourceLoader *resourceLoader = m_avAsset.get().resourceLoader;
[resourceLoader setDelegate:m_loaderDelegate.get() queue:globalLoaderDelegateQueue()];
@@ -864,8 +855,6 @@
resourceLoader.URLSession = (NSURLSession *)[[[WebCoreNSURLSession alloc] initWithResourceLoader:*mediaResourceLoader delegate:resourceLoader.URLSessionDataDelegate delegateQueue:resourceLoader.URLSessionDataDelegateQueue] autorelease];
}
-#endif
-
m_haveCheckedPlayability = false;
setDelayCallbacks(false);
@@ -1638,7 +1627,6 @@
return false;
}
-#if HAVE(AVFOUNDATION_LOADER_DELEGATE)
#if ENABLE(LEGACY_ENCRYPTED_MEDIA)
static void fulfillRequestWithKeyData(AVAssetResourceLoadingRequest *request, ArrayBuffer* keyData)
{
@@ -1756,7 +1744,6 @@
{
m_resourceLoaderMap.remove((__bridge CFTypeRef)avRequest);
}
-#endif
bool MediaPlayerPrivateAVFoundationObjC::isAvailable()
{
@@ -3516,8 +3503,6 @@
}
@end
-#if HAVE(AVFOUNDATION_LOADER_DELEGATE)
-
@implementation WebCoreAVFLoaderDelegate
- (id)initWithPlayer:(WeakPtr<MediaPlayerPrivateAVFoundationObjC>&&)player
@@ -3571,8 +3556,6 @@
@end
-#endif // HAVE(AVFOUNDATION_LOADER_DELEGATE)
-
@implementation WebCoreAVFPullDelegate
@synthesize semaphore=m_semaphore;
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h (261423 => 261424)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h 2020-05-08 23:11:38 UTC (rev 261423)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h 2020-05-08 23:20:01 UTC (rev 261424)
@@ -25,7 +25,7 @@
#pragma once
-#if ENABLE(VIDEO) && USE(AVFOUNDATION) && HAVE(AVFOUNDATION_LOADER_DELEGATE)
+#if ENABLE(VIDEO) && USE(AVFOUNDATION)
#include <wtf/Noncopyable.h>
#include <wtf/Ref.h>
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm (261423 => 261424)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm 2020-05-08 23:11:38 UTC (rev 261423)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm 2020-05-08 23:20:01 UTC (rev 261424)
@@ -26,7 +26,7 @@
#import "config.h"
#import "WebCoreAVFResourceLoader.h"
-#if ENABLE(VIDEO) && USE(AVFOUNDATION) && HAVE(AVFOUNDATION_LOADER_DELEGATE)
+#if ENABLE(VIDEO) && USE(AVFOUNDATION)
#import "CachedRawResource.h"
#import "CachedResourceLoader.h"