diff --git a/LFLiveKit.podspec b/LFLiveKit.podspec index f1c64879..af296e3a 100644 --- a/LFLiveKit.podspec +++ b/LFLiveKit.podspec @@ -17,6 +17,6 @@ Pod::Spec.new do |s| s.libraries = "c++", "z" s.requires_arc = true - s.dependency 'GPUImage' + s.dependency 'LMGPUImage' s.dependency 'pili-librtmp', '1.0.3.1' end diff --git a/LFLiveKit/capture/LFVideoCapture.m b/LFLiveKit/capture/LFVideoCapture.m index deec28dc..c14bdf0d 100755 --- a/LFLiveKit/capture/LFVideoCapture.m +++ b/LFLiveKit/capture/LFVideoCapture.m @@ -271,12 +271,10 @@ - (void)processVideo:(GPUImageOutput *)output { __weak typeof(self) _self = self; @autoreleasepool { GPUImageFramebuffer *imageFramebuffer = output.framebufferForOutput; - CVPixelBufferRef pixelBuffer = NULL; - CVPixelBufferCreateWithBytes(kCFAllocatorDefault, _self.configuration.videoSize.width, _self.configuration.videoSize.height, kCVPixelFormatType_32BGRA, [imageFramebuffer byteBuffer], _self.configuration.videoSize.width * 4, NULL, NULL, NULL, &pixelBuffer); + CVPixelBufferRef pixelBuffer = [imageFramebuffer pixelBuffer]; if (pixelBuffer && _self.delegate && [_self.delegate respondsToSelector:@selector(captureOutput:pixelBuffer:)]) { [_self.delegate captureOutput:_self pixelBuffer:pixelBuffer]; } - CFRelease(pixelBuffer); } } @@ -301,7 +299,7 @@ - (void)reloadFilter{ ///< 调节镜像 [self reloadMirror]; - ///< 480*640 比例为4:3 强制转换为16:9 + //< 480*640 比例为4:3 强制转换为16:9 if([self.configuration.avSessionPreset isEqualToString:AVCaptureSessionPreset640x480]){ CGRect cropRect = self.configuration.landscape ? CGRectMake(0, 0.125, 1, 0.75) : CGRectMake(0.125, 0, 0.75, 1); self.cropfilter = [[GPUImageCropFilter alloc] initWithCropRegion:cropRect]; @@ -311,7 +309,7 @@ - (void)reloadFilter{ [self.videoCamera addTarget:self.filter]; } - ///< 添加水印 + //< 添加水印 if(self.warterMarkView){ [self.filter addTarget:self.blendFilter]; [self.uiElementInput addTarget:self.blendFilter]; @@ -331,7 +329,7 @@ - (void)reloadFilter{ [self.uiElementInput forceProcessingAtSize:self.configuration.videoSize]; - ///< 输出数据 + //< 输出数据 __weak typeof(self) _self = self; [self.output setFrameProcessingCompletionBlock:^(GPUImageOutput *output, CMTime time) { [_self processVideo:output]; diff --git a/LFLiveKit/filter/LFGPUImageBeautyFilter.h b/LFLiveKit/filter/LFGPUImageBeautyFilter.h index 03211585..1db560b4 100755 --- a/LFLiveKit/filter/LFGPUImageBeautyFilter.h +++ b/LFLiveKit/filter/LFGPUImageBeautyFilter.h @@ -1,9 +1,4 @@ -#if __has_include() -#import -#else #import "GPUImage.h" -#endif - @interface LFGPUImageBeautyFilter : GPUImageFilter { } diff --git a/LFLiveKit/filter/LFGPUImageEmptyFilter.h b/LFLiveKit/filter/LFGPUImageEmptyFilter.h index 5aad12d6..b5637c40 100755 --- a/LFLiveKit/filter/LFGPUImageEmptyFilter.h +++ b/LFLiveKit/filter/LFGPUImageEmptyFilter.h @@ -1,8 +1,4 @@ -#if __has_include() -#import -#else #import "GPUImage.h" -#endif @interface LFGPUImageEmptyFilter : GPUImageFilter {