2016-06-16 4 views

답변

1

당신은 당신이 처음이자 마지막 sampleBuffer의의 프리젠 테이션 시간 스탬프를 지적하여 기록 된 시간을 계산할 수 있습니다 대리자 콜백

- (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection; 

을에서 다음 AVCaptureVideoDataOutput을 사용하는 경우 당신에게 기록 :

CMTime start = CMSampleBufferGetPresentationTimeStamp(sampleBufferFirst); 
CMTime end = CMSampleBufferGetPresentationTimeStamp(sampleBufferLast); 

CMTime recordedDuration = CMTimeSubtract(end, start); 
관련 문제