企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
实现如下的代理方法,采集格式一定要是TRTCVideoPixelFormat\_32BGRA !(Implement the following proxy method. The collection format must be TRTCVideoPixelFormat\_32BGRA !) ``` -(void)didOutputVideoSampleBuffer:(CMSampleBufferRef)sampleBuffer { CVPixelBufferRef pixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer) ; NSTimeInterval startTime = [[NSDate date] timeIntervalSince1970]; //渲染(必加关键代码) OSType formatType = CVPixelBufferGetPixelFormatType(pixelBuffer); [self.beautyManager processWithPixelBuffer:pixelBuffer formatType:formatType]; TRTCVideoFrame* videoFrame = [TRTCVideoFrame new]; videoFrame.bufferType = TRTCVideoBufferType_PixelBuffer; videoFrame.pixelFormat = TRTCVideoPixelFormat_32BGRA; videoFrame.pixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer); TRTCVideoRotation rotation = TRTCVideoRotation_0; [_trtc sendCustomVideoData:videoFrame];} ```