AVCaptureConnection setVideoOrientation while recording

I have a problem with the orientation of the video while recording.

I use AVCaptureMovieFileOutputto record video with AVFoundation. Before starting recording, I have no problem setting the video orientation using the method AVCaptureConnection setVideoOrientation.

However, if the video is already running, the change AVCaptureConnection VideoOrientationdoes not change the actual orientation of the file that is being recorded.

Is this a known limitation, or am I doing something wrong?

+4
source share
1 answer

, ? , , ? /? , , , .

https://developer.apple.com/library/ios/qa/qa1744/_index.html

, ...

https://developer.apple.com/library/ios/documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/04_MediaCapture.html

, ...

- , . , , startConfiguration commitConfiguration, :

AVCaptureSession *session = <#A capture session#>;
[session beginConfiguration];

[session removeInput:frontFacingCameraDeviceInput];
[session addInput:backFacingCameraDeviceInput];

[session commitConfiguration];

commitConfiguration, . . , [session beginConfiguration] AVCaptureConnection VideoOrientation, , [session commitConfiguration]. , !

0

All Articles