Changeset 288053 in webkit
- Timestamp:
- Jan 14, 2022 11:30:01 PM (6 months ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (modified) (1 diff)
-
platform/graphics/cv/ImageRotationSessionVT.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r288052 r288053 1 2022-01-14 Peng Liu <peng.liu6@apple.com> 2 3 Unable to playback portrait videos on HTML canvas elements 4 https://bugs.webkit.org/show_bug.cgi?id=235238 5 6 Reviewed by Jer Noble. 7 8 We need to make sure the destination pixel buffer is IOSurface-backed. 9 Otherwise, VTImageRotationSession cannot rotate a pixel buffer with 10 a compressed pixel format. 11 12 Manually tested. 13 14 Layout tests for this exist, but unless they run on an iPhone 12 or 15 later HW, they won't fail. For example: 16 - media/video-orientation-canvas.html 17 18 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: 19 (WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastPixelBuffer): 20 * platform/graphics/cv/ImageRotationSessionVT.mm: 21 (WebCore::ImageRotationSessionVT::rotate): 22 1 23 2022-01-14 Frederic Wang <fwang@igalia.com> 2 24 -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
r288031 r288053 2557 2557 } 2558 2558 2559 if (m_ imageRotationSession)2559 if (m_lastPixelBuffer && m_imageRotationSession) 2560 2560 m_lastPixelBuffer = m_imageRotationSession->rotate(m_lastPixelBuffer.get()); 2561 2561 -
trunk/Source/WebCore/platform/graphics/cv/ImageRotationSessionVT.mm
r281950 r288053 103 103 (__bridge NSString *)kCVPixelBufferPixelFormatTypeKey: @(m_pixelFormat), 104 104 (__bridge NSString *)kCVPixelBufferCGImageCompatibilityKey: (m_isCGImageCompatible == IsCGImageCompatible::Yes ? @YES : @NO), 105 #if PLATFORM(IOS_SIMULATOR) || PLATFORM(MAC)106 105 (__bridge NSString *)kCVPixelBufferIOSurfacePropertiesKey : @{ } 107 #endif108 106 }; 109 107 … … 120 118 CVPixelBufferRef rawRotatedBuffer = nullptr; 121 119 auto status = CVPixelBufferPoolCreatePixelBuffer(kCFAllocatorDefault, m_rotationPool.get(), &rawRotatedBuffer); 122 if (status != kCVReturnSuccess ) {120 if (status != kCVReturnSuccess || !rawRotatedBuffer) { 123 121 RELEASE_LOG_ERROR(WebRTC, "ImageRotationSessionVT failed creating buffer from pool with error %d", status); 124 122 return nullptr;
Note: See TracChangeset
for help on using the changeset viewer.