RESOLVED FIXED 189427
RealtimeOutgoingVideoSourceCocoa should use VTImageRotationSession to rotate CVPixelBuffers
https://bugs.webkit.org/show_bug.cgi?id=189427
Summary RealtimeOutgoingVideoSourceCocoa should use VTImageRotationSession to rotate ...
youenn fablet
Reported 2018-09-07 12:17:27 PDT
RealtimeOutgoingVideoSourceCocoa should use VTImageRotationSession to rotate CVPixelBuffers
Attachments
Patch (8.56 KB, patch)
2018-09-07 12:27 PDT, youenn fablet
no flags
Patch for landing (9.29 KB, patch)
2018-09-07 14:48 PDT, youenn fablet
no flags
youenn fablet
Comment 1 2018-09-07 12:27:25 PDT
youenn fablet
Comment 2 2018-09-07 13:39:00 PDT
Comment on attachment 349177 [details] Patch Code following more or less ImageDecoderAVFObjC::storeSampleBuffer. Maybe I should check return error for VTImageRotationSessionCreate, VTImageRotationSessionSetProperty, CVPixelBufferPoolCreate and CVPixelBufferPoolCreatePixelBuffer?
Eric Carlson
Comment 3 2018-09-07 13:51:31 PDT
Comment on attachment 349177 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=349177&action=review > Source/WebCore/platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm:76 > + VTImageRotationSessionCreate(kCFAllocatorDefault, rotation, &rawRotationSession); > + VTImageRotationSessionSetProperty(rawRotationSession, kVTImageRotationPropertyKey_EnableHighSpeedTransfer, kCFBooleanTrue); Nit: these can both fail, you should check the return code and bail on failure so we don't crash later. > Source/WebCore/platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm:93 > + CVPixelBufferPoolCreate(kCFAllocatorDefault, nullptr, (__bridge CFDictionaryRef)pixelAttributes, &pool); Ditto. > Source/WebCore/platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm:102 > + CVPixelBufferPoolCreatePixelBuffer(kCFAllocatorDefault, m_rotationPool.get(), &rawRotatedBuffer); Ditto.
youenn fablet
Comment 4 2018-09-07 14:48:23 PDT
Created attachment 349197 [details] Patch for landing
WebKit Commit Bot
Comment 5 2018-09-07 15:28:27 PDT
Comment on attachment 349197 [details] Patch for landing Clearing flags on attachment: 349197 Committed r235810: <https://trac.webkit.org/changeset/235810>
WebKit Commit Bot
Comment 6 2018-09-07 15:28:28 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 7 2018-09-07 15:29:25 PDT
Note You need to log in before you can comment on or make changes to this bug.