What is the recommended way to deal with AVCaptureVideoDataOutput image data regarding orientation

余生长醉 提交于 2019-12-07 09:47:33

The video connection is usually in landscape (e.g. AVCaptureVideoOrientationLandscapeRight) There is some good info on this apple Q&A

My understanding is that you cannot set the video Orientation on AVCaptureVideoDataOutput. Hence all the various tricks in your links to rotate the current frame image in the AVCaptureSession delegate method captureOutput:didOutputSampleBuffer:fromConnection:

I assume from your previous post that you looked at the SquareCam sample project. The RosyWriter project provides also some interesting handling of orientation, by comparing the videoOrientation property of the connection to a "reference" portrait orientation expected by the application.

Hope it helps.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!