Monday, January 10, 2011

AVCaptureConnection orientation

A lenyeg, hogy az AVCaptureConnection-on kell beallitani a videoOrientation-t es nem az AVCaptureSession-on vagy az AVCaptureDevice-on.

Valahogy igy:
for(int i = 0; i < [[captureOutput connections] count]; i++) {
AVCaptureConnection *captureConnection = [[captureOutput connections] objectAtIndex:i];
if([captureConnection isVideoOrientationSupported]) {
[captureConnection setVideoOrientation:[[UIDevice currentDevice] orientation]];
}
}

Fontos viszont, hogy AVCaptureVideoDataOutput connection-jan nem lehet videoOrientation-t (es videoMirrored-et) allitani.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.