Take a look at the header AVCaptureSession.h. There is a definition for an enum called AVCaptureVideoOrientation
that defines various video orientations. On the AVCaptureConnection object there is a property called videoOrientation that is a AVCaptureVideoOrientation
. You should be able to set this to change the orientation of the video. You probably want AVCaptureVideoOrientationLandscapeRight
or AVCaptureVideoOrientationLandscapeLeft
.
You can find the AVCaptureConnections for the session by looking at the outputs for the session. The outputs have a connections property that is an array of connections for that output.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…