Changeset 239387 in webkit
- Timestamp:
- Dec 19, 2018, 1:11:12 PM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
platform/graphics/cocoa/WebCoreDecompressionSession.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r239384 r239387 1 2018-12-19 Jer Noble <jer.noble@apple.com> 2 3 Force synchronous decode in WebCoreDecompressionSession::decodeSampleSync() 4 https://bugs.webkit.org/show_bug.cgi?id=192856 5 <rdar://problem/46843245> 6 7 Reviewed by Alex Christensen. 8 9 Some decoders exposed through VideoToolbox will decode asynchronously even when 10 kVTDecodeInfo_Asynchronous is not set. Force synchronous behavior with a Semaphore. 11 12 * platform/graphics/cocoa/WebCoreDecompressionSession.mm: 13 (WebCore::WebCoreDecompressionSession::decodeSampleSync): 14 1 15 2018-12-19 Megan Gardner <megan_gardner@apple.com> 2 16 -
trunk/Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm
r236101 r239387 40 40 #import <wtf/StringPrintStream.h> 41 41 #import <wtf/Vector.h> 42 #import <wtf/WTFSemaphore.h> 42 43 #import <wtf/cf/TypeCastsCF.h> 43 44 … … 278 279 RetainPtr<CVPixelBufferRef> pixelBuffer; 279 280 VTDecodeInfoFlags flags { 0 }; 281 WTF::Semaphore syncDecompressionOutputSemaphore { 0 }; 280 282 VTDecompressionSessionDecodeFrameWithOutputHandler(m_decompressionSession.get(), sample, flags, nullptr, [&] (OSStatus, VTDecodeInfoFlags, CVImageBufferRef imageBuffer, CMTime, CMTime) mutable { 281 283 if (imageBuffer && CFGetTypeID(imageBuffer) == CVPixelBufferGetTypeID()) 282 284 pixelBuffer = (CVPixelBufferRef)imageBuffer; 285 syncDecompressionOutputSemaphore.signal(); 283 286 }); 287 syncDecompressionOutputSemaphore.wait(); 284 288 return pixelBuffer; 285 289 }
Note:
See TracChangeset
for help on using the changeset viewer.