Move AVVideoPerformanceMetrics into AVFoundationSPI.h
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Sep 2018 20:00:03 +0000 (20:00 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Sep 2018 20:00:03 +0000 (20:00 +0000)
https://bugs.webkit.org/show_bug.cgi?id=189842

Reviewed by Jon Lee.

Source/WebCore:

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:

Source/WebCore/PAL:

* pal/spi/mac/AVFoundationSPI.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236350 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/pal/spi/mac/AVFoundationSPI.h
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm

index f7aab9d..035f04f 100644 (file)
@@ -1,3 +1,12 @@
+2018-09-21  Jer Noble  <jer.noble@apple.com>
+
+        Move AVVideoPerformanceMetrics into AVFoundationSPI.h
+        https://bugs.webkit.org/show_bug.cgi?id=189842
+
+        Reviewed by Jon Lee.
+
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
+
 2018-09-21  Chris Dumez  <cdumez@apple.com>
 
         WebSQL: User cannot grant quota increase if the JS provides an expected usage value that is too low
index acac47b..12b4040 100644 (file)
@@ -1,3 +1,12 @@
+2018-09-21  Jer Noble  <jer.noble@apple.com>
+
+        Move AVVideoPerformanceMetrics into AVFoundationSPI.h
+        https://bugs.webkit.org/show_bug.cgi?id=189842
+
+        Reviewed by Jon Lee.
+
+        * pal/spi/mac/AVFoundationSPI.h:
+
 2018-09-21  Jonathan Bedard  <jbedard@apple.com>
 
         Bring up queues for iOS 12 (Build fix)
index 6c25409..d41d773 100644 (file)
@@ -156,6 +156,15 @@ NS_ASSUME_NONNULL_END
 #endif
 
 #endif // !PLATFORM(IOS)
+
+@interface AVVideoPerformanceMetrics : NSObject
+@property (nonatomic, readonly) unsigned long totalNumberOfVideoFrames;
+@property (nonatomic, readonly) unsigned long numberOfDroppedVideoFrames;
+@property (nonatomic, readonly) unsigned long numberOfCorruptedVideoFrames;
+@property (nonatomic, readonly) unsigned long numberOfNonDisplayCompositedVideoFrames;
+@property (nonatomic, readonly) double totalFrameDelay;
+@end
+
 #endif // USE(APPLE_INTERNAL_SDK)
 
 #if PLATFORM(MAC) && !USE(APPLE_INTERNAL_SDK)
@@ -227,8 +236,15 @@ NS_ASSUME_NONNULL_END
 
 #if ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED < 101300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MAX_ALLOWED < 110000)) && __has_include(<AVFoundation/AVQueuedSampleBufferRendering.h>)
 #import <AVFoundation/AVQueuedSampleBufferRendering.h>
+#elif __has_include(<AVFoundation/AVSampleBufferDisplayLayer_Private.h>)
+#import <AVFoundation/AVSampleBufferDisplayLayer_Private.h>
 #elif __has_include(<AVFoundation/AVSampleBufferDisplayLayer.h>)
 #import <AVFoundation/AVSampleBufferDisplayLayer.h>
+NS_ASSUME_NONNULL_BEGIN
+@interface AVSampleBufferDisplayLayer (VideoPerformanceMetrics)
+- (AVVideoPerformanceMetrics *)videoPerformanceMetrics;
+@end
+NS_ASSUME_NONNULL_END
 #else
 
 NS_ASSUME_NONNULL_BEGIN
@@ -245,10 +261,9 @@ NS_ASSUME_NONNULL_BEGIN
 - (BOOL)isReadyForMoreMediaData;
 - (void)requestMediaDataWhenReadyOnQueue:(dispatch_queue_t)queue usingBlock:(void (^)(void))block;
 - (void)stopRequestingMediaData;
+- (AVVideoPerformanceMetrics *)videoPerformanceMetrics;
 @end
-
 NS_ASSUME_NONNULL_END
-
 #endif // __has_include(<AVFoundation/AVSampleBufferDisplayLayer.h>)
 
 #if ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED < 101300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MAX_ALLOWED < 110000)) && __has_include(<AVFoundation/AVQueuedSampleBufferRendering.h>)
index 4c10873..69c61b6 100644 (file)
@@ -80,20 +80,6 @@ SOFT_LINK_CONSTANT(AVFoundation, AVAudioTimePitchAlgorithmVarispeed, NSString*)
 #define AVAudioTimePitchAlgorithmVarispeed getAVAudioTimePitchAlgorithmVarispeed()
 
 #pragma mark -
-#pragma mark AVVideoPerformanceMetrics
-
-@interface AVVideoPerformanceMetrics : NSObject
-- (unsigned long)totalNumberOfVideoFrames;
-- (unsigned long)numberOfDroppedVideoFrames;
-- (unsigned long)numberOfCorruptedVideoFrames;
-- (double)totalFrameDelay;
-@end
-
-@interface AVSampleBufferDisplayLayer (WebCoreAVSampleBufferDisplayLayerPrivate)
-- (AVVideoPerformanceMetrics *)videoPerformanceMetrics;
-@end
-
-#pragma mark -
 #pragma mark AVStreamSession
 
 @interface AVStreamSession : NSObject