从前置摄像头iOS 5.0捕捉时总是看到镜像

从Front摄像头捕捉数据时,我总是得到Mirror镜像,我怎么能在预览窗口中看到我所看到的。 我已经将videoMirrored设置为TRUE 。 以下是代码片段:

 AVCaptureConnection *lConnection = nil; for ( AVCaptureConnection *connection in [lHandle->m_output connections]) { for ( AVCaptureInputPort *port in [connection inputPorts] ) { if ( [[port mediaType] isEqual:AVMediaTypeVideo] ) { lConnection = connection; break; } } } if ([lConnection isVideoOrientationSupported]) [lConnection setVideoOrientation:AVCaptureVideoOrientationPortrait]; if ([lConnection isVideoMirroringSupported]) [lConnection setVideoMirrored:TRUE]; 

setVideoMirrored更改为True/False也不会更改任何内容( isVideoMirroringSupported返回Success)

用以下代码翻转镜像。

 UIImage * flippedImage = [UIImage imageWithCGImage:picture.CGImage scale:picture.scale orientation:UIImageOrientationLeftMirrored]; 

Swift版本:

 let flippedImage = UIImage(CGImage: image.CGImage, scale: image.scale, orientation: .LeftMirrored)