[MediaStream] Consolidate all image conversion and resizing into one class
authorryanhaddad@apple.com <ryanhaddad@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Oct 2018 23:54:19 +0000 (23:54 +0000)
committerryanhaddad@apple.com <ryanhaddad@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Oct 2018 23:54:19 +0000 (23:54 +0000)
https://bugs.webkit.org/show_bug.cgi?id=190519
<rdar://problem/45224307>

Try to fix the iOSMac build after r237236.

Patch by Eric Carlson <eric.carlson@apple.com> on 2018-10-17

* platform/graphics/cv/ImageTransferSessionVT.h:
* platform/graphics/cv/ImageTransferSessionVT.mm:

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

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/cv/ImageTransferSessionVT.h
Source/WebCore/platform/graphics/cv/ImageTransferSessionVT.mm

index 2b9e8cc..759a10b 100644 (file)
@@ -1,3 +1,14 @@
+2018-10-17  Eric Carlson  <eric.carlson@apple.com>
+
+        [MediaStream] Consolidate all image conversion and resizing into one class
+        https://bugs.webkit.org/show_bug.cgi?id=190519
+        <rdar://problem/45224307>
+
+        Try to fix the iOSMac build after r237236.
+
+        * platform/graphics/cv/ImageTransferSessionVT.h:
+        * platform/graphics/cv/ImageTransferSessionVT.mm:
+
 2018-10-17  Justin Fan  <justin_fan@apple.com>
 
         [WebGPU] Implement WebGPU bindings up through WebGPUDevice creation
index 8e2bd57..5c32314 100644 (file)
@@ -51,14 +51,14 @@ public:
     RefPtr<MediaSample> createMediaSample(CGImageRef, const MediaTime&, const IntSize&, MediaSample::VideoRotation = MediaSample::VideoRotation::None, bool mirrored = false);
     RefPtr<MediaSample> createMediaSample(CMSampleBufferRef, const IntSize&, MediaSample::VideoRotation = MediaSample::VideoRotation::None, bool mirrored = false);
 
-#if HAVE(IOSURFACE)
+#if HAVE(IOSURFACE) && !PLATFORM(IOSMAC)
     RefPtr<MediaSample> createMediaSample(IOSurfaceRef, const MediaTime&, const IntSize&, MediaSample::VideoRotation = MediaSample::VideoRotation::None, bool mirrored = false);
 #endif
 
 private:
     WEBCORE_EXPORT explicit ImageTransferSessionVT(uint32_t pixelFormat);
 
-#if HAVE(IOSURFACE)
+#if HAVE(IOSURFACE) && !PLATFORM(IOSMAC)
     CFDictionaryRef ioSurfacePixelBufferCreationOptions(IOSurfaceRef);
     RetainPtr<CMSampleBufferRef> createCMSampleBuffer(IOSurfaceRef, const MediaTime&, const IntSize&);
     RetainPtr<CVPixelBufferRef> createPixelBuffer(IOSurfaceRef, const IntSize&);
index 8a6cdd9..849422a 100644 (file)
@@ -34,7 +34,7 @@
 #import <CoreMedia/CMSampleBuffer.h>
 #import <pal/cf/CoreMediaSoftLink.h>
 
-#if HAVE(IOSURFACE)
+#if HAVE(IOSURFACE) && !PLATFORM(IOSMAC)
 #include <pal/spi/cocoa/IOSurfaceSPI.h>
 #endif
 
@@ -265,7 +265,7 @@ RetainPtr<CMSampleBufferRef> ImageTransferSessionVT::createCMSampleBuffer(CGImag
     return createCMSampleBuffer(pixelBuffer.get(), sampleTime, size);
 }
 
-#if HAVE(IOSURFACE)
+#if HAVE(IOSURFACE) && !PLATFORM(IOSMAC)
 
 #if PLATFORM(MAC)
 static int32_t roundUpToMacroblockMultiple(int32_t size)
@@ -350,7 +350,7 @@ RefPtr<MediaSample> ImageTransferSessionVT::convertMediaSample(MediaSample& samp
     return MediaSampleAVFObjC::create(resizedBuffer.get(), sample.videoRotation(), sample.videoMirrored());
 }
 
-#if HAVE(IOSURFACE)
+#if HAVE(IOSURFACE) && !PLATFORM(IOSMAC)
 RefPtr<MediaSample> ImageTransferSessionVT::createMediaSample(IOSurfaceRef surface, const MediaTime& sampleTime, const IntSize& size, MediaSample::VideoRotation rotation, bool mirrored)
 {
     auto sampleBuffer = createCMSampleBuffer(surface, sampleTime, size);