Audio/video out of sync after switch camera

后端 未结 3 634
面向向阳花
面向向阳花 2021-02-15 12:44

I\'m try create application where I can record video from different cameras on device during recording. For example. User press button \"start record\" from front camera, after

3条回答
  •  生来不讨喜
    2021-02-15 12:51

    when switching camera, you need to pause the buffer writing in the delegate method:

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

    you can checkout the open source project PBJVision

提交回复
热议问题