File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
sdk/objc/components/renderer/metal Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -271,18 +271,15 @@ - (void)renderFrame:(nullable RTC_OBJC_TYPE(RTCVideoFrame) *)frame {
271271 return ;
272272 }
273273
274- #if TARGET_OS_IPHONE
275- self.videoFrame = frame;
276- #elif TARGET_OS_OSX
277- // Rendering native CVPixelBuffer is not supported on OS X.
274+ // Workaround to support RTCCVPixelBuffer rendering.
275+ // RTCMTLRGBRenderer seems to be broken at the moment.
278276 BOOL useI420 = NO ;
279277 if ([frame.buffer isKindOfClass: [RTC_OBJC_TYPE (RTCCVPixelBuffer) class ]]) {
280278 RTC_OBJC_TYPE (RTCCVPixelBuffer) *buffer = (RTC_OBJC_TYPE (RTCCVPixelBuffer) *)frame.buffer ;
281279 const OSType pixelFormat = CVPixelBufferGetPixelFormatType (buffer.pixelBuffer );
282280 useI420 = pixelFormat == kCVPixelFormatType_32BGRA || pixelFormat == kCVPixelFormatType_32ARGB ;
283281 }
284282 self.videoFrame = useI420 ? [frame newI420VideoFrame ] : frame;
285- #endif
286283}
287284
288285#pragma mark - Cross platform
You can’t perform that action at this time.
0 commit comments