Further unreviewed watchOS build fix: videoPerformanceMetrics unavailable on watchOS.
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Oct 2018 19:30:42 +0000 (19:30 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Oct 2018 19:30:42 +0000 (19:30 +0000)
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::videoPlaybackQualityMetrics):

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

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm

index c723245..b25b44e 100644 (file)
@@ -1,5 +1,12 @@
 2018-10-05  Jer Noble  <jer.noble@apple.com>
 
+        Further unreviewed watchOS build fix: videoPerformanceMetrics unavailable on watchOS.
+
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::videoPlaybackQualityMetrics):
+
+2018-10-05  Jer Noble  <jer.noble@apple.com>
+
        Unreviewed watchOS build fix: videoPerformanceMetrics unavailable on watchOS.
 
         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
index c5ff0d9..d44a087 100644 (file)
@@ -3263,10 +3263,12 @@ std::optional<VideoPlaybackQualityMetrics> MediaPlayerPrivateAVFoundationObjC::v
     if (![m_videoLayer respondsToSelector:@selector(videoPerformanceMetrics)])
         return std::nullopt;
 
+#if PLATFORM(WATCHOS)
+    return std::nullopt;
+#else
 #pragma clang diagnostic push
 #pragma clang diagnostic ignored "-Wunknown-pragmas"
 #pragma clang diagnostic ignored "-Wunguarded-availability-new"
-#if !PLATFORM(WATCHOS)
     auto metrics = [m_videoLayer videoPerformanceMetrics];
     if (!metrics)
         return std::nullopt;
@@ -3274,8 +3276,6 @@ std::optional<VideoPlaybackQualityMetrics> MediaPlayerPrivateAVFoundationObjC::v
     uint32_t displayCompositedFrames = 0;
     if ([metrics respondsToSelector:@selector(numberOfDisplayCompositedVideoFrames)])
         displayCompositedFrames = [metrics numberOfDisplayCompositedVideoFrames];
-#endif
-#pragma clang diagnostic pop
 
     return VideoPlaybackQualityMetrics {
         static_cast<uint32_t>([metrics totalNumberOfVideoFrames]),
@@ -3284,6 +3284,8 @@ std::optional<VideoPlaybackQualityMetrics> MediaPlayerPrivateAVFoundationObjC::v
         [metrics totalFrameDelay],
         displayCompositedFrames,
     };
+#pragma clang diagnostic pop
+#endif
 }
 
 NSArray* assetMetadataKeyNames()