[Mac] Use preferedPixelBufferFormat for AVVideoCaptureSource
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 May 2020 13:30:42 +0000 (13:30 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 May 2020 13:30:42 +0000 (13:30 +0000)
https://bugs.webkit.org/show_bug.cgi?id=212071

Reviewed by Eric Carlson.

Source/WebCore:

Manually tested.

* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::avVideoCapturePixelBufferFormat):

Source/WTF:

* wtf/PlatformHave.h:
Add HAVE_DISPLAY_LAYER_BIPLANAR_SUPPORT macro.

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

Source/WTF/ChangeLog
Source/WTF/wtf/PlatformHave.h
Source/WebCore/ChangeLog
Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm

index 3d94050..cd3de24 100644 (file)
@@ -1,3 +1,13 @@
+2020-05-20  Youenn Fablet  <youenn@apple.com>
+
+        [Mac] Use preferedPixelBufferFormat for AVVideoCaptureSource
+        https://bugs.webkit.org/show_bug.cgi?id=212071
+
+        Reviewed by Eric Carlson.
+
+        * wtf/PlatformHave.h:
+        Add HAVE_DISPLAY_LAYER_BIPLANAR_SUPPORT macro.
+
 2020-05-19  Adrian Perez de Castro  <aperez@igalia.com>
 
         WTF::LockedPrintStream should be final
index 7a725bd..af8ce88 100644 (file)
 #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) || PLATFORM(IOS) || PLATFORM(MACCATALYST)
 #define HAVE_QUICKLOOK_THUMBNAILING 1
 #endif
+
+#if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101600)
+#define HAVE_DISPLAY_LAYER_BIPLANAR_SUPPORT 1
+#endif
index e69f7df..2f46e19 100644 (file)
@@ -1,3 +1,15 @@
+2020-05-20  Youenn Fablet  <youenn@apple.com>
+
+        [Mac] Use preferedPixelBufferFormat for AVVideoCaptureSource
+        https://bugs.webkit.org/show_bug.cgi?id=212071
+
+        Reviewed by Eric Carlson.
+
+        Manually tested.
+
+        * platform/mediastream/mac/AVVideoCaptureSource.mm:
+        (WebCore::avVideoCapturePixelBufferFormat):
+
 2020-05-20  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         Unreviewed. Fix GTK4 build with GTK 3.98.4
index d59520e..ba52d5a 100644 (file)
@@ -75,11 +75,10 @@ namespace WebCore {
 
 static inline OSType avVideoCapturePixelBufferFormat()
 {
-    // FIXME: Use preferedPixelBufferFormat() once rdar://problem/44391444 is fixed.
-#if PLATFORM(MAC)
-    return kCVPixelFormatType_420YpCbCr8Planar;
-#else
+#if HAVE(DISPLAY_LAYER_BIPLANAR_SUPPORT)
     return preferedPixelBufferFormat();
+#else
+    return kCVPixelFormatType_420YpCbCr8Planar;
 #endif
 }