企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
设置采集视频镜像为yes 本地预览镜像为NO(Set the captured video image to yes and the local preview image to No) self.localView.isPreviewMirror = NO; param.videoMirrored = YES; 保证下面的方法会执行,在该方法中对beautyManager赋值。 (Ensure that the following method will be executed, and assign a value to beautymanager in this method.) ``` RCRTCEngine sharedInstance].defaultVideoStream.videoSendBufferCallback = ^CMSampleBufferRef _Nullable(BOOL valid, CMSampleBufferRef _Nullable sampleBuffer) { __strong typeof(weakSelf) strongSelf = weakSelf; if (!strongSelf) { return sampleBuffer; } CMSampleBufferRef processedSampleBuffer = [strongSelf.chatGPUImageHandler onGPUFilterSource:sampleBuffer]; CVPixelBufferRef pixelBuffer = CMSampleBufferGetImageBuffer(processedSampleBuffer); OSType formatType = CVPixelBufferGetPixelFormatType(pixelBuffer); [self.beautyManager processWithRoatePixelBuffer:pixelBuffer formatType:formatType\]; if (!processedSampleBuffer) { return sampleBuffer; } return processedSampleBuffer; }; } ```