2017-03-31 1 views
1

사용자가 정지 화면을 촬영하고 동일한 화면에 비디오를 녹화 할 수있는 카메라 기능을 구현하고 싶습니다. 나는 이미 AVStillImageOutput이있는 AVCaptureSession에 AVVideoDataOutput를 추가 시도했다, 그러나 나는이 오류가 나타납니다 하나 또는 여러 개의 AVCaptureSession의와 동일한의 ViewController에서이 작업을 수행 할 수있는 방법이 있나요동일한 AVCaptureSession에 AVVideoDataOutput 및 AVStillImageOutput을 추가하는 방법은 무엇입니까?

Cannot add output <AVCaptureVideoDataOutput: 0x176e6b90> to capture session <AVCaptureSession: 0x176da7c0 [AVCaptureSessionPresetHigh]> 
<AVCaptureDeviceInput: 0x176a62a0 [Back Camera]> -> <AVCaptureVideoPreviewLayer: 0x176b9bb0> 
<AVCaptureDeviceInput: 0x176a62a0 [Back Camera]> -> <AVCaptureVideoDataOutput: 0x176ed850> because more than one output of the same type is unsupported' 

를?

+0

그런데 왜 VideoOutput에 AVStillImageOutput이 필요합니까? 둘 다 다른 것들입니다. – iphonic

+0

같은 viewcontroller에서 정지 이미지와 비디오를 완벽하게 캡처하고 싶습니다. – genghiskhan

답변

0

나는이 문제를 혼자서는 해결할 수 없었지만 찾고 있던 기능과 동일한 기능을 제공하는 SwiftyCam 프레임 워크를 발견했습니다.

0

이 오류는 두 개의 AVCaptureVideoDataOutput을 동일한 세션에 추가한다는 의미입니다. AVStillImageOutput은 ios 10에서 사용되지 않습니다. 대신 AVCapturePhotoOutput을 사용해 보았습니까?