🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
视频通话界面的viewDidLoad调用下面的方法 (The viewDidLoad of the video call interface calls the following method) ``` - (void)initCapturer { #pragma mark Capturer self.videoConfig = [AGMCapturerVideoConfig defaultConfig]; self.videoConfig.videoSize = CGSizeMake(480, 640); self.videoConfig.sessionPreset = AGMCaptureSessionPreset480x640; self.videoConfig.fps = 15; self.cameraCapturer = [[AGMCameraCapturer alloc] initWithConfig:self.videoConfig]; self.videoAdapterFilter = [[AGMVideoAdapterFilter alloc] init]; self.videoAdapterFilter.ignoreAspectRatio = YES; self.videoAdapterFilter.isMirror = NO; #pragma mark push pixelBuffer __weak typeof(self) weakSelf = self; [self.cameraCapturer addVideoSink:self.videoAdapterFilter]; #define DEGREES_TO_RADIANS(x) (x * M_PI/180.0) CGAffineTransform rotation = CGAffineTransformMakeRotation( DEGREES_TO_RADIANS(90)); self.videoAdapterFilter.affineTransform = rotation; [self.videoAdapterFilter setFrameProcessingCompletionBlock:^(AGMVideoSource * _Nonnull videoSource, CMTime time) { CVPixelBufferRef pixelBuffer = videoSource.framebufferForOutput.pixelBuffer; [weakSelf.beautyManager processAgoraWithPixelBuffer:pixelBuffer]; [weakSelf.consumer consumePixelBuffer:pixelBuffer withTimestamp:time rotation:AgoraVideoRotationNone]; }]; } ```