Title: [213372] trunk/Source/WebCore
Revision
213372
Author
eric.carl...@apple.com
Date
2017-03-03 10:20:08 -0800 (Fri, 03 Mar 2017)

Log Message

[MediaStream] Remove #if USE(VIDEOTOOLBOX) from AVVideoCaptureSource
https://bugs.webkit.org/show_bug.cgi?id=169131

Reviewed by Youenn Fablet.

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

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (213371 => 213372)


--- trunk/Source/WebCore/ChangeLog	2017-03-03 18:12:11 UTC (rev 213371)
+++ trunk/Source/WebCore/ChangeLog	2017-03-03 18:20:08 UTC (rev 213372)
@@ -1,3 +1,13 @@
+2017-03-03  Eric Carlson  <eric.carl...@apple.com>
+
+        [MediaStream] Remove #if USE(VIDEOTOOLBOX) from AVVideoCaptureSource
+        https://bugs.webkit.org/show_bug.cgi?id=169131
+
+        Reviewed by Youenn Fablet.
+
+        * platform/mediastream/mac/AVVideoCaptureSource.mm:
+        (WebCore::AVVideoCaptureSource::currentFrameCGImage):
+
 2017-03-03  Chris Dumez  <cdu...@apple.com>
 
         Add assertion in Frame::setView() to make sure associated document has no living render tree

Modified: trunk/Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm (213371 => 213372)


--- trunk/Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm	2017-03-03 18:12:11 UTC (rev 213371)
+++ trunk/Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm	2017-03-03 18:20:08 UTC (rev 213372)
@@ -463,15 +463,13 @@
     CVPixelBufferRef pixelBuffer = static_cast<CVPixelBufferRef>(CMSampleBufferGetImageBuffer(m_buffer.get()));
     ASSERT(CVPixelBufferGetPixelFormatType(pixelBuffer) == videoCaptureFormat);
 
-    if (!m_pixelBufferConformer) {
-#if USE(VIDEOTOOLBOX)
-        NSDictionary *attributes = @{ (NSString *)kCVPixelBufferPixelFormatTypeKey: @(kCVPixelFormatType_32BGRA) };
-#else
-        NSDictionary *attributes = nil;
-#endif
-        m_pixelBufferConformer = std::make_unique<PixelBufferConformerCV>((CFDictionaryRef)attributes);
-    }
+    if (!m_pixelBufferConformer)
+        m_pixelBufferConformer = std::make_unique<PixelBufferConformerCV>((CFDictionaryRef)@{ (NSString *)kCVPixelBufferPixelFormatTypeKey: @(kCVPixelFormatType_32BGRA) });
 
+    ASSERT(m_pixelBufferConformer);
+    if (!m_pixelBufferConformer)
+        return nullptr;
+
     m_lastImage = m_pixelBufferConformer->createImageFromPixelBuffer(pixelBuffer);
 
     return m_lastImage;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to