While capturing data from Front camera I am always getting Mirror image, how can I get what I am seeing in my preview window. I have set videoMirrored
to be TRUE
. Following is the code snippet:
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];
Changing setVideoMirrored
to True/False
also doesn't change anything
(isVideoMirroringSupported
returns Success)