videoOrientation
An orientation that tells the connection how to rotate a video flowing through it.
Declaration
var videoOrientation: AVCaptureVideoOrientation { get set }Mentioned in
Discussion
The property only applies to a video connection.
If the value of isVideoOrientationSupported is true, you can set videoOrientation to rotate the video buffers consumed by the connection’s output. Setting videoOrientation doesn’t necessarily result in a physical rotation of video buffers. For example, a video connection to an AVCaptureMovieFileOutput object handles orientation using a QuickTime track matrix. A video connection to an AVCaptureStillImageOutput object handles orientation using EXIF tags.
AVCaptureVideoDataOutput clients may receive physically rotated pixel buffers in their captureOutput(_:didOutput:from:) delegate callback. The AVCaptureVideoDataOutput hardware accelerates the rotation operation and supports all four AVCaptureVideoOrientation modes. A client sets videoOrientation or isVideoMirrored on the video data output’s video AVCaptureConnection to request physical buffer rotation.