jjzjj

captureVideoPreviewLayer

全部标签

iphone - AVCaptureStillImageOutput 的 UIImage 方向不正确

我正在尝试从AVCaptureStillImageOutput捕获像素数据,并注意到在将图像裁剪为CGImage后,它会重新定向。为了对此进行测试,我将临时图像输出到照片库。现在我注意到,即使在裁剪图像之前,它的缩略图也会旋转,而完整图像不会。(当我将UIImage传递到需要正确尺寸图像的自定义pixelDataManager时,这后来成为一个问题。)设置captureVideoPreviewLayer.orientation=AVCaptureVideoOrientationPortrait;和[videoConnectionsetVideoOrientation:AVCapture

objective-c - AVCaptureSession 启动内存警告

每次我启动AVCaptureSession时,我都会收到一条内存警告,导致一段时间后崩溃。我正在异步启动session,Instruments工具显示应用程序消耗了大约2MB的内存。你知道如何克服这个问题吗?分配的2MB内存太多了吗?谢谢![iOS4.3,ARC]@autoreleasepool{//Initcapturesessionsession=[[AVCaptureSessionalloc]init];session.sessionPreset=AVCaptureSessionPresetPhoto;//ResizecontainerviewCGRectcameraContai

iphone - 使用用户触摸可调整大小的 View

这是在继续fromthisquestion.总结一下:1)我想在我的应用程序中安装可调整大小的摄像头。我去了thisrepo,下载并实现。2)AVCaptureVideoPreviewLayer*newCaptureVideoPreviewLayer=[[AVCaptureVideoPreviewLayeralloc]initWithSession:[[selfcaptureManager]session]];UIView*view=[selfvideoPreviewView];CALayer*viewLayer=[viewlayer];[viewLayersetMasksToBoun

ios - AVCaptureSession 录制带有音频的视频

我将我的应用程序设置为使用AVCaptureSession从相机录制视频,但是,它没有音频。我需要做什么来录制音频,然后将其添加到文件的videoOutput中?这是我录制视频的代码:AVCaptureSession*session=[[AVCaptureSessionalloc]init];[sessionbeginConfiguration];session.sessionPreset=AVCaptureSessionPresetMedium;CALayer*viewLayer=self.vImagePreview.layer;NSLog(@"viewLayer=%@",viewL

ios - AVCaptureSession 录制带有音频的视频

我将我的应用程序设置为使用AVCaptureSession从相机录制视频,但是,它没有音频。我需要做什么来录制音频,然后将其添加到文件的videoOutput中?这是我录制视频的代码:AVCaptureSession*session=[[AVCaptureSessionalloc]init];[sessionbeginConfiguration];session.sessionPreset=AVCaptureSessionPresetMedium;CALayer*viewLayer=self.vImagePreview.layer;NSLog(@"viewLayer=%@",viewL