[MediaStream] Address post-review comments after r238904
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Dec 2018 03:10:39 +0000 (03:10 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Dec 2018 03:10:39 +0000 (03:10 +0000)
https://bugs.webkit.org/show_bug.cgi?id=192514
<rdar://problem/46564302>

Reviewed by Youenn Fablet.

No new tests, no functional change.

* platform/graphics/cv/ImageTransferSessionVT.mm:
(WebCore::ImageTransferSessionVT::setSize):
* platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:
(WebCore::ScreenDisplayCaptureSourceMac::createDisplayStream):

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

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/cv/ImageTransferSessionVT.mm
Source/WebCore/platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm

index 198bbfe..f16fae2 100644 (file)
@@ -1,3 +1,18 @@
+2018-12-07  Eric Carlson  <eric.carlson@apple.com>
+
+        [MediaStream] Address post-review comments after r238904
+        https://bugs.webkit.org/show_bug.cgi?id=192514
+        <rdar://problem/46564302>
+
+        Reviewed by Youenn Fablet.
+
+        No new tests, no functional change.
+
+        * platform/graphics/cv/ImageTransferSessionVT.mm:
+        (WebCore::ImageTransferSessionVT::setSize):
+        * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:
+        (WebCore::ScreenDisplayCaptureSourceMac::createDisplayStream):
+
 2018-12-07  Antti Koivisto  <antti@apple.com>
 
         [LFC] Rename LayoutFormattingState files to LayoutState
index dbd58b3..24aa48c 100644 (file)
@@ -85,20 +85,20 @@ bool ImageTransferSessionVT::setSize(const IntSize& size)
     if (m_size == size && m_outputBufferPool)
         return true;
 
-    CFDictionaryRef pixelBufferOptions = (__bridge CFDictionaryRef) @{
-        (__bridge NSString *)kCVPixelBufferWidthKey :@(size.width()),
-        (__bridge NSString *)kCVPixelBufferHeightKey:@(size.height()),
-        (__bridge NSString *)kCVPixelBufferPixelFormatTypeKey:@(m_pixelFormat),
+    NSDictionary* pixelBufferOptions = @{
+        (__bridge NSString *)kCVPixelBufferWidthKey : @(size.width()),
+        (__bridge NSString *)kCVPixelBufferHeightKey : @(size.height()),
+        (__bridge NSString *)kCVPixelBufferPixelFormatTypeKey : @(m_pixelFormat),
         (__bridge NSString *)cvPixelFormatOpenGLKey() : @(YES),
         (__bridge NSString *)kCVPixelBufferIOSurfacePropertiesKey : @{ /*empty dictionary*/ },
     };
 
-    CFDictionaryRef pixelBufferPoolOptions = (__bridge CFDictionaryRef) @{
-        (__bridge NSString *)kCVPixelBufferPoolMinimumBufferCountKey : @(6)
+    NSDictionary* pixelBufferPoolOptions = @{
+        (__bridge NSString *)kCVPixelBufferPoolMinimumBufferCountKey: @(6)
     };
 
     CVPixelBufferPoolRef bufferPool;
-    auto status = CVPixelBufferPoolCreate(kCFAllocatorDefault, pixelBufferPoolOptions, pixelBufferOptions, &bufferPool);
+    auto status = CVPixelBufferPoolCreate(kCFAllocatorDefault, (__bridge CFDictionaryRef)pixelBufferPoolOptions, (__bridge CFDictionaryRef)pixelBufferOptions, &bufferPool);
     ASSERT(!status);
     if (status != kCVReturnSuccess)
         return false;
index 83b2022..8200e90 100644 (file)
@@ -141,10 +141,10 @@ bool ScreenDisplayCaptureSourceMac::createDisplayStream()
         if (!m_captureQueue)
             m_captureQueue = adoptOSObject(dispatch_queue_create("ScreenDisplayCaptureSourceMac Capture Queue", DISPATCH_QUEUE_SERIAL));
 
-        CFDictionaryRef streamOptions = (__bridge CFDictionaryRef) @{
-            (__bridge NSString *)kCGDisplayStreamMinimumFrameTime :@(1 / frameRate()),
-            (__bridge NSString *)kCGDisplayStreamQueueDepth:@(screenQueueMaximumLength),
-            (__bridge NSString *)kCGDisplayStreamColorSpace:(__bridge id)sRGBColorSpaceRef(),
+        NSDictionary* streamOptions = @{
+            (__bridge NSString *)kCGDisplayStreamMinimumFrameTime : @(1 / frameRate()),
+            (__bridge NSString *)kCGDisplayStreamQueueDepth : @(screenQueueMaximumLength),
+            (__bridge NSString *)kCGDisplayStreamColorSpace : (__bridge id)sRGBColorSpaceRef(),
             (__bridge NSString *)kCGDisplayStreamShowCursor : @(YES),
         };
 
@@ -156,7 +156,7 @@ bool ScreenDisplayCaptureSourceMac::createDisplayStream()
             weakThis->frameAvailable(status, displayTime, frameSurface, updateRef);
         };
 
-        m_displayStream = adoptCF(CGDisplayStreamCreateWithDispatchQueue(m_displayID, screenWidth, screenHeight, preferedPixelBufferFormat(), streamOptions, m_captureQueue.get(), frameAvailableBlock));
+        m_displayStream = adoptCF(CGDisplayStreamCreateWithDispatchQueue(m_displayID, screenWidth, screenHeight, preferedPixelBufferFormat(), (__bridge CFDictionaryRef)streamOptions, m_captureQueue.get(), frameAvailableBlock));
         if (!m_displayStream) {
             RELEASE_LOG(Media, "ScreenDisplayCaptureSourceMac::createDisplayStream: CGDisplayStreamCreate failed");
             captureFailed();