Save sampleBuffer in array (AVFoundation)

前端 未结 2 659
-上瘾入骨i
-上瘾入骨i 2021-01-01 07:11

I try to save the sample buffer instead of an UIImage to an array, to convert it later on. This to speed up the image capturing and maybe not get memory warnings. I just can

相关标签:
2条回答
  • 2021-01-01 07:50

    Why not just use a CFArray and directly put the CMSampleBufferRef objects in there?

    0 讨论(0)
  • 2021-01-01 07:54

    You can use CFArray but you should remember that the CMSampleBufferRef is not retained, and that the "captureOutput:didOutputSampleBuffer:fromConnection:" uses a memory pool - and when you don't release the memory it stops sending new samples (that is why you get only 13 samples) as you can read in:captureOutput:didOutputSampleBuffer:fromConnection:

    0 讨论(0)
自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题