Skip to content

Commit

Permalink
编译问题
Browse files Browse the repository at this point in the history
  • Loading branch information
chenliming committed Oct 21, 2016
1 parent a130058 commit e1b8812
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion LFLiveKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ Pod::Spec.new do |s|
s.libraries = "c++", "z"

s.requires_arc = true
s.dependency 'LMGPUImage'
s.dependency 'GPUImage'
s.dependency 'pili-librtmp', '1.0.3.1'
end
10 changes: 6 additions & 4 deletions LFLiveKit/capture/LFVideoCapture.m
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,12 @@ - (void)processVideo:(GPUImageOutput *)output {
__weak typeof(self) _self = self;
@autoreleasepool {
GPUImageFramebuffer *imageFramebuffer = output.framebufferForOutput;
CVPixelBufferRef pixelBuffer = [imageFramebuffer pixelBuffer];
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);
if (pixelBuffer && _self.delegate && [_self.delegate respondsToSelector:@selector(captureOutput:pixelBuffer:)]) {
[_self.delegate captureOutput:_self pixelBuffer:pixelBuffer];
}
CFRelease(pixelBuffer);
}
}

Expand All @@ -299,7 +301,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];
Expand All @@ -309,7 +311,7 @@ - (void)reloadFilter{
[self.videoCamera addTarget:self.filter];
}

//< 添加水印
///< 添加水印
if(self.warterMarkView){
[self.filter addTarget:self.blendFilter];
[self.uiElementInput addTarget:self.blendFilter];
Expand All @@ -329,7 +331,7 @@ - (void)reloadFilter{
[self.uiElementInput forceProcessingAtSize:self.configuration.videoSize];


//< 输出数据
///< 输出数据
__weak typeof(self) _self = self;
[self.output setFrameProcessingCompletionBlock:^(GPUImageOutput *output, CMTime time) {
[_self processVideo:output];
Expand Down
5 changes: 5 additions & 0 deletions LFLiveKit/filter/LFGPUImageBeautyFilter.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#if __has_include(<GPUImage/GPUImageFramework.h>)
#import <GPUImage/GPUImageFramework.h>
#else
#import "GPUImage.h"
#endif

@interface LFGPUImageBeautyFilter : GPUImageFilter {
}

Expand Down
4 changes: 4 additions & 0 deletions LFLiveKit/filter/LFGPUImageEmptyFilter.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#if __has_include(<GPUImage/GPUImageFramework.h>)
#import <GPUImage/GPUImageFramework.h>
#else
#import "GPUImage.h"
#endif

@interface LFGPUImageEmptyFilter : GPUImageFilter
{
Expand Down

0 comments on commit e1b8812

Please sign in to comment.