【发布时间】:2016-08-31 14:06:45
【问题描述】:
我正在通过导入 GPUImage 框架为 ios 创建具有实时视频功能的相机应用程序。我使用这个框架来制作实时照片,它运行良好。我使用以下代码制作实时视频,并参考了 Brad github,
videoCamera = [[GPUImageVideoCamera alloc] initWithSessionPreset:AVCaptureSessionPreset640x480 cameraPosition:AVCaptureDevicePositionBack];
videoCamera.outputImageOrientation = UIInterfaceOrientationPortrait;
startfilter = [[GPUImageFilter alloc] init];
outputView = [[GPUImageView alloc] initWithFrame:CGRectMake(0.0, 0.0,self.view.frame.size.width,self.view.frame.size.height)];
[self.image_view addSubview:outputView];
[startfilter removeAllTargets];
// Add the view somewhere so it's visible
[startfilter forceProcessingAtSize:outputView.sizeInPixels];
[videoCamera useNextFrameForImageCapture];
[videoCamera addTarget:startfilter];
[startfilter addTarget:outputView];
[videoCamera startCameraCapture];
我的疑惑: 如何将视频保存到照片库。我查看了他们使用 url 的其他博客,我不确定如何实现照片库的 url。 我使用以下代码将实时视频保存到照片库,但找不到视频捕获。
[videoCamera stopCameraCapture];
UISaveVideoAtPathToSavedPhotosAlbum(pathToMovie, nil, nil, nil);
我想知道,如何找到 pathToMovie?
请帮忙。提前致谢。
【问题讨论】:
-
我搜索了所有博客,但没有解决方案..请帮助我..
标签: objective-c gpuimage gpuimagestillcamera